Просмотр исходного кода

Merge branch 'Refactor1' of http://192.168.1.123:10080/SDD1/HOZ into Refactor1

gsp 4 лет назад
Родитель
Сommit
f5cb0fb03f
4 измененных файлов с 425 добавлено и 181 удалено
  1. 1 1
      HOZProject/UnitControl.csproj
  2. 126 20
      OxfordTest/Form1.Designer.cs
  3. 62 2
      OxfordTest/Form1.cs
  4. 236 158
      OxfordTest/Form1.resx

+ 1 - 1
HOZProject/UnitControl.csproj

@@ -55,7 +55,7 @@
     </Reference>
     <Reference Include="SlmRuntimeCSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\bin\Release\SlmRuntimeCSharp.dll</HintPath>
+      <HintPath>..\bin\Debug\SlmRuntimeCSharp.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Configuration" />

+ 126 - 20
OxfordTest/Form1.Designer.cs

@@ -29,10 +29,10 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
-            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-            System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
-            System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
-            System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+            System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
             this.label1 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
@@ -158,6 +158,19 @@
             this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
             this.button26 = new System.Windows.Forms.Button();
             this.button25 = new System.Windows.Forms.Button();
+            this.textRegionX1 = new System.Windows.Forms.TextBox();
+            this.textRegionY1 = new System.Windows.Forms.TextBox();
+            this.textRegionwidth1 = new System.Windows.Forms.TextBox();
+            this.textRegionHeight = new System.Windows.Forms.TextBox();
+            this.textTime = new System.Windows.Forms.TextBox();
+            this.button29 = new System.Windows.Forms.Button();
+            this.label38 = new System.Windows.Forms.Label();
+            this.label39 = new System.Windows.Forms.Label();
+            this.label40 = new System.Windows.Forms.Label();
+            this.label41 = new System.Windows.Forms.Label();
+            this.label42 = new System.Windows.Forms.Label();
+            this.textPixel = new System.Windows.Forms.TextBox();
+            this.label43 = new System.Windows.Forms.Label();
             this.groupBox1.SuspendLayout();
             this.拍图.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pBImage)).BeginInit();
@@ -745,6 +758,12 @@
             this.groupBox2.Controls.Add(this.txtarea1y3);
             this.groupBox2.Controls.Add(this.txtarea1x3);
             this.groupBox2.Controls.Add(this.txtarea1l2);
+            this.groupBox2.Controls.Add(this.textRegionHeight);
+            this.groupBox2.Controls.Add(this.textPixel);
+            this.groupBox2.Controls.Add(this.textTime);
+            this.groupBox2.Controls.Add(this.textRegionwidth1);
+            this.groupBox2.Controls.Add(this.textRegionY1);
+            this.groupBox2.Controls.Add(this.textRegionX1);
             this.groupBox2.Controls.Add(this.txtarea1l1);
             this.groupBox2.Controls.Add(this.txtarea1y2);
             this.groupBox2.Controls.Add(this.txtarea1x2);
@@ -764,11 +783,18 @@
             this.groupBox2.Controls.Add(this.label33);
             this.groupBox2.Controls.Add(this.txtpy1);
             this.groupBox2.Controls.Add(this.txtpx1);
+            this.groupBox2.Controls.Add(this.label39);
+            this.groupBox2.Controls.Add(this.label41);
+            this.groupBox2.Controls.Add(this.label43);
+            this.groupBox2.Controls.Add(this.label42);
+            this.groupBox2.Controls.Add(this.label40);
+            this.groupBox2.Controls.Add(this.label38);
             this.groupBox2.Controls.Add(this.label32);
             this.groupBox2.Controls.Add(this.NUDNum);
             this.groupBox2.Controls.Add(this.btnReadP);
             this.groupBox2.Controls.Add(this.dataGridView1);
             this.groupBox2.Controls.Add(this.chart1);
+            this.groupBox2.Controls.Add(this.button29);
             this.groupBox2.Controls.Add(this.button26);
             this.groupBox2.Controls.Add(this.button25);
             resources.ApplyResources(this.groupBox2, "groupBox2");
@@ -991,24 +1017,24 @@
             // 
             // chart1
             // 
