Ver código fonte

OTSSysMgrApp add Spectral spectrum peak figure

cxs 2 semanas atrás
pai
commit
7bf540a5e5

+ 53 - 84
OTSSysMgrApp/ControllerSettingForm.Designer.cs

@@ -28,8 +28,6 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-            System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ControllerSettingForm));
             this.tabSetting = new System.Windows.Forms.TabControl();
             this.tabImage = new System.Windows.Forms.TabPage();
@@ -46,7 +44,6 @@
             this.lblResolution = new System.Windows.Forms.Label();
             this.tabXRay = new System.Windows.Forms.TabPage();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.chartXRay = new System.Windows.Forms.DataVisualization.Charting.Chart();
             this.btnClearData = new System.Windows.Forms.Button();
             this.btnAreaRay = new System.Windows.Forms.Button();
             this.btnPointXRay = new System.Windows.Forms.Button();
@@ -63,8 +60,6 @@
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbImage)).BeginInit();
             this.tabXRay.SuspendLayout();
-            this.groupBox1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.chartXRay)).BeginInit();
             this.SuspendLayout();
             // 
             // tabSetting
@@ -76,7 +71,7 @@
             this.tabSetting.Margin = new System.Windows.Forms.Padding(2);
             this.tabSetting.Name = "tabSetting";
             this.tabSetting.SelectedIndex = 0;
-            this.tabSetting.Size = new System.Drawing.Size(959, 770);
+            this.tabSetting.Size = new System.Drawing.Size(959, 834);
             this.tabSetting.TabIndex = 2;
             // 
             // tabImage
@@ -93,7 +88,7 @@
             this.tabImage.Margin = new System.Windows.Forms.Padding(2);
             this.tabImage.Name = "tabImage";
             this.tabImage.Padding = new System.Windows.Forms.Padding(2);
-            this.tabImage.Size = new System.Drawing.Size(951, 744);
+            this.tabImage.Size = new System.Drawing.Size(951, 808);
             this.tabImage.TabIndex = 1;
             this.tabImage.Text = "BSE测试";
             this.tabImage.UseVisualStyleBackColor = true;
@@ -106,10 +101,10 @@
             "Low",
             "Medium",
             "High"});
-            this.ddlDwellTime.Location = new System.Drawing.Point(266, 16);
+            this.ddlDwellTime.Location = new System.Drawing.Point(266, 17);
             this.ddlDwellTime.Margin = new System.Windows.Forms.Padding(2);
             this.ddlDwellTime.Name = "ddlDwellTime";
-            this.ddlDwellTime.Size = new System.Drawing.Size(82, 20);
+            this.ddlDwellTime.Size = new System.Drawing.Size(82, 21);
             this.ddlDwellTime.TabIndex = 0;
             // 
             // groupBox2
@@ -120,11 +115,11 @@
             this.groupBox2.BackColor = System.Drawing.Color.White;
             this.groupBox2.Controls.Add(this.panel1);
             this.groupBox2.Controls.Add(this.btnClear);
-            this.groupBox2.Location = new System.Drawing.Point(6, 45);
+            this.groupBox2.Location = new System.Drawing.Point(6, 49);
             this.groupBox2.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox2.Name = "groupBox2";
             this.groupBox2.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBox2.Size = new System.Drawing.Size(938, 692);
+            this.groupBox2.Size = new System.Drawing.Size(938, 750);
             this.groupBox2.TabIndex = 13;
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "图像显示";
@@ -134,10 +129,10 @@
             this.panel1.AutoScroll = true;
             this.panel1.Controls.Add(this.pbImage);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.panel1.Location = new System.Drawing.Point(2, 16);
+            this.panel1.Location = new System.Drawing.Point(2, 15);
             this.panel1.Margin = new System.Windows.Forms.Padding(2);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(934, 674);
+            this.panel1.Size = new System.Drawing.Size(934, 733);
             this.panel1.TabIndex = 2;
             // 
             // pbImage
@@ -147,7 +142,7 @@
             this.pbImage.Location = new System.Drawing.Point(0, 0);
             this.pbImage.Margin = new System.Windows.Forms.Padding(2);
             this.pbImage.Name = "pbImage";
