Browse Source

编辑器添加下拉项help

cxs 1 year ago
parent
commit
5d4d90cc78
2 changed files with 78 additions and 17 deletions
  1. 35 7
      OTSPartA_STDEditor/UI/STDEditor.Designer.cs
  2. 43 10
      OTSPartA_STDEditor/UI/STDEditor.cs

+ 35 - 7
OTSPartA_STDEditor/UI/STDEditor.Designer.cs

@@ -63,6 +63,8 @@
             this.button_PeriodicTableSwitch = new System.Windows.Forms.Button();
             this.comboBox_PeriodicTable = new System.Windows.Forms.ComboBox();
             this.groupBox_OtherCommonlyUsedSymbols = new System.Windows.Forms.GroupBox();
+            this.label_help1 = new System.Windows.Forms.Label();
+            this.label_help2 = new System.Windows.Forms.Label();
             this.comboBox_Constants = new System.Windows.Forms.ComboBox();
             this.label_DefinedConstant = new System.Windows.Forms.Label();
             this.label_Other = new System.Windows.Forms.Label();
@@ -494,7 +496,7 @@
             this.groupBox_ChemicalElement.Controls.Add(this.comboBox_PeriodicTable);
             this.groupBox_ChemicalElement.Location = new System.Drawing.Point(6, 20);
             this.groupBox_ChemicalElement.Name = "groupBox_ChemicalElement";
-            this.groupBox_ChemicalElement.Size = new System.Drawing.Size(172, 115);
+            this.groupBox_ChemicalElement.Size = new System.Drawing.Size(131, 115);
             this.groupBox_ChemicalElement.TabIndex = 5;
             this.groupBox_ChemicalElement.TabStop = false;
             this.groupBox_ChemicalElement.Text = "化学元素";
@@ -503,7 +505,7 @@
             // 
             this.button_PeriodicTableSwitch.Location = new System.Drawing.Point(18, 79);
             this.button_PeriodicTableSwitch.Name = "button_PeriodicTableSwitch";
-            this.button_PeriodicTableSwitch.Size = new System.Drawing.Size(126, 25);
+            this.button_PeriodicTableSwitch.Size = new System.Drawing.Size(96, 25);
             this.button_PeriodicTableSwitch.TabIndex = 33;
             this.button_PeriodicTableSwitch.Text = "PeriodicTable";
             this.button_PeriodicTableSwitch.UseVisualStyleBackColor = true;
@@ -514,13 +516,15 @@
             this.comboBox_PeriodicTable.FormattingEnabled = true;
             this.comboBox_PeriodicTable.Location = new System.Drawing.Point(18, 36);
             this.comboBox_PeriodicTable.Name = "comboBox_PeriodicTable";
-            this.comboBox_PeriodicTable.Size = new System.Drawing.Size(126, 20);
+            this.comboBox_PeriodicTable.Size = new System.Drawing.Size(96, 20);
             this.comboBox_PeriodicTable.TabIndex = 1;
             this.comboBox_PeriodicTable.SelectedIndexChanged += new System.EventHandler(this.comboBox_PeriodicTable_SelectedIndexChanged);
             this.comboBox_PeriodicTable.KeyDown += new System.Windows.Forms.KeyEventHandler(this.comboBox_PeriodicTable_KeyDown);
             // 
             // groupBox_OtherCommonlyUsedSymbols
             // 
+            this.groupBox_OtherCommonlyUsedSymbols.Controls.Add(this.label_help1);
+            this.groupBox_OtherCommonlyUsedSymbols.Controls.Add(this.label_help2);
             this.groupBox_OtherCommonlyUsedSymbols.Controls.Add(this.comboBox_Constants);
             this.groupBox_OtherCommonlyUsedSymbols.Controls.Add(this.label_DefinedConstant);
             this.groupBox_OtherCommonlyUsedSymbols.Controls.Add(this.label_Other);
@@ -529,20 +533,42 @@
             this.groupBox_OtherCommonlyUsedSymbols.Controls.Add(this.comboBox_Elem1);
             this.groupBox_OtherCommonlyUsedSymbols.Controls.Add(this.comboBox_Elem);
             this.groupBox_OtherCommonlyUsedSymbols.Controls.Add(this.comboBox_ImgProperty);
-            this.groupBox_OtherCommonlyUsedSymbols.Location = new System.Drawing.Point(184, 20);
+            this.groupBox_OtherCommonlyUsedSymbols.Location = new System.Drawing.Point(143, 20);
             this.groupBox_OtherCommonlyUsedSymbols.Name = "groupBox_OtherCommonlyUsedSymbols";
-            this.groupBox_OtherCommonlyUsedSymbols.Size = new System.Drawing.Size(502, 115);
+            this.groupBox_OtherCommonlyUsedSymbols.Size = new System.Drawing.Size(543, 115);
             this.groupBox_OtherCommonlyUsedSymbols.TabIndex = 3;
             this.groupBox_OtherCommonlyUsedSymbols.TabStop = false;
             this.groupBox_OtherCommonlyUsedSymbols.Text = "其它常用符号";
             // 
