Browse Source

添加初始化 角度判断

wb_han 5 years ago
parent
commit
0485060a5e
2 changed files with 20 additions and 5 deletions
  1. 9 1
      HOZProject/UserControls/UControl_Init.cs
  2. 11 4
      MeasureData/MeasureFile.cs

+ 9 - 1
HOZProject/UserControls/UControl_Init.cs

@@ -459,7 +459,15 @@ namespace HOZProject
                 cbbWQGD.Text = cfm.m_Config.Location_Voltage.ToString();
                 cbbWPZF.Text = cfm.m_Config.Photograph_Magnification.ToString();
                 cbbWPZD.Text = cfm.m_Config.Photograph_Voltage.ToString();
-                cbbWXZ.Text = cfm.m_Config.Correction_Angle.ToString();
+                string Correction_Angle = cfm.m_Config.Correction_Angle.ToString();
+                if (Correction_Angle == "36")
+                {
+                    cbbWXZ.SelectedIndex = 0;
+                }
+                else
+                {
+                    cbbWXZ.SelectedIndex = 1;
+                }
                 cbbWYP.Text = cfm.m_Config.SampleName;
                 cbbWCS.Text = cfm.m_Config.Firm;
             }

+ 11 - 4
MeasureData/MeasureFile.cs

@@ -37,6 +37,14 @@ namespace MeasureData
             set { this.m_filepath = value; }
         }
 
+        //切孔文件路径
+        private string m_CutHoleFilePath;
+        public string CutHoleFilePath
+        {
+            get { return this.m_CutHoleFilePath; }
+            set { this.m_CutHoleFilePath = value; }
+        }
+
         //切孔链表
         private List<CutHole> m_listCutHole;
         public List<CutHole> ListCutHole
@@ -167,7 +175,6 @@ namespace MeasureData
             SaveFileDialog saveFileDialog = new SaveFileDialog();
             if (saveFileDialog.ShowDialog() == DialogResult.OK)
             {
-                string a  = saveFileDialog.FileName;
                 //获得文件路径  
                 string localFilePath = saveFileDialog.FileName.ToString();
                 //获取文件名,不带路径  
@@ -267,9 +274,9 @@ namespace MeasureData
                     //文件打开后执行以下程序
                     if (pOpenFileDialog.ShowDialog() == DialogResult.OK)
                     {
-                        a_FilePathName = System.IO.Path.GetFullPath(pOpenFileDialog.FileName);                             //绝对路径
-                        FilePath = a_FilePathName.Substring(0, a_FilePathName.LastIndexOf('\\')+1);
-                        FileName = pOpenFileDialog.SafeFileName;
+                        a_FilePathName = System.IO.Path.GetFullPath(pOpenFileDialog.FileName);                             
+                        //绝对路径
+                        CutHoleFilePath = a_FilePathName;
 
                     }
                 }