瀏覽代碼

合并解决冲突

CXS 3 年之前
父節點
當前提交
bab90d6978

+ 74 - 9
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.cs

@@ -39,6 +39,14 @@ namespace OTSIncAReportGraph.Controls
         //进行选择的矩形范围
        public RectangleF Rect ;
 
+    }
+    public struct ParticleSegmentation
+    {
+        public Point StartPoint;
+        public bool IsParticleSegmentation;
+        public Point EndPoint;
+        public Particle ParticleData;
+
     }
     public enum RightButtonMenu
     { 
@@ -46,10 +54,10 @@ namespace OTSIncAReportGraph.Controls
       
        MoveSEMToParticle=1,
        CopyImage=2,
-       OriginalSplicing= 3,
+       OriginalSplicing= 3
        DeleteParticle=4,
-            CopyDatabase=5
-
+       CopyDatabase=5
+       ParticleSegmentation=6
     }
     /// <summary>
     /// 选择导出的图片是原图还是颗粒渲染后的图片
@@ -83,6 +91,7 @@ namespace OTSIncAReportGraph.Controls
         double ls_d_cz_height;
         #region 变量定义
         private SelectTool m_SelectTool;
+        private ParticleSegmentation m_ParticleSegmentation;
         //缩放的基数,临时变量
         private float m_Zoom_Base = 0;
 
@@ -297,6 +306,7 @@ namespace OTSIncAReportGraph.Controls
             m_frm_userprogress.SetProgressValueAndText(progress, message);
 
         }
+
         private void LoadUpdateDisplay()
         {
             ProgressBarUpdate(0, table["str1"].ToString());
@@ -328,7 +338,7 @@ namespace OTSIncAReportGraph.Controls
             {
                 ls_dp.SetPaintState(PaintState.NORMALPAINT);
                 DisplayParticle old_dp = ls_dp.Clone() as DisplayParticle;
-                ReportFun.m_original_list_baseobject.Add(old_dp);
+                ReportFun. m_original_list_baseobject.Add(old_dp);
             }
 
             //加载时将背景rect设置与整个窗体一边大小
@@ -342,7 +352,7 @@ namespace OTSIncAReportGraph.Controls
                     m_list_allDfield[i].Show_Rect.Y,
                     m_list_allDfield[i].Show_Rect.Width,
                     m_list_allDfield[i].Show_Rect.Height);
-                ReportFun.m_original_list_dfield.Add(df);
+               ReportFun. m_original_list_dfield.Add(df);
             }
 
 
@@ -658,7 +668,12 @@ namespace OTSIncAReportGraph.Controls
                 }
             }
             #endregion
-
+            #region //判断是否使用颗粒分割,是的话,那么这里就开始绘制------------------------
+            if (m_ParticleSegmentation.IsParticleSegmentation)
+            {
+                e.Graphics.DrawLine(new Pen(Color.Red), m_ParticleSegmentation.StartPoint.X, m_ParticleSegmentation.StartPoint.Y, m_ParticleSegmentation.EndPoint.X, m_ParticleSegmentation.EndPoint.Y);
+            }
+            #endregion
             #region 绘制网格线,帧图边框部份
             if (true == m_is_showgrid)
             {
@@ -867,6 +882,10 @@ namespace OTSIncAReportGraph.Controls
                   
                     m_SelectTool.StartPoint = e.Location;
                 }
+                else if (m_ParticleSegmentation.IsParticleSegmentation)
+                {
+                    m_ParticleSegmentation.StartPoint= e.Location;
+                }
                 else
                 {
                     bool ifClickOnParticle=false;
@@ -950,6 +969,13 @@ namespace OTSIncAReportGraph.Controls
                     }
                 }
             }
+            else if(m_ParticleSegmentation.IsParticleSegmentation)
+            {
+                if (e.Button == MouseButtons.Left)
+                {
+                    m_ParticleSegmentation.EndPoint = e.Location;
+                }
+            }
             else
             {
                 if (m_isDrag)
@@ -1132,6 +1158,25 @@ namespace OTSIncAReportGraph.Controls
                     m_SelectTool.IsSelecting = false;
 
                 }
