Browse Source

右键悬停显示样品结果位置
langguage文件优化

cxs 1 year ago
parent
commit
71fd4fa59a

+ 1 - 0
Bin/x64/Debug/Resources/XMLData/AppResource_EN.xml

@@ -903,6 +903,7 @@
 	  <Control name="另存选择颗粒ToolStripMenuItem" text="SaveAs" />
 	  <Control name="ToolStripMenuItem_movesempoint" text="Move SEM to the Particle Horizon Position" />
 	  <Control name="toolStripMenuItem_copyimage" text="Duplicate image" />
+	  <Control name="toolStripMenuItem_DeleteParticles" text="DeleteParticles"/>
 	  <Control name="str1" text="Start loading distribution map information" />
 	  <Control name="str2" text="Loading completed" />
 	  <Control name="str3" text="SEM location:" />

+ 1 - 0
Bin/x64/Debug/Resources/XMLData/AppResource_ZH.xml

@@ -886,6 +886,7 @@
           <Control name="ToolStripMenuItem_delete" text="排除这些颗粒" />
 	  <Control name="另存选择颗粒ToolStripMenuItem" text="另存为" />
 	  <Control name="ToolStripMenuItem_movesempoin MenuItem" text="导出原图拼接分类图"/>
+	  <Control name="toolStripMenuItem_DeleteParticles" text="删除颗粒"/>
 	  <Control name="str1" text="开始加载分布图信息" />
 	  <Control name="str2" text="已完成加载" />
 	  <Control name="str3" text="SEM位置:" />

+ 0 - 1
OTSCommon/Language.cs

@@ -83,7 +83,6 @@ namespace OTSCommon
                     //            contextMenuStrip.Items[j].Text = (string)table[contextMenuStrip.Items[j].Name.ToLower()];
                     //    }
                     //}
-
                     if(fieldInfo[i].FieldType.Name == "ToolStripMenuItem")
                     {
                         ToolStripMenuItem toolStripMenuItem=(ToolStripMenuItem)fieldInfo[i].GetValue(form);

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

@@ -12,6 +12,7 @@ using OTSIncAReportMailInterface;
 using OTSPeriodicTable;
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
@@ -196,7 +197,7 @@ namespace OTSIncAReportGraph.Controls
         public Frm_UserProgress m_frm_userprogress;
 
 
-
+        Hashtable resTable;
 
 
         OTSIncAReportApp.frmReportApp m_ReportApp;
@@ -264,6 +265,9 @@ namespace OTSIncAReportGraph.Controls
             this.Controls.Add(this.control_XRayTable1);
             this.Controls.Add(this.control_Ruler1);
 
+            Language language = new Language(this);
+            resTable = language.GetNameTable(this.Name.ToString());
+
         }
         private void ProgressBarUpdate(int progress, string message)
         {

+ 1 - 1
OTSIncAReportApp/1-UI/OTSTreeViewData/OTSTreeViewData.cs

@@ -62,7 +62,7 @@ namespace OTSIncAReportApp.OTSDataMgrFunction
                         string SampleName = ResultFileList[i].anotherFileName;
                         TreeNode node = new TreeNode();
                         node.Text = SampleName;
-
+                        node.Tag = ResultFileList[i].FilePath.ToString();
                         //将获取到的测量结果名称,添加到树控件上
                         m_RstWindow.treeView1.Nodes.Add(node);
                         node.NodeFont = new Font("宋体", 10, FontStyle.Regular);

+ 12 - 10
OTSIncAReportApp/1-UI/frmMeasureRstMgr.Designer.cs

@@ -32,11 +32,11 @@
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMeasureRstMgr));
             this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
             this.计算边界颗粒合成ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.ToolStripMenuItem_Zeroelementprocess = new System.Windows.Forms.ToolStripMenuItem();
             this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
             this.AddSample = new System.Windows.Forms.ToolStripMenuItem();
             this.treeView1 = new System.Windows.Forms.TreeView();
             this.button1 = new System.Windows.Forms.Button();
-            this.ToolStripMenuItem_Zeroelementprocess = new System.Windows.Forms.ToolStripMenuItem();
             this.contextMenuStrip1.SuspendLayout();
             this.contextMenuStrip2.SuspendLayout();
             this.SuspendLayout();
@@ -48,15 +48,22 @@
             this.计算边界颗粒合成ToolStripMenuItem,
             this.ToolStripMenuItem_Zeroelementprocess});
             this.contextMenuStrip1.Name = "contextMenuStrip1";
-            this.contextMenuStrip1.Size = new System.Drawing.Size(181, 70);
+            this.contextMenuStrip1.Size = new System.Drawing.Size(173, 48);
             // 
             // 计算边界颗粒合成ToolStripMenuItem
             // 
             this.计算边界颗粒合成ToolStripMenuItem.Name = "计算边界颗粒合成ToolStripMenuItem";
-            this.计算边界颗粒合成ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+            this.计算边界颗粒合成ToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
             this.计算边界颗粒合成ToolStripMenuItem.Text = "计算边界颗粒合成";
             this.计算边界颗粒合成ToolStripMenuItem.Click += new System.EventHandler(this.计算边界颗粒合成ToolStripMenuItem_Click);
             // 
+            // ToolStripMenuItem_Zeroelementprocess
+            // 
+            this.ToolStripMenuItem_Zeroelementprocess.Name = "ToolStripMenuItem_Zeroelementprocess";
+            this.ToolStripMenuItem_Zeroelementprocess.Size = new System.Drawing.Size(172, 22);
+            this.ToolStripMenuItem_Zeroelementprocess.Text = "零元素归一化";
+            this.ToolStripMenuItem_Zeroelementprocess.Click += new System.EventHandler(this.ToolStripMenuItem_Zeroelementprocess_Click);
+            // 
             // contextMenuStrip2
             // 
             this.contextMenuStrip2.ImageScalingSize = new System.Drawing.Size(24, 24);