-            this.pbImage.Size = new System.Drawing.Size(934, 674);
+            this.pbImage.Size = new System.Drawing.Size(934, 733);
             this.pbImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pbImage.TabIndex = 0;
             this.pbImage.TabStop = false;
@@ -155,10 +150,10 @@
             // btnClear
             // 
             this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnClear.Location = new System.Drawing.Point(866, 77);
+            this.btnClear.Location = new System.Drawing.Point(866, 83);
             this.btnClear.Margin = new System.Windows.Forms.Padding(2);
             this.btnClear.Name = "btnClear";
-            this.btnClear.Size = new System.Drawing.Size(67, 50);
+            this.btnClear.Size = new System.Drawing.Size(67, 54);
             this.btnClear.TabIndex = 1;
             this.btnClear.Text = "Clear";
             this.btnClear.UseVisualStyleBackColor = true;
@@ -168,10 +163,10 @@
             // btnSaveImage
             // 
             this.btnSaveImage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnSaveImage.Location = new System.Drawing.Point(387, 8);
+            this.btnSaveImage.Location = new System.Drawing.Point(387, 9);
             this.btnSaveImage.Margin = new System.Windows.Forms.Padding(2);
             this.btnSaveImage.Name = "btnSaveImage";
-            this.btnSaveImage.Size = new System.Drawing.Size(67, 33);
+            this.btnSaveImage.Size = new System.Drawing.Size(67, 36);
             this.btnSaveImage.TabIndex = 4;
             this.btnSaveImage.Text = "保存图片";
             this.btnSaveImage.UseVisualStyleBackColor = true;
@@ -181,10 +176,10 @@
             // btnDisplay
             // 
             this.btnDisplay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnDisplay.Location = new System.Drawing.Point(593, 8);
+            this.btnDisplay.Location = new System.Drawing.Point(593, 9);
             this.btnDisplay.Margin = new System.Windows.Forms.Padding(2);
             this.btnDisplay.Name = "btnDisplay";
-            this.btnDisplay.Size = new System.Drawing.Size(133, 33);
+            this.btnDisplay.Size = new System.Drawing.Size(133, 36);
             this.btnDisplay.TabIndex = 5;
             this.btnDisplay.Text = "图像采集";
             this.btnDisplay.UseVisualStyleBackColor = true;
@@ -192,39 +187,39 @@
             // 
             // tbRHeight
             // 
-            this.tbRHeight.Location = new System.Drawing.Point(119, 15);
+            this.tbRHeight.Location = new System.Drawing.Point(119, 16);
             this.tbRHeight.Margin = new System.Windows.Forms.Padding(2);
             this.tbRHeight.Name = "tbRHeight";
-            this.tbRHeight.Size = new System.Drawing.Size(48, 21);
+            this.tbRHeight.Size = new System.Drawing.Size(48, 20);
             this.tbRHeight.TabIndex = 2;
-            this.tbRHeight.Text = "768";
+            this.tbRHeight.Text = "1024";
             // 
             // tbRWidth
             // 
-            this.tbRWidth.Location = new System.Drawing.Point(66, 15);
+            this.tbRWidth.Location = new System.Drawing.Point(66, 16);
             this.tbRWidth.Margin = new System.Windows.Forms.Padding(2);
             this.tbRWidth.Name = "tbRWidth";
-            this.tbRWidth.Size = new System.Drawing.Size(48, 21);
+            this.tbRWidth.Size = new System.Drawing.Size(48, 20);
             this.tbRWidth.TabIndex = 1;
-            this.tbRWidth.Text = "1024";
+            this.tbRWidth.Text = "1536";
             // 
             // lblDwellTime
             // 
             this.lblDwellTime.AutoSize = true;
-            this.lblDwellTime.Location = new System.Drawing.Point(189, 19);
+            this.lblDwellTime.Location = new System.Drawing.Point(189, 21);
             this.lblDwellTime.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lblDwellTime.Name = "lblDwellTime";