+                else if(m_ParticleSegmentation.IsParticleSegmentation)
+                {
+                    m_ParticleSegmentation.EndPoint = e.Location;
+                    GraphicsPath ls_gpath = new GraphicsPath();
+                    //ls_gpath.AddLine(m_ParticleSegmentation.StartPoint.X, m_ParticleSegmentation.StartPoint.Y, m_ParticleSegmentation.EndPoint.X, m_ParticleSegmentation.EndPoint.Y);
+                    //m_ParticleSegmentation.IsParticleSegmentation = false;
+                    DialogResult res = MessageBox.Show("Is it ok?");
+                    if (res == DialogResult.OK)
+                    {
+                        foreach (BaseObject item in m_list_allDPart)
+                        {
+                            DisplayParticle dp = (DisplayParticle)item;
+                            if (ReportFun.WhetherInRange(dp, e.Location))
+                            {
+                                List<Segment> segments = dp.objParticleData.SegmentList;
+                            }
+                        }
+                    }
+                }
                 else
                 {
                     if (m_isDrag)
@@ -1205,6 +1250,10 @@ namespace OTSIncAReportGraph.Controls
 
                         CMenuStrip.Items[(int)RightButtonMenu.MoveSEMToParticle].Visible = true;
                         CMenuStrip.Items[(int)RightButtonMenu.MoveSEMToParticle].Tag = item;
+
+                        CMenuStrip.Items[(int)RightButtonMenu.ParticleSegmentation].Visible = true;
+                        DisplayParticle dp = (DisplayParticle)item;
+                        m_ParticleSegmentation.ParticleData = dp.objParticleData;
                     }
                     if (((DisplayParticle)item).IsSelect)
                     {
@@ -1232,7 +1281,7 @@ namespace OTSIncAReportGraph.Controls
                     CMenuStrip.Items[(int)RightButtonMenu.CopyImage].Visible = true;
                     CMenuStrip.Items[(int)RightButtonMenu.OriginalSplicing].Visible = true;
                     CMenuStrip.Items[(int)RightButtonMenu.MoveSEMToParticle].Visible = false;
-
+                    CMenuStrip.Items[(int)RightButtonMenu.ParticleSegmentation].Visible = false;
 
                 }
                       
@@ -1762,8 +1811,15 @@ namespace OTSIncAReportGraph.Controls
         {
             control_Ruler1.Visible = b_show;
         }
-
-  
+        /// <summary>
+        /// 颗粒分割
+        /// </summary>
+        public void Particle_Segmentation()
+        {
+            m_ParticleSegmentation.IsParticleSegmentation = true;
+            m_ParticleSegmentation.StartPoint = new Point();
+            m_ParticleSegmentation.EndPoint = new Point();
+        }
 
         /// <summary>
         /// 是否进行矩形多选操作
@@ -2075,7 +2131,16 @@ namespace OTSIncAReportGraph.Controls
             }
            
         }
+        int GetsIntersectionOfTheIntercepts(Point P1,Point P2,int y)
+        {
+            int x = (y - P1.Y * P2.X + P1.X * P2.Y) / (P2.Y - P1.Y);
+            return x;
+        }
 
+        private void ParticleSegmentation_Click(object sender, EventArgs e)
+        {
+            Particle_Segmentation();
+        }
       
     }
 }

+ 19 - 5
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.designer.cs

@@ -35,6 +35,7 @@
             this.toolStripMenuItem_copyimage = new System.Windows.Forms.ToolStripMenuItem();
             this.ExportoriginalspliceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.ToolStripMenuItemDelete_Particle = new System.Windows.Forms.ToolStripMenuItem();
+            this.ParticleSegmentation = new System.Windows.Forms.ToolStripMenuItem();
             this.CMenuStrip.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -46,7 +47,8 @@
             this.ToolStripMenuItem_movesempoint,
             this.toolStripMenuItem_copyimage,
             this.ExportoriginalspliceToolStripMenuItem,
-            this.ToolStripMenuItemDelete_Particle});
+            this.ToolStripMenuItemDelete_Particle,
+            this.ParticleSegmentation});
             this.CMenuStrip.Name = "contextMenuStrip1";
             this.CMenuStrip.Size = new System.Drawing.Size(219, 154);
             // 