-            chartArea2.Name = "ChartArea1";
-            this.chart1.ChartAreas.Add(chartArea2);
-            legend2.Alignment = System.Drawing.StringAlignment.Center;
-            legend2.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
-            legend2.Name = "Legend1";
-            this.chart1.Legends.Add(legend2);
+            chartArea1.Name = "ChartArea1";
+            this.chart1.ChartAreas.Add(chartArea1);
+            legend1.Alignment = System.Drawing.StringAlignment.Center;
+            legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
+            legend1.Name = "Legend1";
+            this.chart1.Legends.Add(legend1);
             resources.ApplyResources(this.chart1, "chart1");
             this.chart1.Name = "chart1";
-            series3.ChartArea = "ChartArea1";
-            series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
-            series3.Legend = "Legend1";
-            series3.Name = "Series1";
-            series4.ChartArea = "ChartArea1";
-            series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
-            series4.Legend = "Legend1";
-            series4.Name = "Series2";
-            this.chart1.Series.Add(series3);
-            this.chart1.Series.Add(series4);
+            series1.ChartArea = "ChartArea1";
+            series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
+            series1.Legend = "Legend1";
+            series1.Name = "Series1";
+            series2.ChartArea = "ChartArea1";
+            series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
+            series2.Legend = "Legend1";
+            series2.Name = "Series2";
+            this.chart1.Series.Add(series1);
+            this.chart1.Series.Add(series2);
             // 
             // button26
             // 
@@ -1024,6 +1050,73 @@
             this.button25.UseVisualStyleBackColor = true;
             this.button25.Click += new System.EventHandler(this.button25_Click);
             // 
+            // textRegionX1
+            // 
+            resources.ApplyResources(this.textRegionX1, "textRegionX1");
+            this.textRegionX1.Name = "textRegionX1";
+            // 
+            // textRegionY1
+            // 
+            resources.ApplyResources(this.textRegionY1, "textRegionY1");
+            this.textRegionY1.Name = "textRegionY1";
+            // 
+            // textRegionLebgth1
+            // 
+            resources.ApplyResources(this.textRegionwidth1, "textRegionLebgth1");
+            this.textRegionwidth1.Name = "textRegionLebgth1";
+            // 
+            // textRegionY2
+            // 
+            resources.ApplyResources(this.textRegionHeight, "textRegionY2");
+            this.textRegionHeight.Name = "textRegionY2";
+            // 
+            // textTime
+            // 
+            resources.ApplyResources(this.textTime, "textTime");
+            this.textTime.Name = "textTime";
+            // 
+            // button29
+            // 
+            resources.ApplyResources(this.button29, "button29");
+            this.button29.Name = "button29";
+            this.button29.UseVisualStyleBackColor = true;
+            this.button29.Click += new System.EventHandler(this.button29_Click);
+            // 
+            // label38
+            // 
+            resources.ApplyResources(this.label38, "label38");
+            this.label38.Name = "label38";
+            // 
+            // label39
+            // 
+            resources.ApplyResources(this.label39, "label39");
+            this.label39.Name = "label39";
+            // 
+            // label40
+            // 
+            resources.ApplyResources(this.label40, "label40");
+            this.label40.Name = "label40";
+            // 
+            // label41
+            // 
+            resources.ApplyResources(this.label41, "label41");
+            this.label41.Name = "label41";
+            // 
+            // label42
+            // 
+            resources.ApplyResources(this.label42, "label42");
+            this.label42.Name = "label42";
+            // 
+            // textPixel
+            // 
+            resources.ApplyResources(this.textPixel, "textPixel");
+            this.textPixel.Name = "textPixel";
+            // 
+            // label43
+            // 
+            resources.ApplyResources(this.label43, "label43");
+            this.label43.Name = "label43";
+            // 
             // Form1
             // 
             resources.ApplyResources(this, "$this");
@@ -1175,6 +1268,19 @@
         private System.Windows.Forms.Label label32;
         private System.Windows.Forms.Button button27;
         private System.Windows.Forms.Button button28;