-            this.lblDwellTime.Size = new System.Drawing.Size(53, 12);
+            this.lblDwellTime.Size = new System.Drawing.Size(55, 13);
             this.lblDwellTime.TabIndex = 10;
             this.lblDwellTime.Text = "采集时间";
             // 
             // lblResolution
             // 
             this.lblResolution.AutoSize = true;
-            this.lblResolution.Location = new System.Drawing.Point(-3, 19);
+            this.lblResolution.Location = new System.Drawing.Point(-3, 21);
             this.lblResolution.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lblResolution.Name = "lblResolution";
-            this.lblResolution.Size = new System.Drawing.Size(41, 12);
+            this.lblResolution.Size = new System.Drawing.Size(43, 13);
             this.lblResolution.TabIndex = 10;
             this.lblResolution.Text = "分辨率";
             // 
@@ -245,7 +240,7 @@
             this.tabXRay.Margin = new System.Windows.Forms.Padding(2);
             this.tabXRay.Name = "tabXRay";
             this.tabXRay.Padding = new System.Windows.Forms.Padding(2);
-            this.tabXRay.Size = new System.Drawing.Size(951, 744);
+            this.tabXRay.Size = new System.Drawing.Size(951, 808);
             this.tabXRay.TabIndex = 0;
             this.tabXRay.Text = "X-Ray测试";
             this.tabXRay.UseVisualStyleBackColor = true;
@@ -256,47 +251,22 @@
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.groupBox1.BackColor = System.Drawing.Color.White;
-            this.groupBox1.Controls.Add(this.chartXRay);
-            this.groupBox1.Location = new System.Drawing.Point(6, 45);
+            this.groupBox1.Location = new System.Drawing.Point(6, 49);
             this.groupBox1.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox1.Name = "groupBox1";
             this.groupBox1.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBox1.Size = new System.Drawing.Size(819, 665);
+            this.groupBox1.Size = new System.Drawing.Size(819, 720);
             this.groupBox1.TabIndex = 16;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "图像显示";
             // 
-            // chartXRay
-            // 
-            this.chartXRay.BackImageAlignment = System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle.Center;
-            chartArea1.Name = "ChartArea1";
-            this.chartXRay.ChartAreas.Add(chartArea1);
-            this.chartXRay.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.chartXRay.Location = new System.Drawing.Point(2, 16);
-            this.chartXRay.Margin = new System.Windows.Forms.Padding(2);
-            this.chartXRay.Name = "chartXRay";
-            series1.ChartArea = "ChartArea1";
-            series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
-            series1.CustomProperties = "MaxPixelPointWidth=2000, PointWidth=0.1, PixelPointWidth=1";
-            series1.LabelBorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.NotSet;
-            series1.LabelBorderWidth = 0;
-            series1.MarkerSize = 1;
-            series1.Name = "Series1";
-            series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int64;
-            series1.YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int64;
-            this.chartXRay.Series.Add(series1);
-            this.chartXRay.Size = new System.Drawing.Size(815, 647);
-            this.chartXRay.SuppressExceptions = true;
-            this.chartXRay.TabIndex = 2;
-            this.chartXRay.Text = "chart2";
-            // 
             // btnClearData
             // 
             this.btnClearData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnClearData.Location = new System.Drawing.Point(702, 9);
+            this.btnClearData.Location = new System.Drawing.Point(702, 10);
             this.btnClearData.Margin = new System.Windows.Forms.Padding(2);
             this.btnClearData.Name = "btnClearData";
-            this.btnClearData.Size = new System.Drawing.Size(49, 33);
+            this.btnClearData.Size = new System.Drawing.Size(49, 36);
             this.btnClearData.TabIndex = 5;
             this.btnClearData.Text = "清空";
             this.btnClearData.UseVisualStyleBackColor = true;
@@ -305,10 +275,10 @@
             // btnAreaRay
             // 
             this.btnAreaRay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnAreaRay.Location = new System.Drawing.Point(425, 9);
+            this.btnAreaRay.Location = new System.Drawing.Point(425, 10);
             this.btnAreaRay.Margin = new System.Windows.Forms.Padding(2);
             this.btnAreaRay.Name = "btnAreaRay";