@@ -54,7 +56,7 @@
             // 
             this.ToolStripMenuItem_selected.Image = global::OTSIncAReportApp.Properties.Resources.选择颗粒;
             this.ToolStripMenuItem_selected.Name = "ToolStripMenuItem_selected";
-            this.ToolStripMenuItem_selected.Size = new System.Drawing.Size(218, 30);
+            this.ToolStripMenuItem_selected.Size = new System.Drawing.Size(253, 30);
             this.ToolStripMenuItem_selected.Text = "选择颗粒";
             this.ToolStripMenuItem_selected.Click += new System.EventHandler(this.ToolStripMenuItem_selected_Click);
             // 
@@ -62,7 +64,7 @@
             // 
             this.ToolStripMenuItem_movesempoint.Image = global::OTSIncAReportApp.Properties.Resources.移动SEM到当前位置;
             this.ToolStripMenuItem_movesempoint.Name = "ToolStripMenuItem_movesempoint";
-            this.ToolStripMenuItem_movesempoint.Size = new System.Drawing.Size(218, 30);
+            this.ToolStripMenuItem_movesempoint.Size = new System.Drawing.Size(253, 30);
             this.ToolStripMenuItem_movesempoint.Text = "移动SEM至颗粒所在位置";
             this.ToolStripMenuItem_movesempoint.Click += new System.EventHandler(this.ToolStripMenuItem_movesempoint_Click);
             // 
@@ -70,7 +72,7 @@
             // 
             this.toolStripMenuItem_copyimage.Image = global::OTSIncAReportApp.Properties.Resources.复制图像;
             this.toolStripMenuItem_copyimage.Name = "toolStripMenuItem_copyimage";
-            this.toolStripMenuItem_copyimage.Size = new System.Drawing.Size(218, 30);
+            this.toolStripMenuItem_copyimage.Size = new System.Drawing.Size(253, 30);
             this.toolStripMenuItem_copyimage.Text = "导出原图拼接图";
             this.toolStripMenuItem_copyimage.Click += new System.EventHandler(this.toolStripMenuItem_copyimage_Click);
             // 
@@ -78,7 +80,7 @@
             // 
             this.ExportoriginalspliceToolStripMenuItem.Image = global::OTSIncAReportApp.Properties.Resources.复制图像;
             this.ExportoriginalspliceToolStripMenuItem.Name = "ExportoriginalspliceToolStripMenuItem";
-            this.ExportoriginalspliceToolStripMenuItem.Size = new System.Drawing.Size(218, 30);
+            this.ExportoriginalspliceToolStripMenuItem.Size = new System.Drawing.Size(253, 30);
             this.ExportoriginalspliceToolStripMenuItem.Text = "导出原图拼接分类图";
             this.ExportoriginalspliceToolStripMenuItem.Click += new System.EventHandler(this.ExportoriginalspliceToolStripMenuItem_Click);
             // 
@@ -89,6 +91,17 @@
             this.ToolStripMenuItemDelete_Particle.Text = "Delete particles";
             this.ToolStripMenuItemDelete_Particle.Click += new System.EventHandler(this.ToolStripMenuItemDelete_Particle_Click);
             // 
+            // ParticleSegmentation
+            // 
+
+
+
+
+            this.ParticleSegmentation.Name = "ParticleSegmentation";
+            this.ParticleSegmentation.Size = new System.Drawing.Size(253, 30);
+            this.ParticleSegmentation.Text = "分割颗粒";
+            this.ParticleSegmentation.Click += new System.EventHandler(this.ParticleSegmentation_Click);
+            // 
             // Control_DrawDistrbutionImageAndBSE
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -112,5 +125,6 @@
         private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_copyimage;
         private System.Windows.Forms.ToolStripMenuItem ExportoriginalspliceToolStripMenuItem;
         private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemDelete_Particle;
+        private System.Windows.Forms.ToolStripMenuItem ParticleSegmentation;
     }
 }

+ 1 - 1
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_XRayTable.cs

@@ -430,7 +430,7 @@ namespace OTSIncAReportGraph.Controls
         /// </summary>
         /// <param name="g"></param>
         protected void DrawXrayImage(Graphics g)
