|
|
@@ -42,6 +42,154 @@ namespace HOZProject
|
|
|
|
|
|
}
|
|
|
#endregion
|
|
|
+
|
|
|
+ #region 设备初始化按键
|
|
|
+ private void btnInit_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ //if (sem.Init())
|
|
|
+ //{
|
|
|
+ // btnInit.BackColor = Color.Lime;
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // btnInit.BackColor = Color.Red;
|
|
|
+ //}
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region 设备关闭按键
|
|
|
+ private void btnCloseCtrl_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ //if (sem.UnInit())
|
|
|
+ //{
|
|
|
+ // btnInit.BackColor = Control.DefaultBackColor;
|
|
|
+ //}
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 设置参数更新通知
|
|
|
+ private void btnSetNotify_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ //if (m_bInitialised)
|
|
|
+ //{
|
|
|
+ // // Magnification
|
|
|
+ // if (CZEMApi.SetNotify("AP_MAG", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "AP_MAG");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // Working distance
|
|
|
+ // if (CZEMApi.SetNotify("AP_WD", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "AP_WD");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // BRIGHTNESS 亮度
|
|
|
+ // if (CZEMApi.SetNotify("AP_BRIGHTNESS", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "AP_BRIGHTNESS");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // AP_CONTRAST,对比度
|
|
|
+ // if (CZEMApi.SetNotify("AP_CONTRAST", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "AP_CONTRAST");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // Vacuum
|
|
|
+ // if (CZEMApi.SetNotify("DP_VACSTATUS", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "DP_VACSTATUS");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // Gun / EHT state
|
|
|
+ // if (CZEMApi.SetNotify("DP_RUNUPSTATE", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "DP_RUNUPSTATE");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // actual KV / EHT
|
|
|
+ // if (CZEMApi.SetNotify("AP_ACTUALKV", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "AP_ACTUALKV");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // actual current
|
|
|
+ // if (CZEMApi.SetNotify("AP_ACTUALCURRENT", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "AP_ACTUALCURRENT");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // column type
|
|
|
+ // if (CZEMApi.SetNotify("DP_COLUMN_TYPE", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "DP_COLUMN_TYPE");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // mode
|
|
|
+ // if (CZEMApi.SetNotify("DP_OPERATING_MODE", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "DP_OPERATING_MODE");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // scan rate
|
|
|
+ // if (CZEMApi.SetNotify("DP_SCANRATE", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "DP_SCANRATE");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // auto function active
|
|
|
+ // if (CZEMApi.SetNotify("DP_AUTO_FUNCTION", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "DP_AUTO_FUNCTION");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+ // // probe current
|
|
|
+ // if (CZEMApi.SetNotify("AP_IPROBE", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "AP_IPROBE");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // detector
|
|
|
+ // if (CZEMApi.SetNotify("DP_DETECTOR_TYPE", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "DP_DETECTOR_TYPE");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // stage initialised
|
|
|
+ // if (CZEMApi.SetNotify("DP_STAGE_INIT", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "DP_STAGE_INIT");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // stage busy?
|
|
|
+ // if (CZEMApi.SetNotify("DP_STAGE_IS", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "DP_STAGE_IS");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // fib mode
|
|
|
+ // if (CZEMApi.SetNotify("DP_FIB_MODE", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "DP_FIB_MODE");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // fib gun state
|
|
|
+ // if (CZEMApi.SetNotify("DP_FIB_GUN_STATE", 1) != 0)
|
|
|
+ // {
|
|
|
+ // DisplayError("SetNotify", "DP_FIB_GUN_STATE");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+
|
|
|
+ //listmsg.Items.Add("Notification enabled");
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
|
|
|
#region 缩放Get
|
|
|
private void btnenlargeGet_Click(object sender, EventArgs e)
|