-            this.btnAreaRay.Size = new System.Drawing.Size(67, 33);
+            this.btnAreaRay.Size = new System.Drawing.Size(67, 36);
             this.btnAreaRay.TabIndex = 4;
             this.btnAreaRay.Text = "面积采集";
             this.btnAreaRay.UseVisualStyleBackColor = true;
@@ -317,10 +287,10 @@
             // btnPointXRay
             // 
             this.btnPointXRay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnPointXRay.Location = new System.Drawing.Point(595, 9);
+            this.btnPointXRay.Location = new System.Drawing.Point(595, 10);
             this.btnPointXRay.Margin = new System.Windows.Forms.Padding(2);
             this.btnPointXRay.Name = "btnPointXRay";
-            this.btnPointXRay.Size = new System.Drawing.Size(89, 33);
+            this.btnPointXRay.Size = new System.Drawing.Size(89, 36);
             this.btnPointXRay.TabIndex = 3;
             this.btnPointXRay.Text = "多点采集";
             this.btnPointXRay.UseVisualStyleBackColor = true;
@@ -329,10 +299,10 @@
             // btnEanalysis
             // 
             this.btnEanalysis.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnEanalysis.Location = new System.Drawing.Point(756, 9);
+            this.btnEanalysis.Location = new System.Drawing.Point(756, 10);
             this.btnEanalysis.Margin = new System.Windows.Forms.Padding(2);
             this.btnEanalysis.Name = "btnEanalysis";
-            this.btnEanalysis.Size = new System.Drawing.Size(67, 33);
+            this.btnEanalysis.Size = new System.Drawing.Size(67, 36);
             this.btnEanalysis.TabIndex = 6;
             this.btnEanalysis.Text = "元素分析";
             this.btnEanalysis.UseVisualStyleBackColor = true;
@@ -341,10 +311,10 @@
             // btnDisplayXRay
             // 
             this.btnDisplayXRay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnDisplayXRay.Location = new System.Drawing.Point(496, 9);
+            this.btnDisplayXRay.Location = new System.Drawing.Point(496, 10);
             this.btnDisplayXRay.Margin = new System.Windows.Forms.Padding(2);
             this.btnDisplayXRay.Name = "btnDisplayXRay";
-            this.btnDisplayXRay.Size = new System.Drawing.Size(95, 33);
+            this.btnDisplayXRay.Size = new System.Drawing.Size(95, 36);
             this.btnDisplayXRay.TabIndex = 2;
             this.btnDisplayXRay.Text = "默认点采集";
             this.btnDisplayXRay.UseVisualStyleBackColor = true;
@@ -353,20 +323,20 @@
             // lbXrayCount
             // 
             this.lbXrayCount.AutoSize = true;
-            this.lbXrayCount.Location = new System.Drawing.Point(260, 19);
+            this.lbXrayCount.Location = new System.Drawing.Point(260, 21);
             this.lbXrayCount.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lbXrayCount.Name = "lbXrayCount";
-            this.lbXrayCount.Size = new System.Drawing.Size(59, 12);
+            this.lbXrayCount.Size = new System.Drawing.Size(58, 13);
             this.lbXrayCount.TabIndex = 13;
             this.lbXrayCount.Text = "DropCount";
             // 
             // btnCollectionTime
             // 
             this.btnCollectionTime.Enabled = false;
-            this.btnCollectionTime.Location = new System.Drawing.Point(167, 15);
+            this.btnCollectionTime.Location = new System.Drawing.Point(167, 16);
             this.btnCollectionTime.Margin = new System.Windows.Forms.Padding(2);
             this.btnCollectionTime.Name = "btnCollectionTime";
-            this.btnCollectionTime.Size = new System.Drawing.Size(40, 21);
+            this.btnCollectionTime.Size = new System.Drawing.Size(40, 23);
             this.btnCollectionTime.TabIndex = 8;
             this.btnCollectionTime.Text = "Test";
             this.btnCollectionTime.UseVisualStyleBackColor = true;
@@ -375,43 +345,43 @@
             // 
             // tbCollectionTime
             // 