-        {
+        { 
 
             #region //绘制标尺表盘部份----------------------------------------------------------------------------------------------
 

+ 1 - 0
OTSIncAReportApp/1-UI/OTSRibbon/OTSRibbonFun.cs

@@ -41,6 +41,7 @@ namespace OTSIncAReportApp.OTSRibbon
             m_ReportApp.rbFrame.Enabled = bRibState;            //帧图边框,ribbon中
             m_ReportApp.rbStaff.Enabled = bRibState;            //标尺,ribbon中
             m_ReportApp.rbRenew.Enabled = bRibState;            //恢复,ribbon中
+            m_ReportApp.rbParticleSegmentation.Enabled = bRibState;            //颗粒分割,ribbon中
         }
 
         /// <summary>

+ 88 - 70
OTSIncAReportApp/1-UI/frmReportApp.Designer.cs

@@ -31,21 +31,21 @@
             this.components = new System.ComponentModel.Container();
             System.Windows.Forms.RibbonPanel ribbonPanel1;
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmReportApp));
-            OTS.WinFormsUI.Docking.DockPanelSkin dockPanelSkin2 = new OTS.WinFormsUI.Docking.DockPanelSkin();
-            OTS.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin2 = new OTS.WinFormsUI.Docking.AutoHideStripSkin();
-            OTS.WinFormsUI.Docking.DockPanelGradient dockPanelGradient4 = new OTS.WinFormsUI.Docking.DockPanelGradient();
-            OTS.WinFormsUI.Docking.TabGradient tabGradient8 = new OTS.WinFormsUI.Docking.TabGradient();
-            OTS.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin2 = new OTS.WinFormsUI.Docking.DockPaneStripSkin();
-            OTS.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient2 = new OTS.WinFormsUI.Docking.DockPaneStripGradient();
-            OTS.WinFormsUI.Docking.TabGradient tabGradient9 = new OTS.WinFormsUI.Docking.TabGradient();
-            OTS.WinFormsUI.Docking.DockPanelGradient dockPanelGradient5 = new OTS.WinFormsUI.Docking.DockPanelGradient();
-            OTS.WinFormsUI.Docking.TabGradient tabGradient10 = new OTS.WinFormsUI.Docking.TabGradient();
-            OTS.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient2 = new OTS.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
-            OTS.WinFormsUI.Docking.TabGradient tabGradient11 = new OTS.WinFormsUI.Docking.TabGradient();
-            OTS.WinFormsUI.Docking.TabGradient tabGradient12 = new OTS.WinFormsUI.Docking.TabGradient();
-            OTS.WinFormsUI.Docking.DockPanelGradient dockPanelGradient6 = new OTS.WinFormsUI.Docking.DockPanelGradient();
-            OTS.WinFormsUI.Docking.TabGradient tabGradient13 = new OTS.WinFormsUI.Docking.TabGradient();
-            OTS.WinFormsUI.Docking.TabGradient tabGradient14 = new OTS.WinFormsUI.Docking.TabGradient();
+            OTS.WinFormsUI.Docking.DockPanelSkin dockPanelSkin1 = new OTS.WinFormsUI.Docking.DockPanelSkin();
+            OTS.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin1 = new OTS.WinFormsUI.Docking.AutoHideStripSkin();
+            OTS.WinFormsUI.Docking.DockPanelGradient dockPanelGradient1 = new OTS.WinFormsUI.Docking.DockPanelGradient();
+            OTS.WinFormsUI.Docking.TabGradient tabGradient1 = new OTS.WinFormsUI.Docking.TabGradient();
+            OTS.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin1 = new OTS.WinFormsUI.Docking.DockPaneStripSkin();
+            OTS.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient1 = new OTS.WinFormsUI.Docking.DockPaneStripGradient();
+            OTS.WinFormsUI.Docking.TabGradient tabGradient2 = new OTS.WinFormsUI.Docking.TabGradient();
+            OTS.WinFormsUI.Docking.DockPanelGradient dockPanelGradient2 = new OTS.WinFormsUI.Docking.DockPanelGradient();
+            OTS.WinFormsUI.Docking.TabGradient tabGradient3 = new OTS.WinFormsUI.Docking.TabGradient();
+            OTS.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient1 = new OTS.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
+            OTS.WinFormsUI.Docking.TabGradient tabGradient4 = new OTS.WinFormsUI.Docking.TabGradient();
+            OTS.WinFormsUI.Docking.TabGradient tabGradient5 = new OTS.WinFormsUI.Docking.TabGradient();
+            OTS.WinFormsUI.Docking.DockPanelGradient dockPanelGradient3 = new OTS.WinFormsUI.Docking.DockPanelGradient();
+            OTS.WinFormsUI.Docking.TabGradient tabGradient6 = new OTS.WinFormsUI.Docking.TabGradient();
+            OTS.WinFormsUI.Docking.TabGradient tabGradient7 = new OTS.WinFormsUI.Docking.TabGradient();
             this.rbSave = new System.Windows.Forms.RibbonButton();
             this.rbSaveAs = new System.Windows.Forms.RibbonButton();
             this.rbOut = new System.Windows.Forms.RibbonButton();