+        private System.Windows.Forms.TextBox textRegionHeight;
+        private System.Windows.Forms.TextBox textTime;
+        private System.Windows.Forms.TextBox textRegionwidth1;
+        private System.Windows.Forms.TextBox textRegionY1;
+        private System.Windows.Forms.TextBox textRegionX1;
+        private System.Windows.Forms.Label label39;
+        private System.Windows.Forms.Label label41;
+        private System.Windows.Forms.Label label42;
+        private System.Windows.Forms.Label label40;
+        private System.Windows.Forms.Label label38;
+        private System.Windows.Forms.Button button29;
+        private System.Windows.Forms.TextBox textPixel;
+        private System.Windows.Forms.Label label43;
     }
 }
 

+ 62 - 2
OxfordTest/Form1.cs

@@ -356,7 +356,7 @@ namespace OxfordTest
         {
             MeasureFile msf = new MeasureFile();
             //msf.FileName = @"E:\HOZ\Test\asd.msf";
-            MeasureDB db = new MeasureDB(msf);
+         //   MeasureDB db = new MeasureDB(msf);
         }
 
         private void btnReadP_Click(object sender, EventArgs e)
@@ -494,7 +494,7 @@ namespace OxfordTest
             msf.FileName = @"E:\HOZ\Test\asd.msf";
             msf.MParam.EDSParam.DwellTime = 200;
             msf.MParam.EDSParam.AreaTime = 200;
-            m_MeasDB = new MeasureDB(msf);
+           // m_MeasDB = new MeasureDB(msf);
             pname.Add("aaaa");
             pname.Add("bbbb");
             pname.Add("cccc");
@@ -530,5 +530,65 @@ namespace OxfordTest
                iExtender.CloseExtender();
             }
         }
+
+        private void button29_Click(object sender, EventArgs e)
+        {
+            //List<List<Segment>> Features = new List<List<Segment>>();
+            //Segment seg1 = new Segment();
+            //seg1.X = Convert.ToInt32(textRegionX1.Text);//1
+            //seg1.Y = Convert.ToInt32(textRegionY1.Text);//1
+
+            //int stingHeight = Convert.ToInt32(textPixel.Text);
+            //for (int i=0; i< Convert.ToInt32(textRegionHeight.Text);i+= stingHeight)
+            //{
+            //    List<Segment> feature = new List<Segment>();
+            //    for (int k=0;k<=stingHeight;k++)
+            //    {
+            //        Segment segment = new Segment();
+            //        segment.X = seg1.X;
+            //        segment.Y = seg1.Y + 1;
+            //        segment.Length = Convert.ToInt32(textRegionwidth1.Text);
+            //        feature.Add(segment);
+            //    }
+            //    Features.Add(feature);
+            //}
+
+
+            //for (int i=0; i<Features.Count;i++)
+            //{
+            //    List<Segment> listSeg = Features[i];
+            //    long[] XrayData = new long[2000];
+            //    Dictionary<string, double> listElement = new Dictionary<string, double>();
+            //    iExtender.XrayAreaCollectiong(Convert.ToInt32(textTime.Text), listSeg, out XrayData, out listElement);
+            //    ShowData(XrayData, listElement);
+            //}
+
+
+            long[] XrayData = new long[2000];
+            Dictionary<string, double> listElement = new Dictionary<string, double>();
+
+          
+
+            Segment seg1 = new Segment();
+            seg1.X = Convert.ToInt32(textRegionX1.Text);
+            seg1.Y = Convert.ToInt32(textRegionY1.Text);
+            seg1.Length = Convert.ToInt32(textRegionwidth1.Text);
+            int h = Convert.ToInt32(textRegionHeight.Text);
+
+            List<Segment> listSeg = new List<Segment>();
+            for (int i = 0; i < h; i++)
+            {
+                Segment seg2 = new Segment();
+                seg2.X = seg1.X;
+                seg2.Y = seg1.Y + i;
+                seg2.Length = seg1.Length;
+                listSeg.Add(seg2);
+            }
+           
+
+            iExtender.XrayAreaCollectiong(Convert.ToInt32(textTime.Text), listSeg, out XrayData, out listElement);
+            ShowData(XrayData, listElement);
+
+        }
     }
 }

Разница между файлами не показана из-за своего большого размера
+ 236 - 158
OxfordTest/Form1.resx


Некоторые файлы не были показаны из-за большого количества измененных файлов