-            this.tbCollectionTime.Location = new System.Drawing.Point(76, 16);
+            this.tbCollectionTime.Location = new System.Drawing.Point(76, 17);
             this.tbCollectionTime.Margin = new System.Windows.Forms.Padding(2);
             this.tbCollectionTime.Name = "tbCollectionTime";
-            this.tbCollectionTime.Size = new System.Drawing.Size(63, 21);
+            this.tbCollectionTime.Size = new System.Drawing.Size(63, 20);
             this.tbCollectionTime.TabIndex = 1;
             this.tbCollectionTime.Text = "120";
             // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(143, 19);
+            this.label2.Location = new System.Drawing.Point(143, 21);
             this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(17, 12);
+            this.label2.Size = new System.Drawing.Size(20, 13);
             this.label2.TabIndex = 0;
             this.label2.Text = "ms";
             // 
             // lblCollectionTime
             // 
             this.lblCollectionTime.AutoSize = true;
-            this.lblCollectionTime.Location = new System.Drawing.Point(1, 19);
+            this.lblCollectionTime.Location = new System.Drawing.Point(1, 21);
             this.lblCollectionTime.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lblCollectionTime.Name = "lblCollectionTime";
-            this.lblCollectionTime.Size = new System.Drawing.Size(53, 12);
+            this.lblCollectionTime.Size = new System.Drawing.Size(55, 13);
             this.lblCollectionTime.TabIndex = 0;
             this.lblCollectionTime.Text = "采集时间";
             // 
             // ControllerSettingForm
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.White;
-            this.ClientSize = new System.Drawing.Size(959, 770);
+            this.ClientSize = new System.Drawing.Size(959, 834);
             this.Controls.Add(this.tabSetting);
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.Margin = new System.Windows.Forms.Padding(2);
-            this.MinimumSize = new System.Drawing.Size(639, 403);
+            this.MinimumSize = new System.Drawing.Size(639, 433);
             this.Name = "ControllerSettingForm";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "BSEAndXrayTest";
@@ -425,8 +395,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.pbImage)).EndInit();
             this.tabXRay.ResumeLayout(false);
             this.tabXRay.PerformLayout();
-            this.groupBox1.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.chartXRay)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -440,7 +408,6 @@
         private System.Windows.Forms.Button btnCollectionTime;
         private System.Windows.Forms.Label lbXrayCount;
         private System.Windows.Forms.GroupBox groupBox1;
-        private System.Windows.Forms.DataVisualization.Charting.Chart chartXRay;
         private System.Windows.Forms.Button btnDisplayXRay;
         private System.Windows.Forms.TabPage tabImage;
         private System.Windows.Forms.GroupBox groupBox2;
@@ -458,5 +425,7 @@
         private System.Windows.Forms.Button btnPointXRay;
         private System.Windows.Forms.Button btnClearData;
         private System.Windows.Forms.Button btnEanalysis;
+
+        private Control_XRayTable control_XRayTable1;
     }
 }

+ 64 - 41
OTSSysMgrApp/ControllerSettingForm.cs

@@ -11,6 +11,7 @@ using System.Collections.Generic;
 using OTSCLRINTERFACE;
 using OTSModelSharp.ServiceCenter;
 using System.Drawing.Drawing2D;
+using OTSPeriodicTable;
 
 namespace OTSSysMgrApp
 {
@@ -96,7 +97,7 @@ namespace OTSSysMgrApp
         #region 窗体中控件事件汇总
         private void btnClearXRay_Click(object sender, EventArgs e)
         {
-            chartXRay.Series.RemoveAt(0);
+            
         }
 
         private void btnCollectionTime_Click(object sender, EventArgs e)
@@ -142,10 +143,22 @@ namespace OTSSysMgrApp
 
             Control.CheckForIllegalCrossThreadCalls = false;
             ddlDwellTime.SelectedIndex = 0;
+
+            this.control_XRayTable1 = new Control_XRayTable();
+            this.control_XRayTable1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+            this.control_XRayTable1.Dock = System.Windows.Forms.DockStyle.None;
+            this.control_XRayTable1.List_ShowElementInfo = null;
+            this.control_XRayTable1.Location = new System.Drawing.Point(groupBox1.Location.X, groupBox1.Location.Y);
+            this.control_XRayTable1.Name = "control_XRayTable1";
+            this.control_XRayTable1.ShowAnalysisXray = true;
+            this.control_XRayTable1.Size = new System.Drawing.Size(groupBox1.Width-20, groupBox1.Height);
+            this.control_XRayTable1.TabIndex = 6;
+            this.control_XRayTable1.Visible = true;
             InitXRayData();
             int width = Convert.ToInt32(tbRWidth.Text);
             int height = Convert.ToInt32(tbRHeight.Text);
             m_EDSHardwareMgr = EDSController.GetEDSController(width, height, 5000,true,"");
+            groupBox1.Controls.Add(this.control_XRayTable1);
         }
 
         Thread ScanThread = null;
