Ver Fonte

Merge branch 'GSP' into Release2.5

gsp há 2 anos atrás
pai
commit
79d431ba84

+ 4 - 0
OTSCPP/OTSClassifyEngine/InclutionEngine/OTSClassifyEng.cpp

@@ -796,6 +796,10 @@ namespace OTSClassifyEngine
 
 			}
 		}
+		else
+		{
+		      listChemistriesToAnalysis = a_listElChemsIncNoFe;
+		}
 
 		// set sulfide base name
 		CString strSulfideBaseName = _T("");

+ 61 - 0
OTSIncAMeasureApp/BaseFunctionTest.Designer.cs

@@ -0,0 +1,61 @@
+
+namespace OTSMeasureApp
+{
+    partial class BaseFunctionTest
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.button1 = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(47, 25);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(130, 24);
+            this.button1.TabIndex = 0;
+            this.button1.Text = "ClassificationTest";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // BaseFunctionTest
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(800, 450);
+            this.Controls.Add(this.button1);
+            this.Name = "BaseFunctionTest";
+            this.Text = "BaseFunctionTest";
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button button1;
+    }
+}

+ 46 - 0
OTSIncAMeasureApp/BaseFunctionTest.cs

@@ -0,0 +1,46 @@
+using OTSCLRINTERFACE;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace OTSMeasureApp
+{
+    public partial class BaseFunctionTest : Form
+    {
+        public BaseFunctionTest()
+        {
+            InitializeComponent();
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            COTSClassifyEngineClr engine = new COTSClassifyEngineClr(EngineType.InclutionEng, "NoSTDDB");
+            COTSParticleClr part = new COTSParticleClr();
+            List<CElementChemistryClr> eles = new List<CElementChemistryClr>();
+            eles.Add(GetEleChem("Mn", 22.5));
+            eles.Add(GetEleChem("S", 11.01));
+            eles.Add(GetEleChem("O", 10.13));
+            eles.Add(GetEleChem("C", 5.51));
+            eles.Add(GetEleChem("Si", 4.06));
+            eles.Add(GetEleChem("Al", 2.34));
+            var xray = part.GetXray();
+            xray.SetElementQuantifyData(eles);
+            part.SetXray(xray);
+            engine.Classify(part, 1);
+        }
+        private CElementChemistryClr GetEleChem(string name, double percent)
+        {
+
+            CElementChemistryClr ele = new CElementChemistryClr();
+            ele.SetName(name);
+            ele.SetPercentage(percent);
+            return ele;
+        }
+    }
+}

+ 9 - 0
OTSIncAMeasureApp/OTSIncAMeasureApp.csproj

@@ -348,6 +348,12 @@
     </Compile>
     <Compile Include="7-OTSProgMgrInfo\Stage\StageDisplayHelp.cs" />
     <Compile Include="CRegistration.cs" />
+    <Compile Include="BaseFunctionTest.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="BaseFunctionTest.Designer.cs">
+      <DependentUpon>BaseFunctionTest.cs</DependentUpon>
+    </Compile>
     <Compile Include="ResourceManage\ResourceData.cs" />
     <Compile Include="ResourceManage\ResourceID.cs" />
     <Compile Include="ServiceCenter\CClassifyEngine.cs" />
@@ -555,6 +561,9 @@
     <EmbeddedResource Include="About.resx">
       <DependentUpon>About.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="BaseFunctionTest.resx">
+      <DependentUpon>BaseFunctionTest.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="OTSIncAMeasureAppForm.resx">
       <DependentUpon>OTSIncAMeasureAppForm.cs</DependentUpon>
       <SubType>Designer</SubType>

+ 25 - 18
OTSIncAMeasureApp/OTSIncAMeasureAppForm.Designer.cs

@@ -103,6 +103,7 @@
             this.dockPanel = new OTS.WinFormsUI.Docking.DockPanel();
             this.ribbonButton3 = new System.Windows.Forms.RibbonButton();
             this.ribbonButton1 = new System.Windows.Forms.RibbonButton();
