UControl_Init.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using MeasureData;
  11. using System.Configuration;
  12. using FileManager;
  13. using System.IO;
  14. namespace HOZProject
  15. {
  16. public partial class UControl_Init : UserControl
  17. {
  18. #region 全局变量
  19. String[] sT;
  20. String[] firms;
  21. String[] WPZD;
  22. String[] WPZF;
  23. String[] WQGD;
  24. String[] WQGF;
  25. String[] WLZ;
  26. Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
  27. private FormHOZMain formHOZMain;
  28. public FormHOZMain FormHOZMainObject { get => formHOZMain; set => formHOZMain = value; }
  29. //模板路径
  30. private string readConfigPath;
  31. public string ReadConfigPath { get => readConfigPath; set => readConfigPath = value; }
  32. //模板文件默认路径
  33. private string m_TemplateFilePath;
  34. #endregion
  35. #region 构造方法
  36. public UControl_Init(FormHOZMain formHOZ)
  37. {
  38. InitializeComponent();
  39. FormHOZMainObject = formHOZ;
  40. }
  41. #endregion
  42. private void UControl_Init_Load(object sender, EventArgs e)
  43. {
  44. }
  45. #region 关闭窗体
  46. private void btnClose_Click(object sender, EventArgs e)
  47. {
  48. Form fParent = this.ParentForm;
  49. fParent.Close();
  50. }
  51. #endregion
  52. #region 加载切孔文件,生成切孔列表
  53. private void pbCutHoleFile_Click(object sender, EventArgs e)
  54. {
  55. if (FormHOZMainObject.m_MeasureFile == null)
  56. {
  57. MessageBox.Show("请新建一个测量文件");
  58. }
  59. else
  60. {
  61. if (!FormHOZMainObject.m_MeasureFile.GetCutHolesFromFile(""))
  62. {
  63. MessageBox.Show("导入切孔失败");
  64. }
  65. else
  66. {
  67. List<CutHole> ListCutHole = FormHOZMainObject.m_MeasureFile.ListCutHole;
  68. //文件路径
  69. string CutHoleFilePath = FormHOZMainObject.m_MeasureFile.CutHoleFilePath;
  70. FormHOZMainObject.CreateCutHoleList(ListCutHole);
  71. //显示导入的切孔数量
  72. lblCutHoleCount.Text = string.Format("成功导入{0}个切孔", ListCutHole.Count);
  73. tbCutHoleFilePath.Text = CutHoleFilePath;
  74. }
  75. }
  76. }
  77. #endregion
  78. #region 根据一个切孔文件,自动计算其他切孔信息
  79. /// <summary>
  80. /// 根据一个切孔,自动计算其他切孔信息
  81. /// </summary>
  82. /// <param name="sender"></param>
  83. /// <param name="e"></param>
  84. private void pbCutHoleAuto_Click(object sender, EventArgs e)
  85. {
  86. }
  87. #endregion
  88. #region 加载PT模板文件
  89. private void pbTemplateFile_Click(object sender, EventArgs e)
  90. {
  91. //判断保存的路径是否存在
  92. if (!Directory.Exists(m_TemplateFilePath))
  93. {
  94. //创建路径
  95. Directory.CreateDirectory(m_TemplateFilePath);
  96. }
  97. string FilePathName;
  98. string fileNameWithoutExtension;
  99. //新建一个文件对话框
  100. OpenFileDialog pOpenFileDialog = new OpenFileDialog();
  101. //设置默认打开路径(绝对路径)
  102. pOpenFileDialog.InitialDirectory = m_TemplateFilePath;
  103. //设置对话框标题
  104. pOpenFileDialog.Title = "选择模板文件";
  105. //设置打开文件类型
  106. pOpenFileDialog.Filter = "ely文件(*.ely)|*.ely";
  107. ////监测文件是否存在
  108. //pOpenFileDialog.CheckFileExists = true;
  109. //文件打开后执行以下程序
  110. if (pOpenFileDialog.ShowDialog() == DialogResult.OK)
  111. {
  112. FilePathName = System.IO.Path.GetFullPath(pOpenFileDialog.FileName); //绝对路径
  113. fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(FilePathName);
  114. this.txtWPTF.Text = FilePathName;
  115. }
  116. }
  117. #endregion
  118. #region 加载FIB模板文件
  119. private void pbFIBTemplateFile_Click(object sender, EventArgs e)
  120. {
  121. //判断保存的路径是否存在
  122. if (!Directory.Exists(m_TemplateFilePath))
  123. {
  124. //创建路径
  125. Directory.CreateDirectory(m_TemplateFilePath);
  126. }
  127. string FilePathName;
  128. string fileNameWithoutExtension;
  129. //新建一个文件对话框
  130. OpenFileDialog pOpenFileDialog = new OpenFileDialog();
  131. //设置默认打开路径(绝对路径)
  132. pOpenFileDialog.InitialDirectory = m_TemplateFilePath;
  133. //设置对话框标题
  134. pOpenFileDialog.Title = "选择模板文件";
  135. //设置打开文件类型
  136. pOpenFileDialog.Filter = "ely文件(*.ely)|*.ely";
  137. ////监测文件是否存在
  138. //pOpenFileDialog.CheckFileExists = true;
  139. //文件打开后执行以下程序
  140. if (pOpenFileDialog.ShowDialog() == DialogResult.OK)
  141. {
  142. FilePathName = System.IO.Path.GetFullPath(pOpenFileDialog.FileName); //绝对路径
  143. fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(FilePathName);
  144. this.txtWFIBF.Text = FilePathName;
  145. }
  146. }
  147. #endregion
  148. #region 创建与读取样品参数、配置文件
  149. private void btnCreateConfig_Click(object sender, EventArgs e)
  150. {
  151. SaveTemplateFile();
  152. }
  153. private void SaveTemplateFile()
  154. {
  155. MeasureParam cfm = new MeasureParam();
  156. cfm.Is_Photograph = chkWIsP.Checked;
  157. cfm.PT = chkWPT.Checked;
  158. cfm.PTTemp = txtWPTF.Text;
  159. cfm.FIBTemp = txtWFIBF.Text;
  160. cfm.Stretch_Magnification = Convert.ToDouble(cbbWLZ.Text);
  161. cfm.Location_Magnification = Convert.ToDouble(cbbWQGF.Text);
  162. cfm.Location_Voltage = Convert.ToDouble(cbbWQGD.Text);
  163. cfm.Photograph_Magnification = Convert.ToDouble(cbbWPZF.Text);
  164. cfm.Photograph_Voltage = Convert.ToDouble(cbbWPZD.Text);
  165. if (cbbWXZ.SelectedIndex == 0)
  166. {
  167. cfm.Correction_Angle = 36.0;
  168. }
  169. else
  170. {
  171. cfm.Correction_Angle = 54.0;
  172. }
  173. cfm.SampleName = cbbWYP.Text;
  174. cfm.Firm = cbbWCS.Text;
  175. ConfigFile cf = new ConfigFile(cfm);
  176. if (!m_TemplateFilePath.Equals(""))
  177. {
  178. if (!Directory.Exists(m_TemplateFilePath))
  179. {
  180. //创建路径
  181. Directory.CreateDirectory(m_TemplateFilePath);
  182. }
  183. }
  184. SaveFileDialog saveFileDialog = new SaveFileDialog();
  185. //设置默认打开路径(绝对路径)
  186. saveFileDialog.InitialDirectory = m_TemplateFilePath;
  187. saveFileDialog.Filter = "样品参数文件|*.cfg";
  188. if (saveFileDialog.ShowDialog() == DialogResult.OK)
  189. {
  190. cf.Save(saveFileDialog.FileName);
  191. }
  192. else
  193. {
  194. return;
  195. }
  196. //编辑Config文件
  197. EditConfig();
  198. }
  199. /// <summary>
  200. /// 编辑confing 文件信息
  201. /// </summary>
  202. public bool EditConfig()
  203. {
  204. try
  205. {
  206. //设置数据源信息
  207. //样品类型
  208. List<String> _sT = sT.ToList();
  209. if (_sT.IndexOf(cbbWYP.Text) < 0)
  210. {
  211. _sT.Add(cbbWYP.Text);
  212. string wsT = string.Join(",", _sT.ToArray());
  213. config.AppSettings.Settings["Sample_Type"].Value = wsT;
  214. }
  215. //厂商
  216. List<String> _firms = firms.ToList();
  217. if (_firms.IndexOf(cbbWCS.Text) < 0)
  218. {
  219. _firms.Add(cbbWCS.Text);
  220. string wFirms = string.Join(",", _firms.ToArray());
  221. config.AppSettings.Settings["Firm"].Value = wFirms;
  222. }
  223. //拍照电压
  224. List<String> _WPZD = WPZD.ToList();
  225. if (_WPZD.IndexOf(cbbWPZD.Text) < 0)
  226. {
  227. _WPZD.Add(cbbWPZD.Text);
  228. string wWPZD = string.Join(",", _WPZD.ToArray());
  229. config.AppSettings.Settings["WPZD"].Value = wWPZD;
  230. }
  231. //拍照放大位数
  232. List<String> _WPZF = WPZF.ToList();
  233. if (_WPZF.IndexOf(cbbWPZF.Text) < 0)
  234. {
  235. _WPZF.Add(cbbWPZF.Text);
  236. string wWPZF = string.Join(",", _WPZF.ToArray());
  237. config.AppSettings.Settings["WPZF"].Value = wWPZF;
  238. }
  239. //定位切割电压
  240. List<String> _WQGD = WQGD.ToList();
  241. if (_WQGD.IndexOf(cbbWQGD.Text) < 0)
  242. {
  243. _WQGD.Add(cbbWQGD.Text);
  244. string wWQGD = string.Join(",", _WQGD.ToArray());
  245. config.AppSettings.Settings["WQGD"].Value = wWQGD;
  246. }
  247. //定位切割放大位数
  248. List<String> _WQGF = WQGF.ToList();
  249. if (_WQGF.IndexOf(cbbWQGF.Text) < 0)
  250. {
  251. _WQGF.Add(cbbWQGF.Text);
  252. string wWQGF = string.Join(",", _WQGF.ToArray());
  253. config.AppSettings.Settings["WQGF"].Value = wWQGF;
  254. }
  255. //拉直操作放大位数
  256. List<String> _WLZ = WLZ.ToList();
  257. if (_WLZ.IndexOf(cbbWLZ.Text) < 0)
  258. {
  259. _WLZ.Add(cbbWLZ.Text);
  260. string wWLZ = string.Join(",", _WLZ.ToArray());
  261. config.AppSettings.Settings["WLZ"].Value = wWLZ;
  262. }
  263. MeasureParam cfm = new MeasureParam();
  264. cfm.Is_Photograph = chkWIsP.Checked;
  265. cfm.PT = chkWPT.Checked;
  266. cfm.PTTemp = txtWPTF.Text;
  267. cfm.FIBTemp = txtWFIBF.Text;
  268. cfm.Stretch_Magnification = Convert.ToDouble(cbbWLZ.Text);
  269. cfm.Location_Magnification = Convert.ToDouble(cbbWQGF.Text);
  270. cfm.Location_Voltage = Convert.ToDouble(cbbWQGD.Text);
  271. cfm.Photograph_Magnification = Convert.ToDouble(cbbWPZF.Text);
  272. cfm.Photograph_Voltage = Convert.ToDouble(cbbWPZD.Text);
  273. if (cbbWXZ.SelectedIndex == 0)
  274. {
  275. cfm.Correction_Angle = 36.0;
  276. }
  277. else
  278. {
  279. cfm.Correction_Angle = 54.0;
  280. }
  281. cfm.SampleName = cbbWYP.Text;
  282. cfm.Firm = cbbWCS.Text;
  283. //设置配置文件默认值
  284. config.AppSettings.Settings["Is_Photograph"].Value = cfm.Is_Photograph.ToString();
  285. config.AppSettings.Settings["PT_Depostion"].Value = cfm.PT.ToString();
  286. config.AppSettings.Settings["PT_ELYFile"].Value = cfm.PTTemp;
  287. config.AppSettings.Settings["FIB_ELYFile"].Value = cfm.FIBTemp;
  288. config.AppSettings.Settings["Stretch_Magnification"].Value = cfm.Stretch_Magnification.ToString();
  289. config.AppSettings.Settings["Location_Magnification"].Value = cfm.Location_Magnification.ToString();
  290. config.AppSettings.Settings["Location_Voltage"].Value = cfm.Location_Voltage.ToString();
  291. config.AppSettings.Settings["Photograph_Magnification"].Value = cfm.Photograph_Magnification.ToString();
  292. config.AppSettings.Settings["Photograph_Voltage"].Value = cfm.Photograph_Voltage.ToString();
  293. config.AppSettings.Settings["Correction_Angle"].Value = cfm.Correction_Angle.ToString();
  294. config.AppSettings.Settings["SampleName"].Value = cfm.SampleName;
  295. config.AppSettings.Settings["Firms"].Value = cfm.Firm;
  296. config.Save(ConfigurationSaveMode.Modified);
  297. ConfigurationManager.RefreshSection("appSettings");//重新加载新的配置文件
  298. return true;
  299. }
  300. catch (Exception ex)
  301. {
  302. LogManager.LogError(ex.Message);
  303. return false;
  304. }
  305. }
  306. /// <summary>
  307. /// 删除config文件节点中内容信息
  308. /// </summary>
  309. public bool DelConfigNodeContentInfo(string delControlName, string selName)
  310. {
  311. try
  312. {
  313. switch (delControlName)
  314. {
  315. case "WYP":
  316. //样品类型
  317. List<String> _sT = sT.ToList();
  318. _sT.Remove(selName);
  319. string wsT = string.Join(",", _sT.ToArray());
  320. config.AppSettings.Settings["Sample_Type"].Value = wsT;
  321. break;
  322. case "WCS":
  323. //厂商
  324. List<String> _firms = firms.ToList();
  325. _firms.Remove(selName);
  326. string wFirms = string.Join(",", _firms.ToArray());
  327. config.AppSettings.Settings["Firm"].Value = wFirms;
  328. break;
  329. case "WPZD":
  330. //拍照电压
  331. List<String> _WPZD = WPZD.ToList();
  332. _WPZD.Remove(selName);
  333. string wWPZD = string.Join(",", _WPZD.ToArray());
  334. config.AppSettings.Settings["WPZD"].Value = wWPZD;
  335. break;
  336. case "WPZF":
  337. //拍照放大位数
  338. List<String> _WPZF = WPZF.ToList();
  339. _WPZF.Remove(selName);
  340. string wWPZF = string.Join(",", _WPZF.ToArray());
  341. config.AppSettings.Settings["WPZF"].Value = wWPZF;
  342. break;
  343. case "WQGD"://定位切割电压
  344. List<String> _WQGD = WQGD.ToList();
  345. _WQGD.Remove(selName);
  346. string wWQGD = string.Join(",", _WQGD.ToArray());
  347. config.AppSettings.Settings["WQGD"].Value = wWQGD;
  348. break;
  349. case "WQGF": //定位切割放大位数
  350. List<String> _WQGF = WQGF.ToList();
  351. _WQGF.Remove(selName);
  352. string wWQGF = string.Join(",", _WQGF.ToArray());
  353. config.AppSettings.Settings["WQGF"].Value = wWQGF;
  354. break;
  355. case "WLZ":
  356. //拉直操作放大位数
  357. List<String> _WLZ = WLZ.ToList();
  358. _WLZ.Remove(selName);
  359. string wWLZ = string.Join(",", _WLZ.ToArray());
  360. config.AppSettings.Settings["WLZ"].Value = wWLZ;
  361. break;
  362. }
  363. config.Save(ConfigurationSaveMode.Modified);
  364. ConfigurationManager.RefreshSection("appSettings");//重新加载新的配置文件
  365. return true;
  366. }
  367. catch (Exception ex)
  368. {
  369. LogManager.LogError(ex.Message);
  370. return true;
  371. }
  372. }
  373. /// <summary>
  374. /// 绑定下拉菜单
  375. /// </summary>
  376. /// <param name="cb"></param>
  377. /// <param name="strGroup"></param>
  378. private void BindComboxData(ComboBox cb, string[] strGroup)
  379. {
  380. for (int i = 0; i < strGroup.Length; i++)
  381. {
  382. if (!strGroup[i].Equals(""))
  383. {
  384. cb.Items.Add(strGroup[i]);
  385. }
  386. }
  387. }
  388. /// <summary>
  389. /// 读取Config文件信息
  390. /// </summary>
  391. public void ReloadConfig()
  392. {
  393. cbbWYP.Items.Clear();
  394. cbbWCS.Items.Clear();
  395. cbbWPZD.Items.Clear();
  396. cbbWPZF.Items.Clear();
  397. cbbWQGD.Items.Clear();
  398. cbbWQGF.Items.Clear();
  399. cbbWLZ.Items.Clear();
  400. m_TemplateFilePath = config.AppSettings.Settings["TemplateFilePath"].Value.ToString();
  401. string sample_Type = config.AppSettings.Settings["Sample_Type"].Value.ToString();
  402. string firm = config.AppSettings.Settings["Firm"].Value.ToString();
  403. string WPZDTemp = config.AppSettings.Settings["WPZD"].Value.ToString();
  404. string WPZFTemp = config.AppSettings.Settings["WPZF"].Value.ToString();
  405. string WQGDTemp = config.AppSettings.Settings["WQGD"].Value.ToString();
  406. string WQGFTemp = config.AppSettings.Settings["WQGF"].Value.ToString();
  407. string WLZTemp = config.AppSettings.Settings["WLZ"].Value.ToString();
  408. //样品类型
  409. sT = sample_Type.Split(',');
  410. BindComboxData(cbbWYP, sT);
  411. //厂商
  412. firms = firm.Split(',');
  413. BindComboxData(cbbWCS, firms);
  414. //拍照电压
  415. WPZD = WPZDTemp.Split(',');
  416. BindComboxData(cbbWPZD, WPZD);
  417. //拍照放大位数
  418. WPZF = WPZFTemp.Split(',');
  419. BindComboxData(cbbWPZF, WPZF);
  420. //定位切割电压
  421. WQGD = WQGDTemp.Split(',');
  422. BindComboxData(cbbWQGD, WQGD);
  423. //定位切割放大位数
  424. WQGF = WQGFTemp.Split(',');
  425. BindComboxData(cbbWQGF, WQGF);
  426. //拉直操作放大位数
  427. WLZ = WLZTemp.Split(',');
  428. BindComboxData(cbbWLZ, WLZ);
  429. //设置配置文件默认值
  430. chkWIsP.Checked=Convert.ToBoolean(config.AppSettings.Settings["Is_Photograph"].Value);
  431. chkWPT.Checked = Convert.ToBoolean(config.AppSettings.Settings["PT_Depostion"].Value);
  432. txtWPTF.Text = config.AppSettings.Settings["PT_ELYFile"].Value;
  433. txtWFIBF.Text = config.AppSettings.Settings["FIB_ELYFile"].Value;
  434. cbbWLZ.Text = config.AppSettings.Settings["Stretch_Magnification"].Value;
  435. cbbWQGF.Text = config.AppSettings.Settings["Location_Magnification"].Value;
  436. cbbWQGD.Text = config.AppSettings.Settings["Location_Voltage"].Value;
  437. cbbWPZF.Text = config.AppSettings.Settings["Photograph_Magnification"].Value;
  438. cbbWPZD.Text = config.AppSettings.Settings["Photograph_Voltage"].Value;
  439. string Correction_Angle = config.AppSettings.Settings["Correction_Angle"].Value;
  440. if (Correction_Angle == "36")
  441. {
  442. cbbWXZ.SelectedIndex = 0;
  443. }
  444. else
  445. {
  446. cbbWXZ.SelectedIndex = 1;
  447. }
  448. cbbWYP.Text = config.AppSettings.Settings["SampleName"].Value;
  449. cbbWCS.Text = config.AppSettings.Settings["Firms"].Value;
  450. }
  451. /// <summary>
  452. /// 根据所选路径,读取模板文件
  453. /// </summary>
  454. public void ReadConfigInfo()
  455. {
  456. if (!ReadConfigPath.Equals(""))
  457. {
  458. ReloadConfig();
  459. ConfigFile cfm = new ConfigFile(new MeasureParam());
  460. cfm.Read(ReadConfigPath);
  461. chkWIsP.Checked = cfm.m_Config.Is_Photograph;
  462. chkWPT.Checked = cfm.m_Config.PT;
  463. txtWPTF.Text = cfm.m_Config.PTTemp;
  464. txtWFIBF.Text = cfm.m_Config.FIBTemp;
  465. cbbWLZ.Text = cfm.m_Config.Stretch_Magnification.ToString();
  466. cbbWQGF.Text = cfm.m_Config.Location_Magnification.ToString();
  467. cbbWQGD.Text = cfm.m_Config.Location_Voltage.ToString();
  468. cbbWPZF.Text = cfm.m_Config.Photograph_Magnification.ToString();
  469. cbbWPZD.Text = cfm.m_Config.Photograph_Voltage.ToString();
  470. string Correction_Angle = cfm.m_Config.Correction_Angle.ToString();
  471. if (Correction_Angle == "36")
  472. {
  473. cbbWXZ.SelectedIndex = 0;
  474. }
  475. else
  476. {
  477. cbbWXZ.SelectedIndex = 1;
  478. }
  479. cbbWYP.Text = cfm.m_Config.SampleName;
  480. cbbWCS.Text = cfm.m_Config.Firm;
  481. }
  482. }
  483. /// <summary>
  484. /// 修改配置文件默认值
  485. /// </summary>
  486. /// <param name="sender"></param>
  487. /// <param name="e"></param>
  488. private void btnSaveDefalutPara_Click(object sender, EventArgs e)
  489. {
  490. if (EditConfig())
  491. {
  492. MessageBox.Show("保存成功!", "提示");
  493. }
  494. }
  495. #endregion
  496. #region 删除下拉菜单选择项
  497. private void DelComboBoxItem_Click(object sender, EventArgs e)
  498. {
  499. if (MessageBox.Show("是否删除所选项信息?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
  500. {
  501. PictureBox pbDel = (PictureBox)sender;
  502. string ctrlName = pbDel.Name.Substring(5, pbDel.Name.Length - 5);
  503. if (DelComboBoxItem(ctrlName))
  504. {
  505. //重新加载
  506. ReloadConfig();
  507. }
  508. }
  509. }
  510. /// <summary>
  511. /// 删除下拉菜单选择项
  512. /// </summary>
  513. public bool DelComboBoxItem(string controlName)
  514. {
  515. string delName = controlName;
  516. foreach (Control item in this.Controls)
  517. {
  518. if (item is ComboBox)
  519. {
  520. if (item.Name.Contains(delName))
  521. {
  522. ComboBox cb = (ComboBox)item;
  523. return DelConfigNodeContentInfo(delName, cb.Text);
  524. }
  525. }
  526. }
  527. return false;
  528. }
  529. #endregion
  530. #region 根据是否仅拍照,进行逻辑判断
  531. private void chkWIsP_CheckedChanged(object sender, EventArgs e)
  532. {
  533. if (chkWIsP.Checked)
  534. {
  535. chkWPT.Checked = false;
  536. chkWPT.Visible = false;
  537. }
  538. else
  539. {
  540. chkWPT.Visible = true;
  541. }
  542. }
  543. #endregion
  544. }
  545. }