@@ -385,45 +398,56 @@ namespace OTSSysMgrApp
         }
 
 
-        public void chartData(int[] XData, uint[] YData)
+
+
+
+
+
+
+
+
+        
+        
+        
+        public void chartDataWithEle(uint[] YData, string elestr)
         {
-            //chartXRay = new Chart();
-            //背景
-            if (chartXRay.ChartAreas.Count == 0)
-            {
-                chartXRay.ChartAreas.Add(new ChartArea() { Name = "" });     //背景框
-            }
-            chartXRay.ChartAreas[0].Axes[0].MajorGrid.Enabled = false;       //X轴上网格
-            chartXRay.ChartAreas[0].Axes[1].MajorGrid.Enabled = false;      //y轴上网格
-            chartXRay.ChartAreas[0].Axes[0].MajorGrid.LineDashStyle = ChartDashStyle.Dash;   //网格类型 短横线
-            chartXRay.ChartAreas[0].Axes[0].MajorGrid.LineColor = Color.Gray;
-            chartXRay.ChartAreas[0].Axes[0].MajorTickMark.Enabled = false;                   //  x轴上突出的小点
-            chartXRay.ChartAreas[0].Axes[1].MajorTickMark.Enabled = false;                  //
-            chartXRay.ChartAreas[0].Axes[1].MajorGrid.LineWidth = 1;
-            //图表数据区,有多个重叠则循环添加
-            if (chartXRay.Series.Count == 0)
+            List<ShowElementInfo> list_showelementinfo = new List<ShowElementInfo>();
+            string[] ele = elestr.Split('\n');
+            for (int i = 0; i < ele.Length-1; i++)
             {
-                chartXRay.Series.Add(new Series() { Name = "" });
+                string[] inf = ele[i].Split(':');
+                ShowElementInfo ls_sei = new ShowElementInfo();
+                ls_sei.ElementName = inf[0];
+                ls_sei.Percentage = Convert.ToDouble(inf[1]);
+                ls_sei.dKF = Convert.ToDouble(CListPeriodic.GetPeriodicByEleName(ls_sei.ElementName).K_Peak);
+                double de_sx2 = 0;
+                if (CListPeriodic.GetPeriodicByEleName(ls_sei.ElementName).L_Peak == "" || CListPeriodic.GetPeriodicByEleName(ls_sei.ElementName).L_Peak == "-")
+                {
+                    de_sx2 = 0;
+                }
+                else
+                {
+                    de_sx2 = Convert.ToDouble(CListPeriodic.GetPeriodicByEleName(ls_sei.ElementName).L_Peak);
+                }
+                ls_sei.dLF = de_sx2;
+                list_showelementinfo.Add(ls_sei);
             }
-            chartXRay.Series[0].ChartType = SeriesChartType.Line;    //图类型(折线)
-            chartXRay.Series[0].Points.DataBindXY(XData, YData); //添加数据
-            chartXRay.Series[0].Label = "";
-            chartXRay.Series[0].LegendText = "";
-            //折线段配置
-            chartXRay.Series[0].Color = Color.Blue;               //线条颜色
-            chartXRay.Series[0].BorderWidth = 1;                 //线条粗细
-            chartXRay.Series[0].MarkerBorderColor = Color.Red;   //标记点边框颜色
-            chartXRay.Series[0].MarkerBorderWidth = 1;             //标记点边框大小
-            chartXRay.Series[0].MarkerColor = Color.Red;       //标记点中心颜色
-            chartXRay.Series[0].MarkerSize = 0;                 //标记点大小
-            //chartXRay.Series[0].BorderWidth = 500;
-            //另外
-            //饼图说明设置,这用来设置饼图每一块的信息显示在什么地方
-            chartXRay.Series[0]["PieLabelStyle"] = "Outside";//将文字移到外侧
-            chartXRay.Series[0]["PieLineColor"] = "Black";//绘制黑色的连线。
-                                                          //柱状图其他设置
-            chartXRay.Series[0]["DrawingStyle"] = "Emboss";   //设置柱状平面形状
-            chartXRay.Series[0]["PointWidth"] = "0.1"; //设置柱状大小
+
+            list_showelementinfo.Sort((p1, p2) => p2.Percentage.CompareTo(p1.Percentage));
+            
+            control_XRayTable1.SetXRayShowLineValue(YData, list_showelementinfo);
+
+            control_XRayTable1.List_ShowElementInfo = list_showelementinfo;
+
+
+            Invalidate();
+        }
+
+        public void chartData(int[] XData, uint[] YData)
+        {
+            control_XRayTable1.Visible = true;
+            control_XRayTable1.SetXRayShowLineValue(YData, null);
+            Invalidate();
         }
 
         #endregion