+            this.ribbonPanel1 = new System.Windows.Forms.RibbonPanel();
             this.statusStrip1.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -169,7 +170,7 @@
             this.rbMenu.BorderMode = System.Windows.Forms.RibbonWindowMode.InsideWindow;
             this.rbMenu.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
             this.rbMenu.Location = new System.Drawing.Point(0, 0);
-            this.rbMenu.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.rbMenu.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.rbMenu.Minimized = true;
             this.rbMenu.Name = "rbMenu";
             // 
@@ -202,7 +203,7 @@
             this.rbMenu.QuickAcessToolbar.Image = null;
             this.rbMenu.QuickAcessToolbar.Tag = null;
             this.rbMenu.QuickAcessToolbar.ToolTipImage = null;
-            this.rbMenu.Size = new System.Drawing.Size(1703, 130);
+            this.rbMenu.Size = new System.Drawing.Size(1277, 130);
             this.rbMenu.TabIndex = 0;
             this.rbMenu.Tabs.Add(this.rbTabHome);
             this.rbMenu.Tabs.Add(this.rbTabView);
@@ -383,6 +384,7 @@
             this.rbTabHome.Panels.Add(this.rbSemFunction);
             this.rbTabHome.Panels.Add(this.rbPanelFunction);
             this.rbTabHome.Panels.Add(this.rbPReport);
+            this.rbTabHome.Panels.Add(this.ribbonPanel1);
             this.rbTabHome.Tag = "rbTabHome";
             this.rbTabHome.Text = "基本功能";
             // 
@@ -499,7 +501,6 @@
             this.ribCircle.ToolTipImage = null;
             this.ribCircle.ToolTipTitle = null;
             this.ribCircle.Click += new System.EventHandler(this.ribCircle_Click);
-           
             // 
             // rbCircleCenter
             // 
@@ -531,13 +532,13 @@
             this.rbThreePoints.ToolTipTitle = null;
             this.rbThreePoints.Click += new System.EventHandler(this.rbThreePoints_Click);
             // 
-            // ribRing
+            // rbRingShape
             // 
             this.rbRingShape.AltKey = null;
             this.rbRingShape.DropDownArrowDirection = System.Windows.Forms.RibbonArrowDirection.Left;
             this.rbRingShape.DropDownArrowSize = new System.Drawing.Size(5, 3);
-            this.rbRingShape.Image = ((System.Drawing.Image)(resources.GetObject("rbThreePoints.Image")));
-            this.rbRingShape.SmallImage = ((System.Drawing.Image)(resources.GetObject("rbThreePoints.SmallImage")));
+            this.rbRingShape.Image = ((System.Drawing.Image)(resources.GetObject("rbRingShape.Image")));
+            this.rbRingShape.SmallImage = ((System.Drawing.Image)(resources.GetObject("rbRingShape.SmallImage")));
             this.rbRingShape.Style = System.Windows.Forms.RibbonButtonStyle.Normal;
             this.rbRingShape.Tag = null;
             this.rbRingShape.Text = "环形";
@@ -866,11 +867,11 @@
             this.TSGrayVal,
             this.STSemCoordinate,
             this.toolStripStatusLabel1});
-            this.statusStrip1.Location = new System.Drawing.Point(0, 841);
+            this.statusStrip1.Location = new System.Drawing.Point(0, 671);
             this.statusStrip1.Name = "statusStrip1";
-            this.statusStrip1.Padding = new System.Windows.Forms.Padding(3, 0, 19, 0);
+            this.statusStrip1.Padding = new System.Windows.Forms.Padding(2, 0, 14, 0);
             this.statusStrip1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
-            this.statusStrip1.Size = new System.Drawing.Size(1703, 30);
+            this.statusStrip1.Size = new System.Drawing.Size(1277, 26);
             this.statusStrip1.TabIndex = 2;
             this.statusStrip1.Text = "statusStrip1";
             // 
@@ -878,20 +879,20 @@
             // 
             this.TSGrayVal.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
             this.TSGrayVal.Name = "TSGrayVal";
-            this.TSGrayVal.Size = new System.Drawing.Size(58, 24);
+            this.TSGrayVal.Size = new System.Drawing.Size(48, 21);
             this.TSGrayVal.Text = "灰度值";
             // 
             // STSemCoordinate
             // 
             this.STSemCoordinate.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
             this.STSemCoordinate.Name = "STSemCoordinate";
