MeasureParam.cs 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105
  1. //时间:20200618
  2. //作者:郝爽
  3. //功能:测量参数
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using FileManager;
  10. using System.Xml;
  11. using System.IO;
  12. namespace MeasureData
  13. {
  14. public class MeasureParam : ISlo
  15. {
  16. #region 内容
  17. //工作条件,一次测量的全部切孔都是一类的
  18. // 样品类型
  19. private string m_SampleName;
  20. public string SampleName
  21. {
  22. get { return this.m_SampleName; }
  23. set { this.m_SampleName = value; }
  24. }
  25. //是否仅拍照
  26. private Boolean is_Photograph;
  27. public Boolean Is_Photograph
  28. {
  29. get { return this.is_Photograph; }
  30. set { this.is_Photograph = value; }
  31. }
  32. //是否有pt工序
  33. private Boolean m_pt;
  34. public Boolean PT
  35. {
  36. get { return this.m_pt; }
  37. set { this.m_pt = value; }
  38. }
  39. //倾斜样品台
  40. private Boolean m_Title;
  41. public Boolean Title
  42. {
  43. get { return this.m_Title; }
  44. set { this.m_Title = value; }
  45. }
  46. //是否有EDS
  47. private Boolean m_EDS;
  48. public Boolean EDS
  49. {
  50. get { return this.m_EDS; }
  51. set { this.m_EDS = value; }
  52. }
  53. //能谱Z轴移动的位置
  54. private float edsZ;
  55. public float EDSZ
  56. {
  57. get { return this.edsZ; }
  58. set { this.edsZ = value; }
  59. }
  60. //能谱电压设定值
  61. private float edsV;
  62. public float EDSV
  63. {
  64. get { return this.edsV; }
  65. set { this.edsV = value; }
  66. }
  67. //能谱电压设定值
  68. private float edsA;
  69. public float EDSA
  70. {
  71. get { return this.edsA; }
  72. set { this.edsA = value; }
  73. }
  74. //Z轴移动的范围
  75. private float m_dZ;
  76. public float ZDistance
  77. {
  78. get { return this.m_dZ; }
  79. set { this.m_dZ = value; }
  80. }
  81. //FIB使用的ELY文件
  82. private string m_fibTemp;
  83. public string FIBTemp
  84. {
  85. get { return this.m_fibTemp; }
  86. set { this.m_fibTemp = value; }
  87. }
  88. //PT使用的ELY文件
  89. private string m_ptTemp;
  90. public string PTTemp
  91. {
  92. get { return this.m_ptTemp; }
  93. set { this.m_ptTemp = value; }
  94. }
  95. //对焦方式,自动对焦还是手动对焦,手动对焦是1,自有自动对焦2,客户自动对焦3
  96. private int m_fMode;
  97. public int FocusMode
  98. {
  99. get { return m_fMode; }
  100. set { m_fMode = value; }
  101. }
  102. //拉直操作需要的放大位数
  103. private float stretch_Magnification;
  104. public float Stretch_Magnification
  105. {
  106. get { return this.stretch_Magnification; }
  107. set { this.stretch_Magnification = value; }
  108. }
  109. //定位切割位置的放大倍数
  110. private float location_Magnification;
  111. public float Location_Magnification
  112. {
  113. get { return this.location_Magnification; }
  114. set { this.location_Magnification = value; }
  115. }
  116. //定位切割位置的工作电压
  117. private float location_Voltage;
  118. public float Location_Voltage
  119. {
  120. get { return this.location_Voltage; }
  121. set { this.location_Voltage = value; }
  122. }
  123. //拍照的放大倍数
  124. private float photograph_Magnification;
  125. public float Photograph_Magnification
  126. {
  127. get { return this.photograph_Magnification; }
  128. set { this.photograph_Magnification = value; }
  129. }
  130. //拍照的工作电压
  131. private float photograph_Voltage;
  132. public float Photograph_Voltage
  133. {
  134. get { return this.photograph_Voltage; }
  135. set { this.photograph_Voltage = value; }
  136. }
  137. //FIB拍照时的放大倍数
  138. private float fib_Magnification;
  139. public float FIB_Magnification
  140. {
  141. get { return this.fib_Magnification; }
  142. set { this.fib_Magnification = value; }
  143. }
  144. //校正角度选择
  145. private float correction_Angle;
  146. public float Correction_Angle
  147. {
  148. get { return this.correction_Angle; }
  149. set { this.correction_Angle = value; }
  150. }
  151. //厂商
  152. private String firm;
  153. public String Firm
  154. {
  155. get { return this.firm; }
  156. set { this.firm = value; }
  157. }
  158. //对焦参数, SEM
  159. private FocusParam focusP;
  160. public FocusParam AutoFocus
  161. {
  162. get { return this.focusP; }
  163. set { this.focusP = value; }
  164. }
  165. //对焦参数, FIB
  166. private FocusParam focusF;
  167. public FocusParam FIBFocus
  168. {
  169. get { return this.focusF; }
  170. set { this.focusF = value; }
  171. }
  172. //消像散x参数
  173. private FocusParam StigX;
  174. public FocusParam AutoStigX
  175. {
  176. get { return this.StigX; }
  177. set { this.StigX = value; }
  178. }
  179. //消像散Y参数
  180. private FocusParam StigY;
  181. public FocusParam AutoStigY
  182. {
  183. get { return this.StigY; }
  184. set { this.StigY = value; }
  185. }
  186. //EDS参数
  187. private EDSParam EdsParam;
  188. public EDSParam EDSP
  189. {
  190. get { return this.EdsParam; }
  191. set { this.EdsParam = value; }
  192. }
  193. #region 放大倍数档位切换功能
  194. //档位阈值4个,4个偏差补偿值
  195. private bool bMagComp;
  196. public bool MagComp
  197. {
  198. get { return this.bMagComp; }
  199. set { this.bMagComp = value; }
  200. }
  201. private float fMagRange1;
  202. public float MagRange1
  203. {
  204. get { return this.fMagRange1; }
  205. set
  206. {
  207. if (value < this.fMagRange2)
  208. this.fMagRange1 = value;
  209. }
  210. }
  211. private float fMagCompX1;
  212. public float MagCompX1
  213. {
  214. get { return this.fMagCompX1; }
  215. set { this.fMagCompX1 = value; }
  216. }
  217. private float fMagCompY1;
  218. public float MagCompY1
  219. {
  220. get { return this.fMagCompY1; }
  221. set { this.fMagCompY1 = value; }
  222. }
  223. private float fMagRange2;
  224. public float MagRange2
  225. {
  226. get { return this.fMagRange2; }
  227. set
  228. {
  229. if ((value > this.fMagRange1) && (value < this.fMagRange3))
  230. this.fMagRange2 = value;
  231. }
  232. }
  233. private float fMagCompX2;
  234. public float MagCompX2
  235. {
  236. get { return this.fMagCompX2; }
  237. set { this.fMagCompX2 = value; }
  238. }
  239. private float fMagCompY2;
  240. public float MagCompY2
  241. {
  242. get { return this.fMagCompY2; }
  243. set { this.fMagCompY2 = value; }
  244. }
  245. private float fMagRange3;
  246. public float MagRange3
  247. {
  248. get { return this.fMagRange3; }
  249. set
  250. {
  251. if ((value > this.fMagRange2) && (value < this.fMagRange4))
  252. this.fMagRange3 = value;
  253. }
  254. }
  255. private float fMagCompX3;
  256. public float MagCompX3
  257. {
  258. get { return this.fMagCompX3; }
  259. set { this.fMagCompX3 = value; }
  260. }
  261. private float fMagCompY3;
  262. public float MagCompY3
  263. {
  264. get { return this.fMagCompY3; }
  265. set { this.fMagCompY3 = value; }
  266. }
  267. private float fMagRange4;
  268. public float MagRange4
  269. {
  270. get { return this.fMagRange4; }
  271. set
  272. {
  273. if (value > this.fMagRange3)
  274. this.fMagRange4 = value;
  275. }
  276. }
  277. private float fMagCompX4;
  278. public float MagCompX4
  279. {
  280. get { return this.fMagCompX4; }
  281. set { this.fMagCompX4 = value; }
  282. }
  283. private float fMagCompY4;
  284. public float MagCompY4
  285. {
  286. get { return this.fMagCompY4; }
  287. set { this.fMagCompY4 = value; }
  288. }
  289. #endregion
  290. #region FIB自动亮度对比度调整
  291. //是否调节FIB
  292. private bool IsFIBDo;
  293. public bool FIBDo
  294. {
  295. get { return this.IsFIBDo; }
  296. set { this.IsFIBDo = value; }
  297. }
  298. //是否开启亮度对比度自动调节
  299. private bool IsFIBAutoBC;
  300. public bool FIBAutoBC
  301. {
  302. get { return this.IsFIBAutoBC; }
  303. set { this.IsFIBAutoBC = value; }
  304. }
  305. //关闭亮度对比度时,亮度和对比度的设置值
  306. private float FIBBright;
  307. public float FIBB
  308. {
  309. get { return this.FIBBright; }
  310. set { this.FIBBright = value; }
  311. }
  312. private float FIBContrast;
  313. public float FIBC
  314. {
  315. get { return this.FIBContrast; }
  316. set { this.FIBContrast = value; }
  317. }
  318. //是否开启在其他位置调节亮度对比度功能,再挪回原来位置
  319. #endregion
  320. //ScanRotation修正角度
  321. private float scanRotCor;
  322. public float ScanRotCor
  323. {
  324. get { return this.scanRotCor; }
  325. set { this.scanRotCor = value; }
  326. }
  327. //ScanRotation修正角度
  328. private float pixelSizeCor;
  329. public float PixelSizeCor
  330. {
  331. get { return this.pixelSizeCor; }
  332. set { this.pixelSizeCor = value; }
  333. }
  334. //能谱参数
  335. #region add by sun 2020-12-15 增加不同样品扫描速度参数
  336. //正常情况下默认扫描速度
  337. private String m_ScanSpeedNormal;
  338. public String ScanSpeedNormal
  339. {
  340. get { return this.m_ScanSpeedNormal; }
  341. set { this.m_ScanSpeedNormal = value; }
  342. }
  343. //对焦拍照扫描速度
  344. private String m_ScanSpeedFocus;
  345. public String ScanSpeedFocus
  346. {
  347. get { return this.m_ScanSpeedFocus; }
  348. set { this.m_ScanSpeedFocus = value; }
  349. }
  350. //高倍拍照扫描速度
  351. private String m_ScanSpeedHigh;
  352. public String ScanSpeedHigh
  353. {
  354. get { return this.m_ScanSpeedHigh; }
  355. set { this.m_ScanSpeedHigh = value; }
  356. }
  357. #endregion add by sun 2020-12-15 增加不同样品扫描速度参数end
  358. //add by sun 2020-12-17 增加调试时是否切割开关
  359. private bool m_IsCutingForDebug;
  360. public bool IsCutingForDebug
  361. {
  362. get { return this.m_IsCutingForDebug; }
  363. set { this.m_IsCutingForDebug = value; }
  364. }
  365. //add by sun 2020-12-17 增加调试时是否切割开关 end
  366. //add by zjx 2020-12-18 为了测试只做能谱部分
  367. private bool m_IsonlyEDSForDebug;
  368. public bool IsonlyEDSForDebug
  369. {
  370. get { return this.m_IsonlyEDSForDebug; }
  371. set { this.m_IsonlyEDSForDebug = value; }
  372. }
  373. //add by zjx 2020-12-18 为了测试只做能谱部分 end
  374. //20201221 reduce窗口参数
  375. private int m_ReducePos_X;
  376. public int RedcueX
  377. {
  378. get { return this.m_ReducePos_X; }
  379. set { this.m_ReducePos_X = value; }
  380. }
  381. private int m_ReducePos_Y;
  382. public int RedcueY
  383. {
  384. get { return this.m_ReducePos_Y; }
  385. set { this.m_ReducePos_Y = value; }
  386. }
  387. private int m_ReducePos_W;
  388. public int RedcueW
  389. {
  390. get { return this.m_ReducePos_W; }
  391. set { this.m_ReducePos_W = value; }
  392. }
  393. private int m_ReducePos_H;
  394. public int RedcueH
  395. {
  396. get { return this.m_ReducePos_H; }
  397. set { this.m_ReducePos_H = value; }
  398. }
  399. #endregion
  400. #region 初始化样品的默认参数
  401. // add by zjx 2020-12-20 厂商名字
  402. #region 厂商
  403. private String m_VendorType0;
  404. public String VendorType0
  405. {
  406. get { return this.m_VendorType0; }
  407. set { this.m_VendorType0 = value; }
  408. }
  409. private String m_VendorType1;
  410. public String VendorType1
  411. {
  412. get { return this.m_VendorType1; }
  413. set { this.m_VendorType1 = value; }
  414. }
  415. private String m_VendorType2;
  416. public String VendorType2
  417. {
  418. get { return this.m_VendorType2; }
  419. set { this.m_VendorType2 = value; }
  420. }
  421. private String m_VendorType3;
  422. public String VendorType3
  423. {
  424. get { return this.m_VendorType3; }
  425. set { this.m_VendorType3 = value; }
  426. }
  427. #endregion
  428. // add by zjx 2020-12-20 厂商名字 end
  429. // add by zjx 2020-12-20 校正角度
  430. #region 校正角度
  431. private String m_CorrectionType0;
  432. public String CorrectionType0
  433. {
  434. get { return this.m_CorrectionType0; }
  435. set { this.m_CorrectionType0 = value; }
  436. }
  437. private String m_CorrectionType1;
  438. public String CorrectionType1
  439. {
  440. get { return this.m_CorrectionType1; }
  441. set { this.m_CorrectionType1 = value; }
  442. }
  443. private String m_CorrectionType2;
  444. public String CorrectionType2
  445. {
  446. get { return this.m_CorrectionType2; }
  447. set { this.m_CorrectionType2 = value; }
  448. }
  449. private String m_CorrectionType3;
  450. public String CorrectionType3
  451. {
  452. get { return this.m_CorrectionType3; }
  453. set { this.m_CorrectionType3 = value; }
  454. }
  455. #endregion
  456. //add by zjx 2020-12-20 校正角度 end
  457. //add by zjx 2020-12-20 拉直操作放大倍数
  458. #region 拉直操作放大倍数
  459. private String m_StraightenTimesType0;
  460. public String StraightenTimesType0
  461. {
  462. get { return this.m_StraightenTimesType0; }
  463. set { this.m_StraightenTimesType0 = value; }
  464. }
  465. private String m_StraightenTimesType1;
  466. public String StraightenTimesType1
  467. {
  468. get { return this.m_StraightenTimesType1; }
  469. set { this.m_StraightenTimesType1 = value; }
  470. }
  471. private String m_StraightenTimesType2;
  472. public String StraightenTimesType2
  473. {
  474. get { return this.m_StraightenTimesType2; }
  475. set { this.m_StraightenTimesType2 = value; }
  476. }
  477. private String m_StraightenTimesType3;
  478. public String StraightenTimesType3
  479. {
  480. get { return this.m_StraightenTimesType3; }
  481. set { this.m_StraightenTimesType3 = value; }
  482. }
  483. #endregion
  484. //add by zjx 2020-12-20 拉直操作放大倍数 end
  485. //add by zjx 2020-12-20 样品类型的定位电压
  486. #region 样品类型的定位电压
  487. private String m_PositioningVoltageeType0;
  488. public String PositioningVoltageeType0
  489. {
  490. get { return this.m_PositioningVoltageeType0; }
  491. set { this.m_PositioningVoltageeType0 = value; }
  492. }
  493. private String m_PositioningVoltageeType1;
  494. public String PositioningVoltageeType1
  495. {
  496. get { return this.m_PositioningVoltageeType1; }
  497. set { this.m_PositioningVoltageeType1 = value; }
  498. }
  499. private String m_PositioningVoltageeType2;
  500. public String PositioningVoltageeType2
  501. {
  502. get { return this.m_PositioningVoltageeType2; }
  503. set { this.m_PositioningVoltageeType2 = value; }
  504. }
  505. private String m_PositioningVoltageeType3;
  506. public String PositioningVoltageeType3
  507. {
  508. get { return this.m_PositioningVoltageeType3; }
  509. set { this.m_PositioningVoltageeType3 = value; }
  510. }
  511. #endregion
  512. //add by zjx 2020-12-20 样品类型的定位电压 end
  513. //add by zjx 2020-12-20 样品类型的定位放大倍数
  514. #region 定位放大倍数
  515. private String m_PositioningTimesType0;
  516. public String PositioningTimesType0
  517. {
  518. get { return this.m_PositioningTimesType0; }
  519. set { this.m_PositioningTimesType0 = value; }
  520. }
  521. private String m_PositioningTimesType1;
  522. public String PositioningTimesType1
  523. {
  524. get { return this.m_PositioningTimesType1; }
  525. set { this.m_PositioningTimesType1 = value; }
  526. }
  527. private String m_PositioningTimesType2;
  528. public String PositioningTimesType2
  529. {
  530. get { return this.m_PositioningTimesType2; }
  531. set { this.m_PositioningTimesType2 = value; }
  532. }
  533. private String m_PositioningTimesType3;
  534. public String PositioningTimesType3
  535. {
  536. get { return this.m_PositioningTimesType3; }
  537. set { this.m_PositioningTimesType3 = value; }
  538. }
  539. #endregion
  540. //add by zjx 2020-12-20 样品类型的定位放大倍数 end
  541. //add by zjx 2020-12-20 样品类型的拍照电压
  542. #region 拍照电压
  543. private String m_PhotoVoltageeType0;
  544. public String PhotoVoltageeType0
  545. {
  546. get { return this.m_PhotoVoltageeType0; }
  547. set { this.m_PhotoVoltageeType0 = value; }
  548. }
  549. private String m_PhotoVoltageeType1;
  550. public String PhotoVoltageeType1
  551. {
  552. get { return this.m_PhotoVoltageeType1; }
  553. set { this.m_PhotoVoltageeType1 = value; }
  554. }
  555. private String m_PhotoVoltageeType2;
  556. public String PhotoVoltageeType2
  557. {
  558. get { return this.m_PhotoVoltageeType2; }
  559. set { this.m_PhotoVoltageeType2 = value; }
  560. }
  561. private String m_PhotoVoltageeType3;
  562. public String PhotoVoltageeType3
  563. {
  564. get { return this.m_PhotoVoltageeType3; }
  565. set { this.m_PhotoVoltageeType3 = value; }
  566. }
  567. #endregion
  568. //add by zjx 2020-12-20 样品类型的拍照电压 end
  569. //add by zjx 2020-12-20 样品类型的拍照放大倍数
  570. #region 拍照放大倍数
  571. private String m_PhotoTimesType0;
  572. public String PhotoTimesType0
  573. {
  574. get { return this.m_PhotoTimesType0; }
  575. set { this.m_PhotoTimesType0 = value; }
  576. }
  577. private String m_PhotoTimesType1;
  578. public String PhotoTimesType1
  579. {
  580. get { return this.m_PhotoTimesType1; }
  581. set { this.m_PhotoTimesType1 = value; }
  582. }
  583. private String m_PhotoTimesType2;
  584. public String PhotoTimesType2
  585. {
  586. get { return this.m_PhotoTimesType2; }
  587. set { this.m_PhotoTimesType2 = value; }
  588. }
  589. private String m_PhotoTimesType3;
  590. public String PhotoTimesType3
  591. {
  592. get { return this.m_PhotoTimesType3; }
  593. set { this.m_PhotoTimesType3 = value; }
  594. }
  595. #endregion
  596. //add by zjx 2020-12-20 样品类型的拍照放大倍数 end
  597. //add by zjx 2020-12-20 样品类型的ScanRotate修正参数
  598. #region ScanRotate修正参数
  599. private String m_ScanRotateType0;
  600. public String ScanRotateType0
  601. {
  602. get { return this.m_ScanRotateType0; }
  603. set { this.m_ScanRotateType0 = value; }
  604. }
  605. private String m_ScanRotateType1;
  606. public String ScanRotateType1
  607. {
  608. get { return this.m_ScanRotateType1; }
  609. set { this.m_ScanRotateType1 = value; }
  610. }
  611. private String m_ScanRotateType2;
  612. public String ScanRotateType2
  613. {
  614. get { return this.m_ScanRotateType2; }
  615. set { this.m_ScanRotateType2 = value; }
  616. }
  617. private String m_ScanRotateType3;
  618. public String ScanRotateType3
  619. {
  620. get { return this.m_ScanRotateType3; }
  621. set { this.m_ScanRotateType3 = value; }
  622. }
  623. #endregion
  624. //add by zjx 2020-12-20 样品类型的ScanRotate修正参数 end
  625. //add by zjx 2020-12-20 样品类型的Y轴方向PixelSize修正值
  626. #region Y轴方向PixelSize修正值
  627. private String m_PixelSizeType0;
  628. public String PixelSizeType0
  629. {
  630. get { return this.m_PixelSizeType0; }
  631. set { this.m_PixelSizeType0 = value; }
  632. }
  633. private String m_PixelSizeType1;
  634. public String PixelSizeType1
  635. {
  636. get { return this.m_PixelSizeType1; }
  637. set { this.m_PixelSizeType1 = value; }
  638. }
  639. private String m_PixelSizeType2;
  640. public String PixelSizeType2
  641. {
  642. get { return this.m_PixelSizeType2; }
  643. set { this.m_PixelSizeType2 = value; }
  644. }
  645. private String m_PixelSizeType3;
  646. public String PixelSizeType3
  647. {
  648. get { return this.m_PixelSizeType3; }
  649. set { this.m_PixelSizeType3 = value; }
  650. }
  651. #endregion
  652. //add by zjx 2020-12-20 样品类型的Y轴方向PixelSize修正值 end
  653. //add by zjx 2020-12-20 样品类型的能谱Z轴移动位置
  654. #region 能谱Z轴移动位置
  655. private String m_SEMAxis_ZType0;
  656. public String SEMAxis_ZType0
  657. {
  658. get { return this.m_SEMAxis_ZType0; }
  659. set { this.m_SEMAxis_ZType0 = value; }
  660. }
  661. private String m_SEMAxis_ZType1;
  662. public String SEMAxis_ZType1
  663. {
  664. get { return this.m_SEMAxis_ZType1; }
  665. set { this.m_SEMAxis_ZType1 = value; }
  666. }
  667. private String m_SEMAxis_ZType2;
  668. public String SEMAxis_ZType2
  669. {
  670. get { return this.m_SEMAxis_ZType2; }
  671. set { this.m_SEMAxis_ZType2 = value; }
  672. }
  673. private String m_SEMAxis_ZType3;
  674. public String SEMAxis_ZType3
  675. {
  676. get { return this.m_SEMAxis_ZType3; }
  677. set { this.m_SEMAxis_ZType3 = value; }
  678. }
  679. #endregion
  680. //add by zjx 2020-12-20 样品类型的能谱Z轴移动位置 end
  681. //add by zjx 2020-12-20 样品类型的能谱电压值
  682. #region 能谱电压值
  683. private String m_SEMVoltageeType0;
  684. public String SEMVoltageeType0
  685. {
  686. get { return this.m_SEMVoltageeType0; }
  687. set { this.m_SEMVoltageeType0 = value; }
  688. }
  689. private String m_SEMVoltageeType1;
  690. public String SEMVoltageeType1
  691. {
  692. get { return this.m_SEMVoltageeType1; }
  693. set { this.m_SEMVoltageeType1 = value; }
  694. }
  695. private String m_SEMVoltageeType2;
  696. public String SEMVoltageeType2
  697. {
  698. get { return this.m_SEMVoltageeType2; }
  699. set { this.m_SEMVoltageeType2 = value; }
  700. }
  701. private String m_SEMVoltageeType3;
  702. public String SEMVoltageeType3
  703. {
  704. get { return this.m_SEMVoltageeType3; }
  705. set { this.m_SEMVoltageeType3 = value; }
  706. }
  707. #endregion
  708. //add by zjx 2020-12-20 样品类型的能谱电压值 end
  709. //add by zjx 2020-12-20 样品类型的能谱电流值
  710. #region 能谱电流值
  711. private String m_SEMCurrentType0;
  712. public String SEMCurrentType0
  713. {
  714. get { return this.m_SEMCurrentType0; }
  715. set { this.m_SEMCurrentType0 = value; }
  716. }
  717. private String m_SEMCurrentType1;
  718. public String SEMCurrentType1
  719. {
  720. get { return this.m_SEMCurrentType1; }
  721. set { this.m_SEMCurrentType1 = value; }
  722. }
  723. private String m_SEMCurrentType2;
  724. public String SEMCurrentType2
  725. {
  726. get { return this.m_SEMCurrentType2; }
  727. set { this.m_SEMCurrentType2 = value; }
  728. }
  729. private String m_SEMCurrentType3;
  730. public String SEMCurrentType3
  731. {
  732. get { return this.m_SEMCurrentType3; }
  733. set { this.m_SEMCurrentType3 = value; }
  734. }
  735. #endregion
  736. //add by zjx 2020-12-20 样品类型的能谱电流值 end
  737. #endregion
  738. //构造函数
  739. public MeasureParam()
  740. {
  741. Init();
  742. }
  743. public void Init()
  744. {
  745. this.SampleName = @"";
  746. this.PT = false;
  747. this.FIBTemp = @"";
  748. this.PTTemp = @"";
  749. this.FocusMode = 2;
  750. this.AutoFocus = new FocusParam();
  751. this.AutoFocus.TYPE = 1;
  752. this.AutoStigX = new FocusParam();
  753. this.AutoStigX.TYPE = 2;
  754. this.AutoStigY = new FocusParam();
  755. this.AutoStigY.TYPE = 3;
  756. this.FIBFocus = new FocusParam();
  757. this.FIBFocus.TYPE = 4;
  758. this.Title = false;
  759. this.ZDistance = 0;
  760. this.EDS = false;
  761. this.EDSZ = 0.005f;
  762. this.EDSV = 10000;
  763. this.EDSA = 0.0000000005f;
  764. this.EDSP = new EDSParam();
  765. //FIB自动亮度对比度
  766. this.FIBDo = false;
  767. this.FIBAutoBC = false;
  768. this.FIBB = 51;
  769. this.FIBC = 33;
  770. //档位阈值4个,4个偏差补偿值
  771. this.MagComp = false;
  772. this.MagRange1 = 300;
  773. this.MagCompX1 = 0;
  774. this.MagCompY1 = 0;
  775. this.MagRange2 = 700;
  776. this.MagCompX2 = 0;
  777. this.MagCompY2 = 0;
  778. this.MagRange3 = 2000;
  779. this.MagCompX3 = 0;
  780. this.MagCompY3 = 0;
  781. this.MagRange4 = 6000;
  782. this.fMagCompX4 = 0;
  783. this.fMagCompY4 = 0;
  784. this.ScanRotCor = 1;
  785. this.PixelSizeCor = 1;
  786. //add by sun 2020-12-15 增加不同样品扫描速度参数
  787. this.ScanSpeedNormal = "CMD_SCANRATE4";
  788. this.ScanSpeedFocus = "CMD_SCANRATE5";
  789. this.ScanSpeedHigh = "CMD_SCANRATE7";
  790. //add by sun 2020-12-15 增加不同样品扫描速度参数 end
  791. //20201221
  792. this.RedcueX = 192;
  793. this.RedcueY = 192;
  794. this.RedcueW = 256;
  795. this.RedcueH = 256;
  796. }
  797. //XML文件保存测量参数
  798. public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
  799. {
  800. Slo sFile = new Slo();
  801. //是否拍照和PT
  802. xBool isPhotograph = new xBool();
  803. xBool ptDepostion = new xBool();
  804. xBool isTilt = new xBool();
  805. xBool isEDS = new xBool();
  806. isTilt.AssignValue(this.Title);
  807. isEDS.AssignValue(this.EDS);
  808. isPhotograph.AssignValue(this.is_Photograph);
  809. ptDepostion.AssignValue(this.m_pt);
  810. sFile.Register("Is_Title", isTilt);
  811. sFile.Register("Is_Photograph", isPhotograph);
  812. sFile.Register("PT_Depostion", ptDepostion);
  813. sFile.Register("Is_EDS", isEDS);
  814. //ELY文件
  815. xString ptELYFile = new xString();
  816. xString fibELYFile = new xString();
  817. ptELYFile.AssignValue(this.m_ptTemp);
  818. fibELYFile.AssignValue(this.m_fibTemp);
  819. sFile.Register("PT_ELYFile", ptELYFile);
  820. sFile.Register("FIB_ELYFile", fibELYFile);
  821. //对焦方式
  822. xInt focusmode = new xInt();
  823. focusmode.AssignValue(this.m_fMode);
  824. sFile.Register("FocusMode", focusmode);
  825. //放大倍数和电压参数
  826. xDouble stretchMagnification = new xDouble();
  827. xDouble locationMagnification = new xDouble();
  828. xDouble locationVoltage = new xDouble();
  829. xDouble photographMagnification = new xDouble();
  830. xDouble photographVoltage = new xDouble();
  831. xDouble fibMagnification = new xDouble();
  832. xDouble ZDistance = new xDouble();
  833. xDouble xEDSZ = new xDouble();
  834. xDouble xEDSV = new xDouble();
  835. xDouble xEDSA = new xDouble();
  836. xEDSZ.AssignValue(this.edsZ);
  837. xEDSV.AssignValue(this.edsV);
  838. xEDSA.AssignValue(this.edsA);
  839. ZDistance.AssignValue(this.ZDistance);
  840. stretchMagnification.AssignValue(this.stretch_Magnification);
  841. locationMagnification.AssignValue(this.location_Magnification);
  842. locationVoltage.AssignValue(this.location_Voltage);
  843. photographMagnification.AssignValue(this.photograph_Magnification);
  844. photographVoltage.AssignValue(this.photograph_Voltage);
  845. fibMagnification.AssignValue(this.fib_Magnification);
  846. sFile.Register("Strectch_Magnification", stretchMagnification);
  847. sFile.Register("Locatio_Magnification", locationMagnification);
  848. sFile.Register("Location_Voltage", locationVoltage);
  849. sFile.Register("Photograph_Magnification", photographMagnification);
  850. sFile.Register("Photograph_Voltage", photographVoltage);
  851. sFile.Register("FIB_Magnification", fibMagnification);
  852. sFile.Register("ZDistance", ZDistance);
  853. sFile.Register("EDSZ", xEDSZ);
  854. sFile.Register("EDSV", xEDSV);
  855. sFile.Register("EDSA", xEDSA);
  856. //校正角度
  857. xDouble correctionAngle = new xDouble();
  858. correctionAngle.AssignValue(this.correction_Angle);
  859. sFile.Register("Correction_Angle", correctionAngle);
  860. //样品名称和厂商
  861. xString sampleType = new xString();
  862. xString _firm = new xString();
  863. sampleType.AssignValue(this.m_SampleName);
  864. _firm.AssignValue(this.firm);
  865. sFile.Register("Sample_Type", sampleType);
  866. sFile.Register("Firm", _firm);
  867. //对焦参数
  868. sFile.Register("Focus_Param", this.focusP);
  869. sFile.Register("FIBFocus_Param", this.FIBFocus);
  870. sFile.Register("StigX_Param", this.AutoStigX);
  871. sFile.Register("StigY_Param", this.AutoStigY);
  872. sFile.Register("EDS_Param", this.EDSP);
  873. //FIB亮度对比
  874. xBool isFIBDo = new xBool();
  875. xBool isFIBAutoBC = new xBool();
  876. xDouble xFIBB = new xDouble();
  877. xDouble xFIBC = new xDouble();
  878. xBool isMagComp = new xBool();
  879. xDouble xMagRange1 = new xDouble();
  880. xDouble xMagCompX1 = new xDouble();
  881. xDouble xMagCompY1 = new xDouble();
  882. xDouble xMagRange2 = new xDouble();
  883. xDouble xMagCompX2 = new xDouble();
  884. xDouble xMagCompY2 = new xDouble();
  885. xDouble xMagRange3 = new xDouble();
  886. xDouble xMagCompX3 = new xDouble();
  887. xDouble xMagCompY3 = new xDouble();
  888. xDouble xMagRange4 = new xDouble();
  889. xDouble xMagCompX4 = new xDouble();
  890. xDouble xMagCompY4 = new xDouble();
  891. isFIBDo.AssignValue(this.FIBDo);
  892. isFIBAutoBC.AssignValue(this.FIBAutoBC);
  893. xFIBB.AssignValue(this.FIBB);
  894. xFIBC.AssignValue(this.FIBC);
  895. isMagComp.AssignValue(this.MagComp);
  896. xMagRange1.AssignValue(this.MagRange1);
  897. xMagCompX1.AssignValue(this.MagCompX1);
  898. xMagCompY1.AssignValue(this.MagCompY1);
  899. xMagRange2.AssignValue(this.MagRange2);
  900. xMagCompX2.AssignValue(this.MagCompX2);
  901. xMagCompY2.AssignValue(this.MagCompY2);
  902. xMagRange3.AssignValue(this.MagRange3);
  903. xMagCompX3.AssignValue(this.MagCompX3);
  904. xMagCompY3.AssignValue(this.MagCompY3);
  905. xMagRange4.AssignValue(this.MagRange4);
  906. xMagCompX4.AssignValue(this.MagCompX4);
  907. xMagCompY4.AssignValue(this.MagCompY4);
  908. sFile.Register("Is_FIBDo", isFIBDo);
  909. sFile.Register("Is_FIBAutoBC", isFIBAutoBC);
  910. sFile.Register("FIB_B", xFIBB);
  911. sFile.Register("FIB_C", xFIBC);
  912. sFile.Register("Mag_Comp", isMagComp);
  913. sFile.Register("Mag_Range1", xMagRange1);
  914. sFile.Register("Mag_CompX1", xMagCompX1);
  915. sFile.Register("Mag_CompY1", xMagCompY1);
  916. sFile.Register("Mag_Range2", xMagRange2);
  917. sFile.Register("Mag_CompX2", xMagCompX2);
  918. sFile.Register("Mag_CompY2", xMagCompY2);
  919. sFile.Register("Mag_Range3", xMagRange3);
  920. sFile.Register("Mag_CompX3", xMagCompX3);
  921. sFile.Register("Mag_CompY3", xMagCompY3);
  922. sFile.Register("Mag_Range4", xMagRange4);
  923. sFile.Register("Mag_CompX4", xMagCompX4);
  924. sFile.Register("Mag_CompY4", xMagCompY4);
  925. //ScanRotate修正
  926. xDouble scanRotate = new xDouble();
  927. scanRotate.AssignValue(this.scanRotCor);
  928. sFile.Register("ScanRotateCorrect", scanRotate);
  929. //PixelSize_Y轴补偿
  930. xDouble pscor = new xDouble();
  931. pscor.AssignValue(this.pixelSizeCor);
  932. sFile.Register("PixelSizeYCorrect", pscor);
  933. //Reduce窗口相关
  934. xInt R_X = new xInt();
  935. R_X.AssignValue(this.RedcueX);
  936. sFile.Register("RedcueX", R_X);
  937. xInt R_Y = new xInt();
  938. R_Y.AssignValue(this.RedcueY);
  939. sFile.Register("RedcueY", R_Y);
  940. xInt R_W = new xInt();
  941. R_W.AssignValue(this.RedcueW);
  942. sFile.Register("RedcueX", R_W);
  943. xInt R_H = new xInt();
  944. R_H.AssignValue(this.RedcueH);
  945. sFile.Register("RedcueX", R_H);
  946. if (isStoring)
  947. {
  948. sFile.Serialize(true, xml, rootNode);
  949. }
  950. else
  951. {
  952. sFile.Serialize(false, xml, rootNode);
  953. this.is_Photograph = isPhotograph.value();
  954. this.m_pt = ptDepostion.value();
  955. this.Title = isTilt.value();
  956. this.EDS = isEDS.value();
  957. this.m_ptTemp = ptELYFile.value();
  958. this.m_fibTemp = fibELYFile.value();
  959. this.m_fMode = focusmode.value();
  960. this.stretch_Magnification = Convert.ToSingle(stretchMagnification.value());
  961. this.location_Magnification = Convert.ToSingle(locationMagnification.value());
  962. this.location_Voltage = Convert.ToSingle(locationVoltage.value());
  963. this.photograph_Magnification = Convert.ToSingle(photographMagnification.value());
  964. this.photograph_Voltage = Convert.ToSingle(photographVoltage.value());
  965. this.correction_Angle = Convert.ToSingle(correctionAngle.value());
  966. this.m_SampleName = sampleType.value();
  967. this.firm = _firm.value();
  968. this.ZDistance = Convert.ToSingle(ZDistance.value());
  969. this.EDSZ = Convert.ToSingle(xEDSZ.value());
  970. this.EDSV = Convert.ToSingle(xEDSV.value());
  971. this.EDSA = Convert.ToSingle(xEDSA.value());
  972. this.IsFIBDo = isFIBDo.value();
  973. this.IsFIBAutoBC = isFIBAutoBC.value();
  974. this.FIBB = Convert.ToSingle(xFIBB.value());
  975. this.FIBC = Convert.ToSingle(xFIBC.value());
  976. this.MagComp = isMagComp.value();
  977. this.MagRange1 = Convert.ToSingle(xMagRange1.value());
  978. this.MagCompX1 = Convert.ToSingle(xMagCompX1.value());
  979. this.MagCompY1 = Convert.ToSingle(xMagCompY1.value());
  980. this.MagRange2 = Convert.ToSingle(xMagRange2.value());
  981. this.MagCompX2 = Convert.ToSingle(xMagCompX2.value());
  982. this.MagCompY2 = Convert.ToSingle(xMagCompY2.value());
  983. this.MagRange3 = Convert.ToSingle(xMagRange3.value());
  984. this.MagCompX3 = Convert.ToSingle(xMagCompX3.value());
  985. this.MagCompY3 = Convert.ToSingle(xMagCompY3.value());
  986. this.MagRange4 = Convert.ToSingle(xMagRange4.value());
  987. this.fMagCompX4 = Convert.ToSingle(xMagCompX4.value());
  988. this.MagCompY4 = Convert.ToSingle(xMagCompY4.value());
  989. this.ScanRotCor = Convert.ToSingle(scanRotate.value());
  990. this.PixelSizeCor = Convert.ToSingle(pscor.value());
  991. this.RedcueX = Convert.ToInt32(R_X.value());
  992. this.RedcueY = Convert.ToInt32(R_Y.value());
  993. this.RedcueW = Convert.ToInt32(R_W.value());
  994. this.RedcueH = Convert.ToInt32(R_H.value());
  995. }
  996. }
  997. }
  998. }