@@ -84,11 +91,13 @@
             this.treeView1.Location = new System.Drawing.Point(0, 25);
             this.treeView1.Name = "treeView1";
             this.treeView1.ShowLines = false;
+            this.treeView1.ShowNodeToolTips = true;
             this.treeView1.ShowPlusMinus = false;
             this.treeView1.Size = new System.Drawing.Size(407, 677);
             this.treeView1.TabIndex = 6;
             this.treeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterCheck);
             this.treeView1.DrawNode += new System.Windows.Forms.DrawTreeNodeEventHandler(this.treeView1_DrawNode);
+            this.treeView1.NodeMouseHover += new System.Windows.Forms.TreeNodeMouseHoverEventHandler(this.treeView1_NodeMouseHover);
             this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
             this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.TreeView1_NodeMouseClick);
             // 
@@ -104,13 +113,6 @@
             this.button1.Visible = false;
             this.button1.Click += new System.EventHandler(this.button1_Click);
             // 
-            // ToolStripMenuItem_Zeroelementprocess
-            // 
-            this.ToolStripMenuItem_Zeroelementprocess.Name = "ToolStripMenuItem_Zeroelementprocess";
-            this.ToolStripMenuItem_Zeroelementprocess.Size = new System.Drawing.Size(180, 22);
-            this.ToolStripMenuItem_Zeroelementprocess.Text = "零元素归一化";
-            this.ToolStripMenuItem_Zeroelementprocess.Click += new System.EventHandler(this.ToolStripMenuItem_Zeroelementprocess_Click);
-            // 
             // frmMeasureRstMgr
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

+ 5 - 0
OTSIncAReportApp/1-UI/frmMeasureRstMgr.cs

@@ -821,5 +821,10 @@ namespace OTSIncAReportApp
             }
             return true;
         }
+
+        private void treeView1_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
+        {
+            e.Node.ToolTipText = e.Node.Tag.ToString();
+        }
     }
 }

+ 26 - 16
OTSIncAReportApp/2-CommonFunction/CommonClass/Language.cs

@@ -75,16 +75,21 @@ namespace OTSIncAReportApp.SysMgrTools
                 for (int i = 0; i < fieldInfo.Length; i++)
                 {
 
-                    if (fieldInfo[i].FieldType.Name == "ContextMenuStrip")
+                    //if (fieldInfo[i].FieldType.Name == "ContextMenuStrip")
+                    //{
+                    //    ContextMenuStrip contextMenuStrip = (ContextMenuStrip)fieldInfo[i].GetValue(form);
+                    //    for (int j = 0; j < contextMenuStrip.Items.Count; j++)
+                    //    {
+                    //        if (table.Contains(contextMenuStrip.Items[j].Name.ToLower()))
+                    //            contextMenuStrip.Items[j].Text = (string)table[contextMenuStrip.Items[j].Name.ToLower()];
+                    //    }
+                    //}
+                    if (fieldInfo[i].FieldType.Name == "ToolStripMenuItem")
                     {
-                        ContextMenuStrip contextMenuStrip = (ContextMenuStrip)fieldInfo[i].GetValue(form);
-                        for (int j = 0; j < contextMenuStrip.Items.Count; j++)
-                        {
-                            if (table.Contains(contextMenuStrip.Items[j].Name.ToLower()))
-                                contextMenuStrip.Items[j].Text = (string)table[contextMenuStrip.Items[j].Name.ToLower()];
-                        }
+                        ToolStripMenuItem toolStripMenuItem = (ToolStripMenuItem)fieldInfo[i].GetValue(form);
+                        if (table.Contains(fieldInfo[i].Name.ToLower()))
+                            toolStripMenuItem.Text = (string)table[fieldInfo[i].Name.ToLower()];
                     }
-
                 }
 
                 //遍历控件
@@ -193,16 +198,21 @@ namespace OTSIncAReportApp.SysMgrTools
                 for (int i = 0; i < fieldInfo.Length; i++)
                 {
 
-                    if (fieldInfo[i].FieldType.Name == "ContextMenuStrip")
+                    //if (fieldInfo[i].FieldType.Name == "ContextMenuStrip")
+                    //{
+                    //    ContextMenuStrip contextMenuStrip = (ContextMenuStrip)fieldInfo[i].GetValue(form);
+                    //    for (int j = 0; j < contextMenuStrip.Items.Count; j++)
+                    //    {
+                    //        if (table.Contains(contextMenuStrip.Items[j].Name.ToLower()))
+                    //            contextMenuStrip.Items[j].Text = (string)table[contextMenuStrip.Items[j].Name.ToLower()];
+                    //    }
+                    //}
+                    if (fieldInfo[i].FieldType.Name == "ToolStripMenuItem")
                     {
-                        ContextMenuStrip contextMenuStrip = (ContextMenuStrip)fieldInfo[i].GetValue(form);
-                        for (int j = 0; j < contextMenuStrip.Items.Count; j++)
-                        {
-                            if (table.Contains(contextMenuStrip.Items[j].Name.ToLower()))
-                                contextMenuStrip.Items[j].Text = (string)table[contextMenuStrip.Items[j].Name.ToLower()];
-                        }
+                        ToolStripMenuItem toolStripMenuItem = (ToolStripMenuItem)fieldInfo[i].GetValue(form);
+                        if (table.Contains(fieldInfo[i].Name.ToLower()))
+                            toolStripMenuItem.Text = (string)table[fieldInfo[i].Name.ToLower()];
                     }
-
                 }
                 //遍历控件
                 foreach (Control control in controlNames)