@@ -1041,7 +1065,6 @@ namespace OTSSysMgrApp
                 chartData(XData, a_XrayData);
                 //显示Xray计数
                 lbXrayCount.Text = nXrayCount.ToString();
-                chartXRay.Refresh();
                 
                 ConnectionState = false;
                 log.Info("Cleared successfully!");
@@ -1093,15 +1116,15 @@ namespace OTSSysMgrApp
                         {
                             log.Error("ControllerSettingForm_btnEanalysis_Click:--GetXRayElements()_Exception" + ex.Message.ToString());
                         }
-                        int[] XData = new int[2000];
+                        uint[] XData = new uint[2000];
                         uint nXrayCount = 0;
                         for (int i = 1; i <= 2000; i++)
                         {
-                            XData[i - 1] = i;
+                            XData[i - 1] = (uint)i;
                             nXrayCount += a_XrayData[i - 1];
                         }
                         //绑定数据源
-                        chartData(XData, a_XrayData);
+                        chartDataWithEle(a_XrayData, a_strResult);
                         //显示Xray计数
                         lbXrayCount.Text = nXrayCount.ToString();
                         //显示元素分析结果内容

+ 13 - 0
OTSSysMgrApp/OTSSysMgrApp.csproj

@@ -209,6 +209,10 @@
       <HintPath>..\OpenDll\Nlog\NLog.dll</HintPath>
       <Private>False</Private>
     </Reference>
+    <Reference Include="OTSCommon, Version=2.5.0.0, Culture=neutral, processorArchitecture=AMD64">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\Bin\x64\Debug\OTSCommon.dll</HintPath>
+    </Reference>
     <Reference Include="OTSMeasureApp, Version=3.0.0.0, Culture=neutral, processorArchitecture=AMD64">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\Bin\x64\Debug\OTSMeasureApp.exe</HintPath>
@@ -248,6 +252,12 @@
     <Compile Include="ControllerSettingForm.Designer.cs">
       <DependentUpon>ControllerSettingForm.cs</DependentUpon>
     </Compile>
+    <Compile Include="Control_XRayTable.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Control_XRayTable.designer.cs">
+      <DependentUpon>Control_XRayTable.cs</DependentUpon>
+    </Compile>
     <Compile Include="Language.cs" />
     <Compile Include="OTSSystemManagerForms.cs">
       <SubType>Form</SubType>
@@ -299,6 +309,9 @@
     <EmbeddedResource Include="ControllerSettingForm.resx">
       <DependentUpon>ControllerSettingForm.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Control_XRayTable.resx">
+      <DependentUpon>Control_XRayTable.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="OTSSystemManagerForms.resx">
       <DependentUpon>OTSSystemManagerForms.cs</DependentUpon>
     </EmbeddedResource>