frmReportSysConfig.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  1. using OTSIncAReportApp;
  2. using OTSIncAReportApp.Controls;
  3. using OTSIncAReportApp.OTSDataMgrFunction;
  4. using OTSIncAReportApp.OTSMgrInfo;
  5. using OTSIncAReportApp.SysMgrTools;
  6. using OTSPeriodicTable;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Data;
  10. using System.IO;
  11. using System.Windows.Forms;
  12. namespace OTSIncAReprotCharts
  13. {
  14. public partial class frmReportSysConfig : Form
  15. {
  16. #region 变量
  17. public ResultDataMgr m_DataMgrFun = null;
  18. //粒级文件夹路径
  19. public static string m_PathName = "";
  20. //粒级文件夹获取
  21. public static string m_strPath = "";
  22. /// <summary>
  23. /// 保存的全局主窗体对象
  24. /// </summary>
  25. frmReportApp m_ReportApp;
  26. #endregion
  27. #region 构造函数及窗体加载
  28. public frmReportSysConfig(frmReportApp ReportApp)
  29. {
  30. InitializeComponent();
  31. //粒级部分
  32. this.m_DataMgrFun = ReportApp.m_rstDataMgr;
  33. m_ReportApp = ReportApp;
  34. //参数设置
  35. tb_sjtmbwj.Text = "";
  36. #region 国际化语言
  37. Language lan = new Language(this);
  38. #endregion
  39. }
  40. /// <summary>
  41. /// 加载下拉框控件数据
  42. /// </summary>
  43. private void BindCombobox()
  44. {
  45. //加载默认显示列名下拉框
  46. foreach (OTSIncAReportApp.OTSSampleReportInfo.ComputedColNameEnum enum_one in Enum.GetValues(typeof(OTSIncAReportApp.OTSSampleReportInfo.ComputedColNameEnum)))
  47. {
  48. string str_text = string.Empty;
  49. string str_value = string.Empty;
  50. if (enum_one == OTSIncAReportApp.OTSSampleReportInfo.ComputedColNameEnum.Area)
  51. {
  52. str_text = "面积";
  53. }
  54. if (enum_one == OTSIncAReportApp.OTSSampleReportInfo.ComputedColNameEnum.EquivalentCircleDiameter)
  55. {
  56. str_text = "等效圆直径";
  57. }
  58. if (enum_one == OTSIncAReportApp.OTSSampleReportInfo.ComputedColNameEnum.MaxDiameter)
  59. {
  60. str_text = "最长直径";
  61. }
  62. if (enum_one == OTSIncAReportApp.OTSSampleReportInfo.ComputedColNameEnum.MinDiameter)
  63. {
  64. str_text = "最短直径";
  65. }
  66. if (enum_one == OTSIncAReportApp.OTSSampleReportInfo.ComputedColNameEnum.DiameterRatio)
  67. {
  68. str_text = "长短直径比";
  69. }
  70. if (enum_one == OTSIncAReportApp.OTSSampleReportInfo.ComputedColNameEnum.FerretDiameter)
  71. {
  72. str_text = "费雷特直径";
  73. }
  74. }
  75. }
  76. private void ReportMgrInfoForm_Load(object sender, EventArgs e)
  77. {
  78. //初始化数据
  79. InitMyComponent();
  80. }
  81. #endregion
  82. #region 自定义方法
  83. public void InitMyComponent()
  84. {
  85. string imagepath;
  86. //显示程序管理对话框参数设置
  87. string strbpath = ".\\Config\\ProData\\";
  88. tb_PartiSizeFileFolder.Text = strbpath;
  89. imagepath = strbpath;
  90. tb_sjtmb.Text = strbpath;
  91. tb_sjtmbwj.Text = "DefaultTriTemplateFile.tpf";
  92. //一般参数内的所有textbox不可修改
  93. tb_sjtmb.ReadOnly = true;
  94. tb_sjtmbwj.ReadOnly = true;
  95. tb_PartiSizeFileFolder.ReadOnly = true;
  96. string str_DefaultComputedColName = "", str_ElementsColName = "";
  97. DataSet ds = OTSIncAReportApp.DataOperation.DataAccess.XMLoperate.GetXmlData(Application.StartupPath + m_ReportApp.m_OTSReportMgrParamFile, "XMLData");
  98. DataTable dt = ds.Tables["Member"];
  99. string str_scale="";
  100. foreach (DataRow element in dt.Rows)
  101. {
  102. string RegName = element["RegName"].ToString();
  103. if (RegName == "DefaultComputedColName")
  104. {
  105. str_DefaultComputedColName = element["strValue"].ToString();
  106. }
  107. if (RegName == "ElementsColName")
  108. {
  109. str_ElementsColName = element["strValue"].ToString();
  110. }
  111. if (RegName == "Scale")
  112. {
  113. str_scale = element["strValue"].ToString();
  114. }
  115. }
  116. //比例因子
  117. tb_blyz.Text = str_scale;
  118. //显示元素
  119. tb_xsys.Text = str_ElementsColName;
  120. //设置计算显示列
  121. SetShowColumnsListStr(str_DefaultComputedColName);
  122. }
  123. private void tb_blyz_KeyPress(object sender, KeyPressEventArgs e)
  124. {
  125. if (((int)e.KeyChar < 48 || (int)e.KeyChar > 57) && (int)e.KeyChar != 8 && (int)e.KeyChar != 46)
  126. e.Handled = true;
  127. //小数点的处理。
  128. if ((int)e.KeyChar == 46) //小数点
  129. {
  130. if (tb_blyz.Text.Length <= 0)
  131. e.Handled = true; //小数点不能在第一位
  132. else
  133. {
  134. float f;
  135. float oldf;
  136. bool b1 = false, b2 = false;
  137. b1 = float.TryParse(tb_blyz.Text, out oldf);
  138. b2 = float.TryParse(tb_blyz.Text + e.KeyChar.ToString(), out f);
  139. if (b2 == false)
  140. {
  141. if (b1 == true)
  142. e.Handled = true;
  143. else
  144. e.Handled = false;
  145. }
  146. }
  147. }
  148. }
  149. #endregion
  150. #region 三元相图相关
  151. //三元相图模板文件夹
  152. private void btn_klljwjj_Click(object sender, EventArgs e)
  153. {
  154. if (tb_PartiSizeFileFolder.Text == ".\\Config\\ProData\\")
  155. {
  156. string strb = ".\\Config\\ProData\\";
  157. folderBrowserDialog1.SelectedPath = strb;
  158. if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
  159. {
  160. tb_PartiSizeFileFolder.Text = folderBrowserDialog1.SelectedPath;
  161. }
  162. }
  163. else
  164. {
  165. if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
  166. {
  167. tb_PartiSizeFileFolder.Text = folderBrowserDialog1.SelectedPath;
  168. }
  169. else
  170. {
  171. tb_PartiSizeFileFolder.Text = folderBrowserDialog1.SelectedPath;
  172. }
  173. }
  174. }
  175. private void btn_sjtwj_Click(object sender, EventArgs e)
  176. {
  177. Triangulation_List tl = new Triangulation_List(m_ReportApp);
  178. tl.ShowDialog();
  179. }
  180. #endregion
  181. #region 粒级相关
  182. //颗粒粒级文件夹
  183. private void btn_sjtmbwjj_Click(object sender, EventArgs e)
  184. {
  185. //点击颗粒粒级文件夹按钮
  186. folderBrowserDialog1.ShowDialog();
  187. tb_sjtmb.Text = folderBrowserDialog1.SelectedPath;
  188. }
  189. private void btn_PartSize_Click(object sender, EventArgs e)
  190. {
  191. frmPartSizeEditorNew fPSEN = new frmPartSizeEditorNew(m_ReportApp, tb_PartiSizeFileFolder.Text);
  192. if (fPSEN.ShowDialog() == DialogResult.OK)
  193. {
  194. }
  195. }
  196. #endregion
  197. #region 报告模板相关
  198. //报表模板
  199. private void btn_bbmbwjj_Click(object sender, EventArgs e)
  200. {
  201. FolderBrowserDialog ofd = new FolderBrowserDialog();
  202. if (ofd.ShowDialog() == DialogResult.OK)
  203. {
  204. //tb_bgmb.Text = ofd.SelectedPath + @"\";
  205. }
  206. }
  207. //参数设置,报告模板文件
  208. private void button2_Click(object sender, EventArgs e)
  209. {
  210. //if (tb_bgmb.Text != "")
  211. //{
  212. // OpenFileDialog op = new OpenFileDialog();
  213. // string strpath = "";
  214. // op.InitialDirectory = tb_bgmb.Text;
  215. // if (op.ShowDialog() == DialogResult.OK)
  216. // {
  217. // strpath = op.FileName;
  218. // tb_bgmbwj.Text = strpath;
  219. // }
  220. //}
  221. }
  222. #endregion
  223. #region 报告参数设置相关
  224. //取消
  225. private void btn_ybcsqx_Click(object sender, EventArgs e)
  226. {
  227. this.Close();
  228. }
  229. public string strParSizeFile = "";
  230. //保存报告文件
  231. private void btn_ybcsbc_Click(object sender, EventArgs e)
  232. {
  233. //参数设置保存功能粒级文件
  234. strParSizeFile = tb_PartiSizeFileFolder.Text;
  235. String strTritempFile = tb_sjtmb.Text;
  236. string strTritemp = tb_sjtmbwj.Text;
  237. //保存显示计算项
  238. string[] AttributeName_DefaultComputedColName = new string[] { "RegName", "strValue" };
  239. string[] Value_DefaultComputedColName = new string[] { "DefaultComputedColName", GetShowColumnsListStr() };
  240. bool ret = OTSIncAReportApp.DataOperation.DataAccess.XMLoperate.UpdateByAttribute(Application.StartupPath + m_ReportApp.m_OTSReportMgrParamFile, AttributeName_DefaultComputedColName, Value_DefaultComputedColName);
  241. //保存显示元素信息
  242. string[] AttributeName_ElementsColName = new string[] { "RegName", "strValue" };
  243. string[] Value_ElementsColName = new string[] { "ElementsColName", tb_xsys.Text.Trim()};
  244. ret = OTSIncAReportApp.DataOperation.DataAccess.XMLoperate.UpdateByAttribute(Application.StartupPath + m_ReportApp.m_OTSReportMgrParamFile, AttributeName_ElementsColName, Value_ElementsColName);
  245. //比例因子
  246. OTSIncAReportApp.DataOperation.DataAccess.XMLoperate.EditXmlInfo(Application.StartupPath + m_ReportApp.m_OTSReportMgrParamFile, "Scale", "strValue", tb_blyz.Text.ToString());
  247. //因为设置了颗粒列表的显示列,颗粒列表则需要重新加载,设置为null,后面可以重新加载
  248. m_ReportApp.im_ParticlesGridDevidePage = null;
  249. this.Close();
  250. }
  251. #endregion
  252. #region 规则标准库部份
  253. private void button2_Click_1(object sender, EventArgs e)
  254. {
  255. //标准库规则编辑器
  256. string exefile = "OTSPartA_STDEditor_d.exe";
  257. if (File.Exists(exefile))
  258. {
  259. System.Diagnostics.Process process = new System.Diagnostics.Process();
  260. // params 为 string 类型的参数,多个参数以空格分隔,如果某个参数为空,可以传入””
  261. System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(exefile, "");
  262. process.StartInfo = startInfo;
  263. process.Start();
  264. }
  265. }
  266. #endregion
  267. private void btn_xsys_Click(object sender, EventArgs e)
  268. {
  269. //打开编辑元素列表窗体
  270. OTSPeriodicTableForm_Small opts = new OTSPeriodicTableForm_Small();
  271. //获取需要显示的元素列表,并转换成元素周期表窗体可接受的格式,传入----------------------
  272. string str_xsys = tb_xsys.Text.Trim();
  273. List<string> list_str = new List<string>();
  274. string[] strs = str_xsys.Split(',');
  275. for (int i = 0; i < strs.Length; i++)
  276. {
  277. list_str.Add(strs[i]);
  278. }
  279. //清除元素周期表中所有的记录
  280. opts.m_List_Periodic.Clear();
  281. //将该分类下的元素添加到元素周期表窗体的List_periodic中
  282. for (int i = 0; i < strs.Length; i++)
  283. {
  284. string str_ysm = strs[i];
  285. Periodic ls_periodic = new Periodic();
  286. ls_periodic = CListPeriodic.GetPeriodicByYsm(CListPeriodic.GetListPeriodic(), str_ysm);
  287. opts.m_List_Periodic.Add(ls_periodic);
  288. }
  289. //----------------------------------------------------------------------------------------
  290. opts.StartPosition = FormStartPosition.CenterScreen;
  291. opts.ShowDialog();
  292. List<string> PeriodicFH = new List<string>();
  293. for (int j = 0; j < opts.m_List_Periodic.Count; j++)
  294. {
  295. PeriodicFH.Add(opts.m_List_Periodic[j].FH);
  296. }
  297. PeriodicFH.Sort(delegate (string a, string b) { return ReturnsAtomicNumberByElementName(a).CompareTo(ReturnsAtomicNumberByElementName(b)); });//排序 从小到大原子序数
  298. list_str = list_str.FindAll(delegate (string a) { return PeriodicFH.Contains(a); });
  299. PeriodicFH = PeriodicFH.FindAll(delegate (string a) { return !list_str.Contains(a); });
  300. //先清空元素
  301. str_xsys = "";
  302. //然后再将选择的元素,组合起来,返回显示到该窗体上
  303. for (int i = 0; i < list_str.Count; i++)
  304. {
  305. if (str_xsys == "")
  306. {
  307. str_xsys = list_str[i];
  308. }
  309. else
  310. {
  311. str_xsys = str_xsys + "," + list_str[i];
  312. }
  313. }
  314. for (int i = 0; i < PeriodicFH.Count; i++)
  315. {
  316. if (str_xsys == "")
  317. {
  318. str_xsys = PeriodicFH[i];
  319. }
  320. else
  321. {
  322. str_xsys = str_xsys + "," + PeriodicFH[i];
  323. }
  324. }
  325. //再对选择的元素进行显示
  326. tb_xsys.Text = str_xsys;
  327. }
  328. /// <summary>
  329. /// 将配置文件中的字段,拆分设置到各checkbox中
  330. /// </summary>
  331. private void SetShowColumnsListStr(string in_str)
  332. {
  333. cb_Area.Checked = false;
  334. cb_EquivalentCircleDiameter.Checked = false;
  335. cb_MaxDiameter.Checked = false;
  336. cb_MinDiameter.Checked = false;
  337. cb_DiameterRatio.Checked = false;
  338. cb_FerretDiameter.Checked = false;
  339. cb_PERP.Checked = false;
  340. cb_PERI.Checked = false;
  341. cb_INSCR.Checked = false;
  342. cb_MEAN.Checked = false;
  343. cb_ELONG.Checked = false;
  344. cb_ASPECT_ELONG.Checked = false;
  345. cb_Orientation.Checked = false;
  346. //面积
  347. if (in_str.IndexOf("Area") > -1)
  348. {
  349. cb_Area.Checked = true;
  350. }
  351. //等效圆直径
  352. if (in_str.IndexOf("EquivalentCircleDiameter") > -1)
  353. {
  354. cb_EquivalentCircleDiameter.Checked = true;
  355. }
  356. //最长直径
  357. if (in_str.IndexOf("MaxDiameter") > -1)
  358. {
  359. cb_MaxDiameter.Checked = true;
  360. }
  361. //最短直径
  362. if (in_str.IndexOf("MinDiameter") > -1)
  363. {
  364. cb_MinDiameter.Checked = true;
  365. }
  366. //长短直径比
  367. if (in_str.IndexOf("DiameterRatio") > -1)
  368. {
  369. cb_DiameterRatio.Checked = true;
  370. }
  371. //费雷特直径
  372. if (in_str.IndexOf("FerretDiameter") > -1)
  373. {
  374. cb_FerretDiameter.Checked = true;
  375. }
  376. //正交直径
  377. if (in_str.IndexOf("PERP") > -1)
  378. {
  379. cb_PERP.Checked = true;
  380. }
  381. //周长
  382. if (in_str.IndexOf("PERI") > -1)
  383. {
  384. cb_PERI.Checked = true;
  385. }
  386. //内接圆直径
  387. if (in_str.IndexOf("INSCR") > -1)
  388. {
  389. cb_INSCR.Checked = true;
  390. }
  391. //内接圆平均直径
  392. if (in_str.IndexOf("MEAN") > -1)
  393. {
  394. cb_MEAN.Checked = true;
  395. }
  396. //展开长度
  397. if (in_str.IndexOf("ELONG") > -1)
  398. {
  399. cb_ELONG.Checked = true;
  400. }
  401. //展开长度比
  402. if (in_str.IndexOf("ASPECT_ELONG") > -1)
  403. {
  404. cb_ASPECT_ELONG.Checked = true;
  405. }
  406. //朝向角度
  407. if (in_str.IndexOf("Orientation") > -1)
  408. {
  409. cb_Orientation.Checked = true;
  410. }
  411. //按高经理要求,先都默认全部都是勾选上
  412. //cb_Area.Checked = true;
  413. //cb_EquivalentCircleDiameter.Checked = true;
  414. //cb_MaxDiameter.Checked = true;
  415. //cb_MinDiameter.Checked = true;
  416. //cb_DiameterRatio.Checked = true;
  417. //cb_FerretDiameter.Checked = true;
  418. //cb_PERP.Checked = true;
  419. //cb_PERI.Checked = true;
  420. //cb_INSCR.Checked = true;
  421. //cb_MEAN.Checked = true;
  422. //cb_ELONG.Checked = true;
  423. //cb_ASPECT_ELONG.Checked = true;
  424. //cb_ASPECT_MAX.Checked = true;
  425. //cb_Orientation.Checked = true;
  426. }
  427. /// <summary>
  428. /// 获取从各checkbox中组合完成的字段
  429. /// </summary>
  430. private string GetShowColumnsListStr()
  431. {
  432. string str_ret = "";
  433. //面积
  434. if (cb_Area.Checked == true)
  435. {
  436. str_ret = str_ret + "Area" + ",";
  437. }
  438. //等效圆直径
  439. if (cb_EquivalentCircleDiameter.Checked == true)
  440. {
  441. str_ret = str_ret + "EquivalentCircleDiameter" + ",";
  442. }
  443. //最长直径
  444. if (cb_MaxDiameter.Checked == true)
  445. {
  446. str_ret = str_ret + "MaxDiameter" + ",";
  447. }
  448. //最短直径
  449. if (cb_MinDiameter.Checked == true)
  450. {
  451. str_ret = str_ret + "MinDiameter" + ",";
  452. }
  453. //长短直径比
  454. if (cb_DiameterRatio.Checked == true)
  455. {
  456. str_ret = str_ret + "DiameterRatio" + ",";
  457. }
  458. //费雷特直径
  459. if (cb_FerretDiameter.Checked == true)
  460. {
  461. str_ret = str_ret + "FerretDiameter" + ",";
  462. }
  463. //正交直径
  464. if (cb_PERP.Checked == true)
  465. {
  466. str_ret = str_ret + "PERP" + ",";
  467. }
  468. //周长
  469. if (cb_PERI.Checked == true)
  470. {
  471. str_ret = str_ret + "PERI" + ",";
  472. }
  473. //内接圆直径
  474. if (cb_INSCR.Checked == true)
  475. {
  476. str_ret = str_ret + "INSCR" + ",";
  477. }
  478. //内接圆平均直径
  479. if (cb_MEAN.Checked == true)
  480. {
  481. str_ret = str_ret + "MEAN" + ",";
  482. }
  483. //展开长度
  484. if (cb_ELONG.Checked == true)
  485. {
  486. str_ret = str_ret + "ELONG" + ",";
  487. }
  488. //展开长度比
  489. if (cb_ASPECT_ELONG.Checked == true)
  490. {
  491. str_ret = str_ret + "ASPECT_ELONG" + ",";
  492. }
  493. //朝向角度
  494. if (cb_Orientation.Checked == true)
  495. {
  496. str_ret = str_ret + "Orientation" + ",";
  497. }
  498. if (str_ret.Length > 0)
  499. {
  500. str_ret = str_ret.Substring(0, str_ret.Length - 1);
  501. }
  502. return str_ret;
  503. }
  504. /// <summary>
  505. /// 返回原子序数
  506. /// </summary>
  507. /// <param name="ElementName"></param>
  508. /// <returns></returns>
  509. int ReturnsAtomicNumberByElementName(string ElementName)
  510. {
  511. switch (ElementName)
  512. {
  513. case "H": return 1;
  514. case "He": return 2;
  515. case "Li": return 3;
  516. case "Be": return 4;
  517. case "B": return 5;
  518. case "C": return 6;
  519. case "N": return 7;
  520. case "O": return 8;
  521. case "F": return 9;
  522. case "Ne": return 10;
  523. case "Na": return 11;
  524. case "Mg": return 12;
  525. case "Al": return 13;
  526. case "Si": return 14;
  527. case "P": return 15;
  528. case "S": return 16;
  529. case "Cl": return 17;
  530. case "Ar": return 18;
  531. case "K": return 19;
  532. case "Ca": return 20;
  533. case "Sc": return 21;
  534. case "Ti": return 22;
  535. case "V": return 23;
  536. case "Cr": return 24;
  537. case "Mn": return 25;
  538. case "Fe": return 26;
  539. case "Co": return 27;
  540. case "Ni": return 28;
  541. case "Cu": return 29;
  542. case "Zn": return 30;
  543. case "Ga": return 31;
  544. case "Ge": return 32;
  545. case "As": return 33;
  546. case "Se": return 34;
  547. case "Br": return 35;
  548. case "Kr": return 36;
  549. case "Rb": return 37;
  550. case "Sr": return 38;
  551. case "Y": return 39;
  552. case "Zr": return 40;
  553. case "Nb": return 41;
  554. case "Mo": return 42;
  555. case "Tc": return 43;
  556. case "Ru": return 44;
  557. case "Rh": return 45;
  558. case "Pd": return 46;
  559. case "Ag": return 47;
  560. case "Cd": return 48;
  561. case "In": return 49;
  562. case "Sn": return 50;
  563. case "Sb": return 51;
  564. case "Te": return 52;
  565. case "I": return 53;
  566. case "Xe": return 54;
  567. case "Cs": return 55;
  568. case "Ba": return 56;
  569. case "La": return 57;
  570. case "Ce": return 58;
  571. case "Pr": return 59;
  572. case "Nd": return 60;
  573. case "Pm": return 61;
  574. case "Sm": return 62;
  575. case "Eu": return 63;
  576. case "Gd": return 64;
  577. case "Tb": return 65;
  578. case "Dy": return 66;
  579. case "Ho": return 67;
  580. case "Er": return 68;
  581. case "Tm": return 69;
  582. case "Yb": return 70;
  583. case "Lu": return 71;
  584. case "Hf": return 72;
  585. case "Ta": return 73;
  586. case "W": return 74;
  587. case "Re": return 75;
  588. case "Os": return 76;
  589. case "Ir": return 77;
  590. case "Pt": return 78;
  591. case "Au": return 79;
  592. case "Hq": return 80;
  593. case "TI": return 81;
  594. case "Pb": return 82;
  595. case "Bi": return 83;
  596. case "Po": return 84;
  597. case "At": return 85;
  598. case "Rn": return 86;
  599. case "Fr": return 87;
  600. case "Ra": return 88;
  601. case "Ac": return 89;
  602. case "Th": return 90;
  603. case "Pa": return 91;
  604. case "U": return 92;
  605. case "Np": return 93;
  606. case "Pu": return 94;
  607. case "Am": return 95;
  608. case "Cm": return 96;
  609. case "Bk": return 97;
  610. case "Cf": return 98;
  611. case "Es": return 99;
  612. case "Fm": return 100;
  613. case "Mc": return 101;
  614. case "No": return 102;
  615. case "Lr": return 103;
  616. case "Rf": return 104;
  617. case "Db": return 105;
  618. case "Sg": return 106;
  619. case "Bh": return 107;
  620. case "Hs": return 108;
  621. case "Mt": return 109;
  622. case "Ds": return 110;
  623. case "Rg": return 111;
  624. case "Unb": return 112;
  625. default: return 1000;
  626. }
  627. }
  628. }
  629. }