+            // label_help1
+            // 
+            this.label_help1.AutoSize = true;
+            this.label_help1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label_help1.Location = new System.Drawing.Point(242, 26);
+            this.label_help1.Name = "label_help1";
+            this.label_help1.Size = new System.Drawing.Size(19, 19);
+            this.label_help1.TabIndex = 21;
+            this.label_help1.Text = "?";
+            this.label_help1.MouseHover += new System.EventHandler(this.label_help1label2_MouseHover);
+            // 
+            // label_help2
+            // 
+            this.label_help2.AutoSize = true;
+            this.label_help2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label_help2.Location = new System.Drawing.Point(523, 25);
+            this.label_help2.Name = "label_help2";
+            this.label_help2.Size = new System.Drawing.Size(19, 19);
+            this.label_help2.TabIndex = 20;
+            this.label_help2.Text = "?";
+            this.label_help2.MouseHover += new System.EventHandler(this.label_help2_MouseHover);
+            // 
             // comboBox_Constants
             // 
             this.comboBox_Constants.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.comboBox_Constants.FormattingEnabled = true;
             this.comboBox_Constants.Location = new System.Drawing.Point(372, 72);
             this.comboBox_Constants.Name = "comboBox_Constants";
-            this.comboBox_Constants.Size = new System.Drawing.Size(122, 20);
+            this.comboBox_Constants.Size = new System.Drawing.Size(165, 20);
             this.comboBox_Constants.TabIndex = 5;
             this.comboBox_Constants.SelectedIndexChanged += new System.EventHandler(this.comboBox_Constants_SelectedIndexChanged);
             // 
@@ -608,7 +634,7 @@
             this.comboBox_ImgProperty.FormattingEnabled = true;
             this.comboBox_ImgProperty.Location = new System.Drawing.Point(372, 25);
             this.comboBox_ImgProperty.Name = "comboBox_ImgProperty";
-            this.comboBox_ImgProperty.Size = new System.Drawing.Size(124, 20);
+            this.comboBox_ImgProperty.Size = new System.Drawing.Size(148, 20);
             this.comboBox_ImgProperty.TabIndex = 4;
             this.comboBox_ImgProperty.SelectedIndexChanged += new System.EventHandler(this.comboBox_ImgProperty_SelectedIndexChanged);
             // 
@@ -689,5 +715,7 @@
         private System.Windows.Forms.Button button_PeriodicTableSwitch;
         private System.Windows.Forms.Button button_del;
         private System.Windows.Forms.HelpProvider helpProvider1;
+        private System.Windows.Forms.Label label_help2;
+        private System.Windows.Forms.Label label_help1;
     }
 }

+ 43 - 10
OTSPartA_STDEditor/UI/STDEditor.cs

@@ -773,16 +773,6 @@ namespace OTSPartA_STDEditor
             dataGridView_KeyElements.ClearSelection();
             dataGridView_SubElements.ClearSelection();
         }
-
-        public void ShowTabXray()
-        {
-            tabSTDStandrad.SelectedIndex = 1;
-        }
-        public void ShowSTD()
-        {
-            tabSTDStandrad.SelectedIndex = 0;
-        }
-
         private void button_del_Click(object sender, EventArgs e)
         {
             if (!string.IsNullOrEmpty(textbox_STDEditor.Text))
@@ -799,5 +789,48 @@ namespace OTSPartA_STDEditor
             textbox_STDEditor.Focus();
             textbox_STDEditor.SelectionStart = textbox_STDEditor.Text.Length;
         }
+        private void label_help2_MouseHover(object sender, EventArgs e)
+        {
+            // 创建the ToolTip 
+            ToolTip toolTip1 = new ToolTip();
+
+            // 设置显示样式
+            toolTip1.AutoPopDelay = 7000;//提示信息的可见时间
+            toolTip1.InitialDelay = 500;//事件触发多久后出现提示
+            toolTip1.ReshowDelay = 500;//指针从一个控件移向另一个控件时,经过多久才会显示下一个提示框
+            toolTip1.ShowAlways = true;//是否显示提示框
+            string str = "Dmax:颗粒最大卡规直径\n"+
+                          "Dmin: 颗粒最小卡规直径\n" +
+                          "Aspect:颗粒长宽比\n" +
+                          "Dperp:与Dmax垂直的对应直径\n"+
+                          "Dmean:平均内接圆直径\n"+
+                          "Area:面积\n"+
+                          "Dferet:费雷特直径\n"+
+                          "Width:宽度(直上直下那种)\n"+
+                          "Height:高度(直上直下那种)\n"+
+                          "Perimeter:周长\n"+
+                          "Dinscr:最大内接圆直径\n"+
+                          "Orientation:朝向角度\n"+
+                          "Delong:展开长度(以最小卡规直径为宽)\n" +
+                          "Aspectelong:展开后长宽比\n"+
+                          "Dequalcircle:等效圆直径\n"+
+                          "Vedio:BSE灰度平均值";
+            //  设置伴随的对象.
+            toolTip1.SetToolTip(this.label_help2, str);
+        }
+        private void label_help1label2_MouseHover(object sender, EventArgs e)
+        {
+            // 创建the ToolTip 
+            ToolTip toolTip1 = new ToolTip();
+
+            // 设置显示样式
+            toolTip1.AutoPopDelay = 7000;//提示信息的可见时间
+            toolTip1.InitialDelay = 500;//事件触发多久后出现提示
+            toolTip1.ReshowDelay = 500;//指针从一个控件移向另一个控件时,经过多久才会显示下一个提示框
+            toolTip1.ShowAlways = true;//是否显示提示框
+            string str = "first_elem/Element#1:颗粒元素分析结果中最大占比的元素";
+            //  设置伴随的对象.
+            toolTip1.SetToolTip(this.label_help1, str);
+        }
     }
 }