@@ -68,6 +68,7 @@
             this.rbCircular = new System.Windows.Forms.RibbonButton();
             this.rbRectangle = new System.Windows.Forms.RibbonButton();
             this.rbCancel = new System.Windows.Forms.RibbonButton();
+            this.rbParticleSegmentation = new System.Windows.Forms.RibbonButton();
             this.rbMenu = new System.Windows.Forms.RibbonTab();
             this.ribbonPanel2 = new System.Windows.Forms.RibbonPanel();
             this.rbFrame = new System.Windows.Forms.RibbonButton();
@@ -185,7 +186,7 @@
             // 
             this.ribbon1.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.ribbon1.Location = new System.Drawing.Point(0, 0);
-            this.ribbon1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ribbon1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.ribbon1.Minimized = false;
             this.ribbon1.Name = "ribbon1";
             // 
@@ -213,7 +214,7 @@
             this.ribbon1.QuickAcessToolbar.ToolTip = null;
             this.ribbon1.QuickAcessToolbar.ToolTipImage = null;
             this.ribbon1.QuickAcessToolbar.ToolTipTitle = null;
-            this.ribbon1.Size = new System.Drawing.Size(1276, 130);
+            this.ribbon1.Size = new System.Drawing.Size(1701, 130);
             this.ribbon1.TabIndex = 0;
             this.ribbon1.Tabs.Add(this.ribbonTab1);
             this.ribbon1.Tabs.Add(this.rbMenu);
@@ -357,6 +358,7 @@
             this.rbChoiceTools.Items.Add(this.rbCircular);
             this.rbChoiceTools.Items.Add(this.rbRectangle);
             this.rbChoiceTools.Items.Add(this.rbCancel);
+            this.rbChoiceTools.Items.Add(this.rbParticleSegmentation);
             this.rbChoiceTools.Tag = null;
             this.rbChoiceTools.Text = "选择工具";
             // 
@@ -422,6 +424,21 @@
             // 
             // rbMenu
             // 
+            this.rbParticleSegmentation.AltKey = null;
+            this.rbParticleSegmentation.DropDownArrowDirection = System.Windows.Forms.RibbonArrowDirection.Down;
+            this.rbParticleSegmentation.DropDownArrowSize = new System.Drawing.Size(5, 3);
+            this.rbParticleSegmentation.Image = global::OTSIncAReportApp.Properties.Resources.cut;
+            this.rbParticleSegmentation.SmallImage = global::OTSIncAReportApp.Properties.Resources.cut16;
+            this.rbParticleSegmentation.Style = System.Windows.Forms.RibbonButtonStyle.Normal;
+            this.rbParticleSegmentation.Tag = "rbParticleSegmentation";
+            this.rbParticleSegmentation.Text = "颗粒分割";
+            this.rbParticleSegmentation.ToolTip = "rbParticleSegmentation";
+            this.rbParticleSegmentation.ToolTipImage = null;
+            this.rbParticleSegmentation.ToolTipTitle = null;
+            this.rbParticleSegmentation.Click += new System.EventHandler(this.rbParticleSegmentation_Click);
+            // 
+            // rbMenu
+            // 
             this.rbMenu.Panels.Add(this.ribbonPanel2);
             this.rbMenu.Panels.Add(this.ribbonPanelOthers);
             this.rbMenu.Tag = null;
@@ -537,11 +554,11 @@
             this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.RSGrayVal,
             this.mouseMatter});
