|
@@ -461,6 +461,7 @@ namespace HOZProject
|
|
|
|
|
|
MeasureParam cfm = new MeasureParam();
|
|
|
cfm.Is_Photograph = chkWIsP.Checked;
|
|
|
+
|
|
|
cfm.FocusMode = Convert.ToInt32(config.AppSettings.Settings["Focus_Mode"].Value);
|
|
|
cfm.PT = chkWPT.Checked;
|
|
|
//自动对焦模式
|
|
@@ -473,6 +474,12 @@ namespace HOZProject
|
|
|
cfm.Photograph_Magnification = Convert.ToSingle(cbbWPZF.Text);
|
|
|
cfm.Photograph_Voltage = Convert.ToSingle(cbbWPZD.Text);
|
|
|
cfm.FIB_Magnification = Convert.ToSingle(cbbWFIB.Text);
|
|
|
+
|
|
|
+ //倾斜观测
|
|
|
+ cfm.Title = chkWqxkc.Checked;
|
|
|
+ //移动Z轴大小
|
|
|
+ cfm.ZDistance = Convert.ToSingle(cbbYDZZDX.Text);
|
|
|
+
|
|
|
if (cbbWXZ.SelectedIndex == 0)
|
|
|
{
|
|
|
cfm.Correction_Angle = 36;
|
|
@@ -498,6 +505,8 @@ namespace HOZProject
|
|
|
config.AppSettings.Settings["SampleName"].Value = cfm.SampleName;
|
|
|
config.AppSettings.Settings["Firms"].Value = cfm.Firm;
|
|
|
|
|
|
+ config.AppSettings.Settings["Is_Title"].Value = cfm.Title.ToString();
|
|
|
+ config.AppSettings.Settings["ZDistance"].Value = cfm.ZDistance.ToString();
|
|
|
config.Save(ConfigurationSaveMode.Modified);
|
|
|
ConfigurationManager.RefreshSection("appSettings");//重新加载新的配置文件
|
|
|
return true;
|
|
@@ -606,7 +615,7 @@ namespace HOZProject
|
|
|
cbbWQGF.Items.Clear();
|
|
|
cbbWLZ.Items.Clear();
|
|
|
cbbWFIB.Items.Clear();
|
|
|
-
|
|
|
+ cbbYDZZDX.Text = "0";
|
|
|
m_TemplateFilePath = config.AppSettings.Settings["TemplateFilePath"].Value.ToString();
|
|
|
string sample_Type = config.AppSettings.Settings["Sample_Type"].Value.ToString();
|
|
|
string firm = config.AppSettings.Settings["Firm"].Value.ToString();
|
|
@@ -616,6 +625,9 @@ namespace HOZProject
|
|
|
string WQGFTemp = config.AppSettings.Settings["WQGF"].Value.ToString();
|
|
|
string WLZTemp = config.AppSettings.Settings["WLZ"].Value.ToString();
|
|
|
string WFIBTemp = config.AppSettings.Settings["WFIB"].Value.ToString();
|
|
|
+ //string ZZDistance = config.AppSettings.Settings["ZDistance"].Value.ToString();
|
|
|
+
|
|
|
+
|
|
|
//样品类型
|
|
|
sT = sample_Type.Split(',');
|
|
|
BindComboxData(cbbWYP, sT);
|
|
@@ -644,6 +656,10 @@ namespace HOZProject
|
|
|
//设置配置文件默认值
|
|
|
chkWIsP.Checked=Convert.ToBoolean(config.AppSettings.Settings["Is_Photograph"].Value);
|
|
|
chkWPT.Checked = Convert.ToBoolean(config.AppSettings.Settings["PT_Depostion"].Value);
|
|
|
+ //倾斜观测
|
|
|
+ chkWqxkc.Checked = Convert.ToBoolean(config.AppSettings.Settings["Is_Title"].Value);
|
|
|
+ //移动Z轴大小
|
|
|
+ cbbYDZZDX.Text = config.AppSettings.Settings["ZDistance"].Value;
|
|
|
//自动对焦模式
|
|
|
//chkManul.Checked = Convert.ToBoolean(config.AppSettings.Settings["Focus_Mode"].Value);
|
|
|
txtWPTF.Text = config.AppSettings.Settings["PT_ELYFile"].Value;
|
|
@@ -655,6 +671,16 @@ namespace HOZProject
|
|
|
cbbWPZD.Text = config.AppSettings.Settings["Photograph_Voltage"].Value;
|
|
|
cbbWFIB.Text = config.AppSettings.Settings["FIB_Magnification"].Value;
|
|
|
string Correction_Angle = config.AppSettings.Settings["Correction_Angle"].Value;
|
|
|
+ if (Convert.ToBoolean(config.AppSettings.Settings["Is_Title"].Value))
|
|
|
+ {
|
|
|
+ cbbYDZZDX.Visible = true;
|
|
|
+ label3.Visible = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ cbbYDZZDX.Visible = false;
|
|
|
+ label3.Visible = false;
|
|
|
+ }
|
|
|
if (Correction_Angle == "36")
|
|
|
{
|
|
|
cbbWXZ.SelectedIndex = 0;
|
|
@@ -1024,5 +1050,30 @@ namespace HOZProject
|
|
|
//}
|
|
|
}
|
|
|
#endregion
|
|
|
+
|
|
|
+ private void cbbYDZZDX_TextChanged(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ if (cbbYDZZDX.Text!="")
|
|
|
+ {
|
|
|
+ if (Convert.ToSingle(cbbYDZZDX.Text)>40)
|
|
|
+ {
|
|
|
+ MessageBox.Show("数值最大为40");
|
|
|
+ cbbYDZZDX.Text = "40";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ cbbYDZZDX.Text = "0";
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void cbbYDZZDX_KeyPress(object sender, KeyPressEventArgs e)
|
|
|
+ {
|
|
|
+ if (((int)e.KeyChar < 48 || (int)e.KeyChar > 57) && (int)e.KeyChar != 8 && (int)e.KeyChar != 46)
|
|
|
+ {
|
|
|
+ e.Handled = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|