-            this.STSemCoordinate.Size = new System.Drawing.Size(75, 24);
+            this.STSemCoordinate.Size = new System.Drawing.Size(62, 21);
             this.STSemCoordinate.Text = "SEM坐标";
             // 
             // toolStripStatusLabel1
             // 
             this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
-            this.toolStripStatusLabel1.Size = new System.Drawing.Size(65, 24);
+            this.toolStripStatusLabel1.Size = new System.Drawing.Size(54, 21);
             this.toolStripStatusLabel1.Text = "IsReady";
             this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             this.toolStripStatusLabel1.Visible = false;
@@ -906,9 +907,9 @@
             this.dockPanel.DockLeftPortion = 0.21D;
             this.dockPanel.DockRightPortion = 0.27D;
             this.dockPanel.Location = new System.Drawing.Point(0, 130);
-            this.dockPanel.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
+            this.dockPanel.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.dockPanel.Name = "dockPanel";
-            this.dockPanel.Size = new System.Drawing.Size(1703, 711);
+            this.dockPanel.Size = new System.Drawing.Size(1277, 541);
             dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
             dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
             autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
@@ -983,11 +984,16 @@
             this.ribbonButton1.ToolTipImage = null;
             this.ribbonButton1.ToolTipTitle = null;
             // 
+            // ribbonPanel1
+            // 
+            this.ribbonPanel1.Tag = null;
+            this.ribbonPanel1.Text = "ribbonPanel1";
+            // 
             // OTSIncAMeasureAppForm
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1703, 871);
+            this.ClientSize = new System.Drawing.Size(1277, 697);
             this.Controls.Add(this.dockPanel);
             this.Controls.Add(this.statusStrip1);
             this.Controls.Add(this.rbMenu);
@@ -995,8 +1001,8 @@
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.IsMdiContainer = true;
             this.KeyPreview = true;
-            this.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
-            this.MinimumSize = new System.Drawing.Size(899, 615);
+            this.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.MinimumSize = new System.Drawing.Size(678, 500);
             this.Name = "OTSIncAMeasureAppForm";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
             this.Text = "OTSMeasureApp";
@@ -1073,5 +1079,6 @@
         public System.Windows.Forms.RibbonButton rbinterrupt;
         public System.Windows.Forms.RibbonButton rbAutoBeamOff;
         public System.Windows.Forms.RibbonButton rbSysMgrApp;
+        private System.Windows.Forms.RibbonPanel ribbonPanel1;
     }
 }

+ 4 - 0
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -218,6 +218,10 @@ namespace OTSMeasureApp
                 
                 PrepareIpcServer();
                 log.Info("Ipc server start success!");
+                //----------------------Test Code, Don't delete
+                //var f = new BaseFunctionTest();
+                //f.ShowDialog();
+                //----------------------
             }
             catch (Exception ex)
             {

+ 12 - 0
OTSIncAMeasureApp/OTSIncAMeasureAppForm.resx

@@ -176,6 +176,18 @@
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
         JQAAFiUBSVIk8AAAABNJREFUOE9jGAWjYBSMAjBgYAAABBAAAadEfGMAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="rbRingShape.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
+        JQAAFiUBSVIk8AAAABpJREFUWEftwQEBAAAAgiD/r25IQAAAAMC5GhAgAAGdeElDAAAAAElFTkSuQmCC
+</value>
+  </data>
+  <data name="rbRingShape.SmallImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
+        JQAAFiUBSVIk8AAAABNJREFUOE9jGAWjYBSMAjBgYAAABBAAAadEfGMAAAAASUVORK5CYII=
 </value>
   </data>
   <data name="ribCircle.SmallImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

+ 1 - 0
OTSIncAMeasureApp/Program.cs

@@ -40,6 +40,7 @@ namespace OTSMeasureApp
             Application.EnableVisualStyles();
             Application.SetCompatibleTextRenderingDefault(false);
             Application.Run(new OTSIncAMeasureAppForm());
+           
         }
       
     }