-            this.statusStrip1.Location = new System.Drawing.Point(0, 666);
+            this.statusStrip1.Location = new System.Drawing.Point(0, 835);
             this.statusStrip1.Name = "statusStrip1";
-            this.statusStrip1.Padding = new System.Windows.Forms.Padding(9, 0, 2, 0);
+            this.statusStrip1.Padding = new System.Windows.Forms.Padding(12, 0, 3, 0);
             this.statusStrip1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
-            this.statusStrip1.Size = new System.Drawing.Size(1276, 26);
+            this.statusStrip1.Size = new System.Drawing.Size(1701, 30);
             this.statusStrip1.TabIndex = 4;
             this.statusStrip1.Text = "statusStrip1";
             // 
@@ -549,14 +566,14 @@
             // 
             this.RSGrayVal.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
             this.RSGrayVal.Name = "RSGrayVal";
-            this.RSGrayVal.Size = new System.Drawing.Size(48, 21);
+            this.RSGrayVal.Size = new System.Drawing.Size(58, 24);
             this.RSGrayVal.Text = "灰度值";
             // 
             // mouseMatter
             // 
             this.mouseMatter.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
             this.mouseMatter.Name = "mouseMatter";
-            this.mouseMatter.Size = new System.Drawing.Size(84, 21);
+            this.mouseMatter.Size = new System.Drawing.Size(103, 24);
             this.mouseMatter.Text = "鼠标点的物质";
             // 
             // DockWindowPanel
@@ -565,53 +582,53 @@
             this.DockWindowPanel.Dock = System.Windows.Forms.DockStyle.Fill;
             this.DockWindowPanel.DockBackColor = System.Drawing.SystemColors.Control;
             this.DockWindowPanel.Location = new System.Drawing.Point(0, 130);
-            this.DockWindowPanel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.DockWindowPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.DockWindowPanel.Name = "DockWindowPanel";
-            this.DockWindowPanel.Size = new System.Drawing.Size(1276, 536);
-            dockPanelGradient4.EndColor = System.Drawing.SystemColors.ControlLight;
-            dockPanelGradient4.StartColor = System.Drawing.SystemColors.ControlLight;
-            autoHideStripSkin2.DockStripGradient = dockPanelGradient4;
-            tabGradient8.EndColor = System.Drawing.SystemColors.Control;
-            tabGradient8.StartColor = System.Drawing.SystemColors.Control;
-            tabGradient8.TextColor = System.Drawing.SystemColors.ControlDarkDark;
-            autoHideStripSkin2.TabGradient = tabGradient8;
-            dockPanelSkin2.AutoHideStripSkin = autoHideStripSkin2;
-            tabGradient9.EndColor = System.Drawing.SystemColors.ControlLightLight;
-            tabGradient9.StartColor = System.Drawing.SystemColors.ControlLightLight;
-            tabGradient9.TextColor = System.Drawing.SystemColors.ControlText;
-            dockPaneStripGradient2.ActiveTabGradient = tabGradient9;
-            dockPanelGradient5.EndColor = System.Drawing.SystemColors.Control;
-            dockPanelGradient5.StartColor = System.Drawing.SystemColors.Control;
-            dockPaneStripGradient2.DockStripGradient = dockPanelGradient5;
-            tabGradient10.EndColor = System.Drawing.SystemColors.ControlLight;
-            tabGradient10.StartColor = System.Drawing.SystemColors.ControlLight;
-            tabGradient10.TextColor = System.Drawing.SystemColors.ControlText;
-            dockPaneStripGradient2.InactiveTabGradient = tabGradient10;
-            dockPaneStripSkin2.DocumentGradient = dockPaneStripGradient2;
-            tabGradient11.EndColor = System.Drawing.SystemColors.ActiveCaption;
-            tabGradient11.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
-            tabGradient11.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
-            tabGradient11.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
-            dockPaneStripToolWindowGradient2.ActiveCaptionGradient = tabGradient11;
-            tabGradient12.EndColor = System.Drawing.SystemColors.Control;
-            tabGradient12.StartColor = System.Drawing.SystemColors.Control;
-            tabGradient12.TextColor = System.Drawing.SystemColors.ControlText;
-            dockPaneStripToolWindowGradient2.ActiveTabGradient = tabGradient12;
-            dockPanelGradient6.EndColor = System.Drawing.SystemColors.ControlLight;
-            dockPanelGradient6.StartColor = System.Drawing.SystemColors.ControlLight;
-            dockPaneStripToolWindowGradient2.DockStripGradient = dockPanelGradient6;
-            tabGradient13.EndColor = System.Drawing.SystemColors.GradientInactiveCaption;
-            tabGradient13.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
-            tabGradient13.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
-            tabGradient13.TextColor = System.Drawing.SystemColors.ControlText;
-            dockPaneStripToolWindowGradient2.InactiveCaptionGradient = tabGradient13;
-            tabGradient14.EndColor = System.Drawing.Color.Transparent;
-            tabGradient14.StartColor = System.Drawing.Color.Transparent;
-            tabGradient14.TextColor = System.Drawing.SystemColors.ControlDarkDark;
-            dockPaneStripToolWindowGradient2.InactiveTabGradient = tabGradient14;
-            dockPaneStripSkin2.ToolWindowGradient = dockPaneStripToolWindowGradient2;
-            dockPanelSkin2.DockPaneStripSkin = dockPaneStripSkin2;
-            this.DockWindowPanel.Skin = dockPanelSkin2;
+            this.DockWindowPanel.Size = new System.Drawing.Size(1701, 705);
+            dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
+            dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
+            autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
+            tabGradient1.EndColor = System.Drawing.SystemColors.Control;
+            tabGradient1.StartColor = System.Drawing.SystemColors.Control;
+            tabGradient1.TextColor = System.Drawing.SystemColors.ControlDarkDark;
+            autoHideStripSkin1.TabGradient = tabGradient1;
+            dockPanelSkin1.AutoHideStripSkin = autoHideStripSkin1;
+            tabGradient2.EndColor = System.Drawing.SystemColors.ControlLightLight;
+            tabGradient2.StartColor = System.Drawing.SystemColors.ControlLightLight;
+            tabGradient2.TextColor = System.Drawing.SystemColors.ControlText;
+            dockPaneStripGradient1.ActiveTabGradient = tabGradient2;
+            dockPanelGradient2.EndColor = System.Drawing.SystemColors.Control;
+            dockPanelGradient2.StartColor = System.Drawing.SystemColors.Control;
+            dockPaneStripGradient1.DockStripGradient = dockPanelGradient2;
+            tabGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
+            tabGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
+            tabGradient3.TextColor = System.Drawing.SystemColors.ControlText;
+            dockPaneStripGradient1.InactiveTabGradient = tabGradient3;
+            dockPaneStripSkin1.DocumentGradient = dockPaneStripGradient1;
+            tabGradient4.EndColor = System.Drawing.SystemColors.ActiveCaption;
+            tabGradient4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
+            tabGradient4.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
+            tabGradient4.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
+            dockPaneStripToolWindowGradient1.ActiveCaptionGradient = tabGradient4;
+            tabGradient5.EndColor = System.Drawing.SystemColors.Control;
+            tabGradient5.StartColor = System.Drawing.SystemColors.Control;
+            tabGradient5.TextColor = System.Drawing.SystemColors.ControlText;
+            dockPaneStripToolWindowGradient1.ActiveTabGradient = tabGradient5;
+            dockPanelGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
+            dockPanelGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
+            dockPaneStripToolWindowGradient1.DockStripGradient = dockPanelGradient3;
+            tabGradient6.EndColor = System.Drawing.SystemColors.GradientInactiveCaption;
+            tabGradient6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
+            tabGradient6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
+            tabGradient6.TextColor = System.Drawing.SystemColors.ControlText;
+            dockPaneStripToolWindowGradient1.InactiveCaptionGradient = tabGradient6;
+            tabGradient7.EndColor = System.Drawing.Color.Transparent;
+            tabGradient7.StartColor = System.Drawing.Color.Transparent;
+            tabGradient7.TextColor = System.Drawing.SystemColors.ControlDarkDark;
+            dockPaneStripToolWindowGradient1.InactiveTabGradient = tabGradient7;
+            dockPaneStripSkin1.ToolWindowGradient = dockPaneStripToolWindowGradient1;
+            dockPanelSkin1.DockPaneStripSkin = dockPaneStripSkin1;
+            this.DockWindowPanel.Skin = dockPanelSkin1;
             this.DockWindowPanel.TabIndex = 5;
             // 
             // ribbonOrbMenuItem5
@@ -675,13 +692,13 @@
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1276, 692);
+            this.ClientSize = new System.Drawing.Size(1701, 865);
             this.Controls.Add(this.DockWindowPanel);
             this.Controls.Add(this.statusStrip1);
             this.Controls.Add(this.ribbon1);
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.IsMdiContainer = true;
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.Name = "frmReportApp";
             this.Text = "OTSReportApp";
             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
@@ -725,6 +742,7 @@
         public System.Windows.Forms.RibbonButton rbCircular;
         public System.Windows.Forms.RibbonButton rbRectangle;
         public System.Windows.Forms.RibbonButton rbCancel;
+        public System.Windows.Forms.RibbonButton rbParticleSegmentation;
         public System.Windows.Forms.RibbonPanel rbChoiceTools;
         //public System.Windows.Forms.RibbonOrbMenuItem dpbNew;
         public System.Windows.Forms.RibbonOrbMenuItem dpbOpen;

+ 27 - 1
OTSIncAReportApp/1-UI/frmReportApp.cs

@@ -306,6 +306,7 @@ namespace OTSIncAReportApp
             m_ChartsWindow = new frmCharts(this);
             //grid表格窗体
             m_TablesWindow = new frmTables(this);
+            
 
            
             SetTag();
@@ -1154,6 +1155,31 @@ namespace OTSIncAReportApp
                 MessageBox.Show("Backup failed");
             }
         }
-    }
+        private void rbParticleSegmentation_Click(object sender, EventArgs e)
+        {
+            int tabIndex = (int)(m_conditionChoose.tabIndex);
+
+            switch (tabIndex)
+            {
+                case (int)DisplayPicutureType.AnalyzeImg:
+
+                    int imgDisType = m_conditionChoose.m_SourceGridData.GetComboDownListIndexByItemName(OTS_REPORT_PROP_GRID_ITEMS.IMAGE_DISPLAY_TYPE);
+                    if (imgDisType == 0)
+                    {
+                        if (im_Control_DrawDistrbutionImageAndBSE != null)
+                        {
+                            //分布图
+                            im_Control_DrawDistrbutionImageAndBSE.Particle_Segmentation();
+                        }
+                    }
+                    break;
+                case (int)DisplayPicutureType.AnalyzeDataTable:
+                    break;
+                case (int)DisplayPicutureType.AnalyzeDataChart:
+                    break;
+                default:
+                    break;
+            }
+        }    }
 }
 

+ 0 - 6
OTSIncAReportApp/1-UI/frmReportApp.resx

@@ -167,12 +167,6 @@
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
         JQAAFiUBSVIk8AAAABNJREFUOE9jGAWjYBSMAjBgYAAABBAAAadEfGMAAAAASUVORK5CYII=
-</value>
-  </data>
-  <data name="rbOpen.SmallImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
-        JQAAFiUBSVIk8AAAABNJREFUOE9jGAWjYBSMAjBgYAAABBAAAadEfGMAAAAASUVORK5CYII=
 </value>
   </data>
   <data name="ribbonButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

+ 1 - 0
OTSIncAReportApp/OTSIncAReportApp.csproj

@@ -1289,6 +1289,7 @@
     <EmbeddedResource Include="Resources\rhombohedral.gif" />
     <EmbeddedResource Include="Resources\teragonal.gif" />
     <EmbeddedResource Include="Resources\Cancel.png" />
+    <None Include="Resources\cut.png" />
     <Content Include="Resources\保存.png" />
     <Content Include="Resources\保存16.png" />
     <Content Include="Resources\全图匹配.png" />

+ 10 - 0
OTSIncAReportApp/Properties/Resources.Designer.cs

@@ -310,6 +310,16 @@ namespace OTSIncAReportApp.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap cut {
+            get {
+                object obj = ResourceManager.GetObject("cut", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 3 - 0
OTSIncAReportApp/Properties/Resources.resx

@@ -40974,4 +40974,7 @@
   <data name="导出所有数据到EXCEL321" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\导出所有数据到EXCEL32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="cut" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\cut.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>