Browse Source

add untracked files

gsp 1 year ago
parent
commit
174b0f37ca

+ 345 - 0
OTSCommon/ExportToExcel.cs

@@ -0,0 +1,345 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using NPOI.SS.UserModel;
+using NPOI.HSSF.UserModel;//导出xls格式用HSSF
+using NPOI.XSSF.UserModel;//导出xlsx格式用XSSF
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Diagnostics;
+using NPOI.SS.Util;
+
+
+namespace ExportToExcel
+{
+    public class ExportDgvToExcel
+    {
+        #region  NPOI DataGridView 导出 EXCEL
+        /// <summary>
+        ///  NPOI DataGridView 导出 EXCEL
+        ///  03版Excel-xls最大行数是65536行,最大列数是256列
+        ///  07版Excel-xlsx最大行数是1048576行,最大列数是16384列
+        /// </summary>
+        /// <param name="imagePath">图片路径</param>
+        /// <param name="dgv">DataGridView</param>
+        /// <param name="fontname">字体名称</param>
+        /// <param name="fontsize">字体大小</param> 
+
+        public void ExportExcel(string imagePath, DataGridView dgv, string fontname, short fontsize)
+        {
+            IWorkbook workbook;
+            ISheet sheet;
+            Stopwatch sw = null;
+
+            //判断datagridview中内容是否为空
+            if (dgv.Rows.Count == 0)
+            {
+                MessageBox.Show("DataGridView中内容为空,请先导入数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            //保存文件
+            string saveFileName = "";
+            SaveFileDialog saveFileDialog = new SaveFileDialog();
+            saveFileDialog.DefaultExt = "xls";
+            saveFileDialog.Filter = "Excel文件(*.xls)|*.xls|Excel文件(*.xlsx)|*.xlsx";
+            saveFileDialog.RestoreDirectory = true;
+            saveFileDialog.Title = "Excel文件保存路径";
+            MemoryStream ms = new MemoryStream(); //MemoryStream
+            if (saveFileDialog.ShowDialog() == DialogResult.OK)
+            {
+                //**程序开始计时**//
+                sw = new Stopwatch();
+                sw.Start();
+
+                saveFileName = saveFileDialog.FileName;
+
+                //检测文件是否被占用
+                if (!CheckFiles(saveFileName))
+                {
+                    MessageBox.Show("文件被占用,请关闭文件" + saveFileName);
+                    workbook = null;
+                    ms.Close();
+                    ms.Dispose();
+                    return;
+                }
+            }
+            else
+            {
+                workbook = null;
+                ms.Close();
+                ms.Dispose();
+            }
+
+            //*** 根据扩展名xls和xlsx来创建对象
+            string fileExt = Path.GetExtension(saveFileName).ToLower();
+            if (fileExt == ".xlsx")
+            {
+                workbook = new XSSFWorkbook();
+            }
+            else if (fileExt == ".xls")
+            {
+                workbook = new HSSFWorkbook();
+            }
+            else
+            {
+                workbook = null;
+            }
+            //***
+
+            //创建Sheet
+            if (workbook != null)
+            {
+                sheet = workbook.CreateSheet("二次采集颗粒");//Sheet的名称  
+            }
+            else
+            {
+                return;
+            }
+
+            //设置单元格样式
+            ICellStyle cellStyle = workbook.CreateCellStyle();
+            //水平居中对齐和垂直居中对齐
+            cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+            cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+            //设置字体
+            IFont font = workbook.CreateFont();
+            font.FontName = fontname;//字体名称
+            font.FontHeightInPoints = fontsize;//字号
+            font.Color = NPOI.HSSF.Util.HSSFColor.Black.Index;//字体颜色
+            cellStyle.SetFont(font);
+
+            //添加列名
+            IRow headRow = sheet.CreateRow(0);
+            for (int i = 0; i < dgv.Columns.Count; i++)
+            {
+                //隐藏行列不导出
+                if (dgv.Columns[i].Visible == true)
+                {
+                    headRow.CreateCell(i).SetCellValue(dgv.Columns[i].HeaderText);
+                    headRow.GetCell(i).CellStyle = cellStyle;
+                }
+                if (i == 4)
+                {
+                    headRow.CreateCell(i).SetCellValue("图片");
+                    headRow.GetCell(i).CellStyle = cellStyle;
+                }
+                if (i == 6)
+                {
+                    headRow.CreateCell(i).SetCellValue("谱图");
+                    headRow.GetCell(i).CellStyle = cellStyle;
+                }
+            }
+
+            //根据类型写入内容
+            for (int rowNum = 0; rowNum < dgv.Rows.Count; rowNum++)
+            {
+                ///跳过第一行,第一行为列名
+                IRow dataRow = sheet.CreateRow(rowNum + 1);
+                for (int columnNum = 0; columnNum < dgv.Columns.Count; columnNum++)
+                {
+                    int columnWidth = sheet.GetColumnWidth(columnNum) / 256; //列宽
+
+                    //隐藏行列不导出
+                    if (dgv.Rows[rowNum].Visible == true && dgv.Columns[columnNum].Visible == true)
+                    {
+                        //防止行列超出Excel限制
+                        if (fileExt == ".xls")
+                        {
+                            //03版Excel最大行数是65536行,最大列数是256列
+                            if (rowNum > 65536)
+                            {
+                                MessageBox.Show("行数超过Excel限制!");
+                                return;
+                            }
+                            if (columnNum > 256)
+                            {
+                                MessageBox.Show("列数超过Excel限制!");
+                                return;
+                            }
+                        }
+                        else if (fileExt == ".xlsx")
+                        {
+                            //07版Excel最大行数是1048576行,最大列数是16384列
+                            if (rowNum > 1048576)
+                            {
+                                MessageBox.Show("行数超过Excel限制!");
+                                return;
+                            }
+                            if (columnNum > 16384)
+                            {
+                                MessageBox.Show("列数超过Excel限制!");
+                                return;
+                            }
+                        }
+
+                        ICell cell = dataRow.CreateCell(columnNum);
+                        if (dgv.Rows[rowNum].Cells[columnNum].Value == null)
+                        {
+                            cell.SetCellType(CellType.Blank);
+                        }
+                        else
+                        {
+                            if (dgv.Rows[rowNum].Cells[columnNum].ValueType.FullName.Contains("System.Int32"))
+                            {
+                                cell.SetCellValue(Convert.ToInt32(dgv.Rows[rowNum].Cells[columnNum].Value));
+                            }
+                            else if (dgv.Rows[rowNum].Cells[columnNum].ValueType.FullName.Contains("System.String"))
+                            {
+                                cell.SetCellValue(dgv.Rows[rowNum].Cells[columnNum].Value.ToString());
+                            }
+                            else if (dgv.Rows[rowNum].Cells[columnNum].ValueType.FullName.Contains("System.Single"))
+                            {
+                                cell.SetCellValue(Convert.ToSingle(dgv.Rows[rowNum].Cells[columnNum].Value));
+                            }
+                            else if (dgv.Rows[rowNum].Cells[columnNum].ValueType.FullName.Contains("System.Double"))
+                            {
+                                cell.SetCellValue(Convert.ToDouble(dgv.Rows[rowNum].Cells[columnNum].Value));
+                            }
+                            else if (dgv.Rows[rowNum].Cells[columnNum].ValueType.FullName.Contains("System.Decimal"))
+                            {
+                                cell.SetCellValue(Convert.ToDouble(dgv.Rows[rowNum].Cells[columnNum].Value));
+                            }
+                            else if (dgv.Rows[rowNum].Cells[columnNum].ValueType.FullName.Contains("System.DateTime"))
+                            {
+                                cell.SetCellValue(Convert.ToDateTime(dgv.Rows[rowNum].Cells[columnNum].Value).ToString("yyyy-MM-dd"));
+                            }
+                            else if (dgv.Rows[rowNum].Cells[columnNum].ValueType.FullName.Contains("System.DBNull"))
+                            {
+                                cell.SetCellValue("");
+                            }
+                            else 
+                            {
+                                cell.SetCellValue(dgv.Rows[rowNum].Cells[columnNum].Value.ToString());
+                            }
+                        }
+
+                        //设置列宽
+                        IRow currentRow;
+                        if (sheet.GetRow(rowNum) == null)
+                        {
+                            currentRow = sheet.CreateRow(rowNum);
+                        }
+                        else
+                        {
+                            currentRow = sheet.GetRow(rowNum);
+                        }
+
+                        if (currentRow.GetCell(columnNum) != null)
+                        {
+                            ICell currentCell = currentRow.GetCell(columnNum);
+                            int length = Encoding.Default.GetBytes(currentCell.ToString()).Length;
+
+                            if (columnWidth < length)
+                            {
+                                columnWidth = length + 10; //设置列宽数值
+                            }
+                        }
+                        sheet.SetColumnWidth(columnNum, columnWidth * 256);
+
+                        //单元格样式
+                        dataRow.GetCell(columnNum).CellStyle = cellStyle;
+                    }
+                }
+            }
+
+            //插入图片操作
+            for (int i = 0; i < dgv.RowCount + 1; i++)
+            {
+                CellRangeAddress region = new CellRangeAddress(i, i, 1, 2);
+                sheet.AddMergedRegion(region);
+                region = new CellRangeAddress(i, i, 4, 5);
+                sheet.AddMergedRegion(region);
+                region = new CellRangeAddress(i, i, 6, 7);
+                sheet.AddMergedRegion(region);
+            }
+
+            sheet.SetColumnWidth(4, 16 * 256);
+            sheet.SetColumnWidth(6, 32 * 256);
+            for (int i = 0; i < dgv.RowCount; i++)
+            {
+                string imgPath = imagePath + "\\image\\" + dgv.Rows[i].Cells["FieldID"].Value + "_" + dgv.Rows[i].Cells["particleid"].Value + ".bmp";
+                //将图片文件读入一个字符串
+                if (File.Exists(imgPath))
+                {
+                    byte[] bytes = System.IO.File.ReadAllBytes(imgPath); //路径(加载图片完整路径)
+                    int pictureIdx = workbook.AddPicture(bytes, PictureType.JPEG);
+
+                    //把图片添加到相应的位置
+                    HSSFPatriarch patriarch = (HSSFPatriarch)sheet.CreateDrawingPatriarch();
+                    HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 0, 0, 4, i + 1, 6, i + 2);
+                    HSSFPicture pict = (HSSFPicture)patriarch.CreatePicture(anchor, pictureIdx);
+                }
+                string xrayPath = imagePath + "\\xray\\" + dgv.Rows[i].Cells["FieldID"].Value + "_" + dgv.Rows[i].Cells["particleid"].Value + ".bmp";
+                if (File.Exists(xrayPath))
+                {
+                    byte[] bytes = System.IO.File.ReadAllBytes(xrayPath); //路径(加载图片完整路径)
+                    int pictureIdx = workbook.AddPicture(bytes, PictureType.JPEG);
+
+                    //把图片添加到相应的位置
+                    HSSFPatriarch patriarch = (HSSFPatriarch)sheet.CreateDrawingPatriarch();
+                    HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 0, 0, 6, i + 1, 8, i + 2);
+                    HSSFPicture pict = (HSSFPicture)patriarch.CreatePicture(anchor, pictureIdx);
+                }
+                IRow row = sheet.GetRow(i + 1);
+                row.Height = 80 * 20; //设置excel行高,像素点是1/20
+            }
+
+            //保存为Excel文件                  
+            workbook.Write(ms);
+            FileStream file = new FileStream(saveFileName, FileMode.Create);
+            workbook.Write(file);
+            file.Close();
+            workbook = null;
+            ms.Close();
+            ms.Dispose();
+
+            //**程序结束计时**//
+            sw.Stop();
+            double totalTime = sw.ElapsedMilliseconds / 1000.0;
+
+            //MessageBox.Show(" 导出成功\n耗时" + totalTime + "s", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
+        }
+        #endregion
+
+
+        #region 检测文件是否被占用 
+        /// <summary>
+        /// 判定文件是否打开
+        /// </summary>   
+        [DllImport("kernel32.dll")]
+        public static extern IntPtr _lopen(string lpPathName, int iReadWrite);
+        [DllImport("kernel32.dll")]
+        public static extern bool CloseHandle(IntPtr hObject);
+        public const int OF_READWRITE = 2;
+        public const int OF_SHARE_DENY_NONE = 0x40;
+        public readonly IntPtr HFILE_ERROR = new IntPtr(-1);
+
+        /// <summary>
+        /// 检测文件被占用 
+        /// </summary>
+        /// <param name="FileNames">要检测的文件路径</param>
+        /// <returns></returns>
+        public bool CheckFiles(string FileNames)
+        {
+            if (!File.Exists(FileNames))
+            {
+                //文件不存在
+                return true;
+            }
+            IntPtr vHandle = _lopen(FileNames, OF_READWRITE | OF_SHARE_DENY_NONE);
+            if (vHandle == HFILE_ERROR)
+            {
+                //文件被占用
+                return false;
+            }
+            //文件没被占用
+            CloseHandle(vHandle);
+            return true;
+        }
+        #endregion                            
+    }
+}

+ 1691 - 0
OTSCommon/Periodic.cs

@@ -0,0 +1,1691 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace OTSPeriodicTable
+{
+    /// <summary>
+    /// 元素周期表的基本信息的全局静态类
+    /// </summary>
+    public static class CListPeriodic
+    {
+        /// <summary>
+        /// 获取元素周期表全部元素List方法
+        /// </summary>
+        /// <returns></returns>
+        public static List<Periodic> GetListPeriodic()
+        {
+            List<Periodic> List_Periodic = new List<Periodic>();
+            Periodic ls_periodic = new Periodic();
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "1";
+            ls_periodic.EleWeight = "1.008";
+            ls_periodic.Symbol = "H";
+            ls_periodic.EnglishName = "Hydrogen";
+            ls_periodic.K_Peak = "";
+            ls_periodic.L_Peak = "";
+            ls_periodic.M_Peak = "";
+            ls_periodic.ChineseName = "氢";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "2";
+            ls_periodic.EleWeight = "4.003";
+            ls_periodic.Symbol = "He";
+            ls_periodic.EnglishName = "Helium";
+            ls_periodic.K_Peak = "";
+            ls_periodic.L_Peak = "";
+            ls_periodic.M_Peak = "";
+            ls_periodic.ChineseName = "氦";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "3";
+            ls_periodic.EleWeight = "6.941";
+            ls_periodic.Symbol = "Li";
+            ls_periodic.EnglishName = "Lithium";
+            ls_periodic.K_Peak = "";
+            ls_periodic.L_Peak = "";
+            ls_periodic.M_Peak = "";
+            ls_periodic.ChineseName = "锂";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "4";
+            ls_periodic.EleWeight = "9.012";
+            ls_periodic.Symbol = "Be";
+            ls_periodic.EnglishName = "Beryllium";
+            ls_periodic.K_Peak = "0.108";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "铍";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "5";
+            ls_periodic.EleWeight = "10.811";
+            ls_periodic.Symbol = "B";
+            ls_periodic.EnglishName = "Boron";
+            ls_periodic.K_Peak = "0.185";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "硼";
+            ls_periodic.Classfication = "img_rhombohedral";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "6";
+            ls_periodic.EleWeight = "12.011";
+            ls_periodic.Symbol = "C";
+            ls_periodic.EnglishName = "Carbon";
+            ls_periodic.K_Peak = "0.277";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "碳";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "7";
+            ls_periodic.EleWeight = "14.007";
+            ls_periodic.Symbol = "N";
+            ls_periodic.EnglishName = "Nitrogen";
+            ls_periodic.K_Peak = "0.392";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "氮";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "8";
+            ls_periodic.EleWeight = "15.999";
+            ls_periodic.Symbol = "O";
+            ls_periodic.EnglishName = "Oxygen";
+            ls_periodic.K_Peak = "0.523";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "氧";
+            ls_periodic.Classfication = "img_cubic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "9";
+            ls_periodic.EleWeight = "18.998";
+            ls_periodic.Symbol = "F";
+            ls_periodic.EnglishName = "Fluorine";
+            ls_periodic.K_Peak = "0.677";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "氟";
+            ls_periodic.Classfication = "img_cubic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "10";
+            ls_periodic.EleWeight = "20.180";
+            ls_periodic.Symbol = "Ne";
+            ls_periodic.EnglishName = "Neon";
+            ls_periodic.K_Peak = "0.848";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "氖";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "11";
+            ls_periodic.EleWeight = "22.990";
+            ls_periodic.Symbol = "Na";
+            ls_periodic.EnglishName = "Sodium";
+            ls_periodic.K_Peak = "1.040";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "钠";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "12";
+            ls_periodic.EleWeight = "24.305";
+            ls_periodic.Symbol = "Mg";
+            ls_periodic.EnglishName = "Magnesium";
+            ls_periodic.K_Peak = "1.254";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "镁";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "13";
+            ls_periodic.EleWeight = "26.982";
+            ls_periodic.Symbol = "Al";
+            ls_periodic.EnglishName = "Aluminum";
+            ls_periodic.K_Peak = "1.486";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "铝";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "14";
+            ls_periodic.EleWeight = "28.086";
+            ls_periodic.Symbol = "Si";
+            ls_periodic.EnglishName = "Silicon";
+            ls_periodic.K_Peak = "1.740";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "硅";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "15";
+            ls_periodic.EleWeight = "30.974";
+            ls_periodic.Symbol = "P";
+            ls_periodic.EnglishName = "Phosphorus";
+            ls_periodic.K_Peak = "2.013";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "磷";
+            ls_periodic.Classfication = "img_Monoclinic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "16";
+            ls_periodic.EleWeight = "32.066";
+            ls_periodic.Symbol = "S";
+            ls_periodic.EnglishName = "Sulfur";
+            ls_periodic.K_Peak = "2.307";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "硫";
+            ls_periodic.Classfication = "img_orthohombic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "17";
+            ls_periodic.EleWeight = "35.453";
+            ls_periodic.Symbol = "Cl";
+            ls_periodic.EnglishName = "Chlorine";
+            ls_periodic.K_Peak = "2.622";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "氯";
+            ls_periodic.Classfication = "img_orthohombic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "18";
+            ls_periodic.EleWeight = "39.948";
+            ls_periodic.Symbol = "Ar";
+            ls_periodic.EnglishName = "Argon";
+            ls_periodic.K_Peak = "2.957";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "氩";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "19";
+            ls_periodic.EleWeight = "39.098";
+            ls_periodic.Symbol = "K";
+            ls_periodic.EnglishName = "Potassium";
+            ls_periodic.K_Peak = "3.313";
+            ls_periodic.L_Peak = "-";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "钾";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "20";
+            ls_periodic.EleWeight = "40.08";
+            ls_periodic.Symbol = "Ca";
+            ls_periodic.EnglishName = "Calcium";
+            ls_periodic.K_Peak = "3.691";
+            ls_periodic.L_Peak = "0.341";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "钙";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "21";
+            ls_periodic.EleWeight = "44.956";
+            ls_periodic.Symbol = "Sc";
+            ls_periodic.EnglishName = "Scandium";
+            ls_periodic.K_Peak = "4.090";
+            ls_periodic.L_Peak = "0.395";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "钪";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "22";
+            ls_periodic.EleWeight = "47.88";
+            ls_periodic.Symbol = "Ti";
+            ls_periodic.EnglishName = "Titanium";
+            ls_periodic.K_Peak = "4.510";
+            ls_periodic.L_Peak = "0.452";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "钛";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "23";
+            ls_periodic.EleWeight = "50.942";
+            ls_periodic.Symbol = "V";
+            ls_periodic.EnglishName = "Vanadium";
+            ls_periodic.K_Peak = "4.952";
+            ls_periodic.L_Peak = "0.511";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "钒";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "24";
+            ls_periodic.EleWeight = "51.996";
+            ls_periodic.Symbol = "Cr";
+            ls_periodic.EnglishName = "Chromium";
+            ls_periodic.K_Peak = "5.414";
+            ls_periodic.L_Peak = "0.573";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "铬";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "25";
+            ls_periodic.EleWeight = "54.938";
+            ls_periodic.Symbol = "Mn";
+            ls_periodic.EnglishName = "Manganese";
+            ls_periodic.K_Peak = "5.898";
+            ls_periodic.L_Peak = "0.637";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "锰";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "26";
+            ls_periodic.EleWeight = "55.847";
+            ls_periodic.Symbol = "Fe";
+            ls_periodic.EnglishName = "Iron";
+            ls_periodic.K_Peak = "6.403";
+            ls_periodic.L_Peak = "0.705";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "铁";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "27";
+            ls_periodic.EleWeight = "58.933";
+            ls_periodic.Symbol = "Co";
+            ls_periodic.EnglishName = "Cobalt";
+            ls_periodic.K_Peak = "6.929";
+            ls_periodic.L_Peak = "0.776";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "钴";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "28";
+            ls_periodic.EleWeight = "58.70";
+            ls_periodic.Symbol = "Ni";
+            ls_periodic.EnglishName = "Nickel";
+            ls_periodic.K_Peak = "7.477";
+            ls_periodic.L_Peak = "0.851";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "镍";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "29";
+            ls_periodic.EleWeight = "63.546";
+            ls_periodic.Symbol = "Cu";
+            ls_periodic.EnglishName = "Copper";
+            ls_periodic.K_Peak = "8.040";
+            ls_periodic.L_Peak = "0.930";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "铜";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "30";
+            ls_periodic.EleWeight = "65.39";
+            ls_periodic.Symbol = "Zn";
+            ls_periodic.EnglishName = "Zinc";
+            ls_periodic.K_Peak = "8.637";
+            ls_periodic.L_Peak = "1.012";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "锌";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "31";
+            ls_periodic.EleWeight = "69.72";
+            ls_periodic.Symbol = "Ga";
+            ls_periodic.EnglishName = "Gallium";
+            ls_periodic.K_Peak = "9.250";
+            ls_periodic.L_Peak = "1.098";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "镓";
+            ls_periodic.Classfication = "img_orthohombic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "32";
+            ls_periodic.EleWeight = "72.61";
+            ls_periodic.Symbol = "Ge";
+            ls_periodic.EnglishName = "Germanium";
+            ls_periodic.K_Peak = "9.885";
+            ls_periodic.L_Peak = "1.188";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "锗";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "33";
+            ls_periodic.EleWeight = "74.922";
+            ls_periodic.Symbol = "As";
+            ls_periodic.EnglishName = "Arsenic";
+            ls_periodic.K_Peak = "10.542";
+            ls_periodic.L_Peak = "1.282";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "砷";
+            ls_periodic.Classfication = "img_rhombohedral";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "34";
+            ls_periodic.EleWeight = "78.96";
+            ls_periodic.Symbol = "Se";
+            ls_periodic.EnglishName = "Selenium";
+            ls_periodic.K_Peak = "11.220";
+            ls_periodic.L_Peak = "1.379";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "硒";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "35";
+            ls_periodic.EleWeight = "79Br904";
+            ls_periodic.Symbol = "Br";
+            ls_periodic.EnglishName = "Bromine";
+            ls_periodic.K_Peak = "11.922";
+            ls_periodic.L_Peak = "1.480";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "溴";
+            ls_periodic.Classfication = "img_orthohombic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "36";
+            ls_periodic.EleWeight = "83.80";
+            ls_periodic.Symbol = "Kr";
+            ls_periodic.EnglishName = "Krypton";
+            ls_periodic.K_Peak = "12.649";
+            ls_periodic.L_Peak = "1.586";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "氪";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "37";
+            ls_periodic.EleWeight = "85.468";
+            ls_periodic.Symbol = "Rb";
+            ls_periodic.EnglishName = "Rubidium";
+            ls_periodic.K_Peak = "13.393";
+            ls_periodic.L_Peak = "1.694";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "铷";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "38";
+            ls_periodic.EleWeight = "87.62";
+            ls_periodic.Symbol = "Sr";
+            ls_periodic.EnglishName = "Strontium";
+            ls_periodic.K_Peak = "14.163";
+            ls_periodic.L_Peak = "1.806";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "锶";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "39";
+            ls_periodic.EleWeight = "88.906";
+            ls_periodic.Symbol = "Y";
+            ls_periodic.EnglishName = "Yttrium";
+            ls_periodic.K_Peak = "14.955";
+            ls_periodic.L_Peak = "1.922";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "钇";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "40";
+            ls_periodic.EleWeight = "91.22";
+            ls_periodic.Symbol = "Zr";
+            ls_periodic.EnglishName = "Zirconium";
+            ls_periodic.K_Peak = "15.776";
+            ls_periodic.L_Peak = "2.042";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "锆";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "41";
+            ls_periodic.EleWeight = "92.906";
+            ls_periodic.Symbol = "Nb";
+            ls_periodic.EnglishName = "Niobium";
+            ls_periodic.K_Peak = "16.617";
+            ls_periodic.L_Peak = "2.166";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "铌";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "42";
+            ls_periodic.EleWeight = "95.94";
+            ls_periodic.Symbol = "Mo";
+            ls_periodic.EnglishName = "Molybdenum";
+            ls_periodic.K_Peak = "17.481";
+            ls_periodic.L_Peak = "2.293";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "钼";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "43";
+            ls_periodic.EleWeight = "(98)";
+            ls_periodic.Symbol = "Tc";
+            ls_periodic.EnglishName = "Technetium";
+            ls_periodic.K_Peak = "18.368";
+            ls_periodic.L_Peak = "2.424";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "锝";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "44";
+            ls_periodic.EleWeight = "101.07";
+            ls_periodic.Symbol = "Ru";
+            ls_periodic.EnglishName = "Ruthenium";
+            ls_periodic.K_Peak = "19.282";
+            ls_periodic.L_Peak = "2.558";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "钌";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "45";
+            ls_periodic.EleWeight = "102.906";
+            ls_periodic.Symbol = "Rh";
+            ls_periodic.EnglishName = "Rhodium";
+            ls_periodic.K_Peak = "20.217";
+            ls_periodic.L_Peak = "2.696";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "铑";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "46";
+            ls_periodic.EleWeight = "106.42";
+            ls_periodic.Symbol = "Pd";
+            ls_periodic.EnglishName = "Palladium";
+            ls_periodic.K_Peak = "21.180";
+            ls_periodic.L_Peak = "2.838";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "钯";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "47";
+            ls_periodic.EleWeight = "107.868";
+            ls_periodic.Symbol = "Ag";
+            ls_periodic.EnglishName = "Silver";
+            ls_periodic.K_Peak = "22.166";
+            ls_periodic.L_Peak = "2.984";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "银";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "48";
+            ls_periodic.EleWeight = "112.41";
+            ls_periodic.Symbol = "Cd";
+            ls_periodic.EnglishName = "Cadmium";
+            ls_periodic.K_Peak = "23.175";
+            ls_periodic.L_Peak = "3.133";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "镉";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "49";
+            ls_periodic.EleWeight = "114.82";
+            ls_periodic.Symbol = "In";
+            ls_periodic.EnglishName = "Indium";
+            ls_periodic.K_Peak = "24.209";
+            ls_periodic.L_Peak = "3.286";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "铟";
+            ls_periodic.Classfication = "img_teragonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "50";
+            ls_periodic.EleWeight = "118.71";
+            ls_periodic.Symbol = "Sn";
+            ls_periodic.EnglishName = "Tin";
+            ls_periodic.K_Peak = "25.272";
+            ls_periodic.L_Peak = "3.443";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "锡";
+            ls_periodic.Classfication = "img_teragonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "51";
+            ls_periodic.EleWeight = "121.76";
+            ls_periodic.Symbol = "Sb";
+            ls_periodic.EnglishName = "Antimony";
+            ls_periodic.K_Peak = "26.359";
+            ls_periodic.L_Peak = "3.604";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "锑";
+            ls_periodic.Classfication = "img_rhombohedral";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "52";
+            ls_periodic.EleWeight = "127.60";
+            ls_periodic.Symbol = "Te";
+            ls_periodic.EnglishName = "Tellurium";
+            ls_periodic.K_Peak = "27.471";
+            ls_periodic.L_Peak = "3.768";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "碲";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "53";
+            ls_periodic.EleWeight = "126.905";
+            ls_periodic.Symbol = "I";
+            ls_periodic.EnglishName = "Iodine";
+            ls_periodic.K_Peak = "28.615";
+            ls_periodic.L_Peak = "3.937";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "碘";
+            ls_periodic.Classfication = "img_orthohombic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "54";
+            ls_periodic.EleWeight = "131.29";
+            ls_periodic.Symbol = "Xe";
+            ls_periodic.EnglishName = "Xenon";
+            ls_periodic.K_Peak = "29.779";
+            ls_periodic.L_Peak = "4.109";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "氙";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "55";
+            ls_periodic.EleWeight = "132.905";
+            ls_periodic.Symbol = "Cs";
+            ls_periodic.EnglishName = "Cesium";
+            ls_periodic.K_Peak = "30.971";
+            ls_periodic.L_Peak = "4.286";
+            ls_periodic.M_Peak = "-";
+            ls_periodic.ChineseName = "铯";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "56";
+            ls_periodic.EleWeight = "137.33";
+            ls_periodic.Symbol = "Ba";
+            ls_periodic.EnglishName = "Barium";
+            ls_periodic.K_Peak = "32.196";
+            ls_periodic.L_Peak = "4.465";
+            ls_periodic.M_Peak = "0.779";
+            ls_periodic.ChineseName = "钡";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "57";
+            ls_periodic.EleWeight = "138.906";
+            ls_periodic.Symbol = "La";
+            ls_periodic.EnglishName = "Lanthanum";
+            ls_periodic.K_Peak = "33.441";
+            ls_periodic.L_Peak = "4.650";
+            ls_periodic.M_Peak = "0.833";
+            ls_periodic.ChineseName = "镧";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "72";
+            ls_periodic.EleWeight = "178.49";
+            ls_periodic.Symbol = "Hf";
+            ls_periodic.EnglishName = "Hafnium";
+            ls_periodic.K_Peak = "55.801";
+            ls_periodic.L_Peak = "7.898";
+            ls_periodic.M_Peak = "1.644";
+            ls_periodic.ChineseName = "铪";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "73";
+            ls_periodic.EleWeight = "180.948";
+            ls_periodic.Symbol = "Ta";
+            ls_periodic.EnglishName = "Tantalum";
+            ls_periodic.K_Peak = "57.450";
+            ls_periodic.L_Peak = "8.145";
+            ls_periodic.M_Peak = "1.709";
+            ls_periodic.ChineseName = "钽";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "74";
+            ls_periodic.EleWeight = "183.85";
+            ls_periodic.Symbol = "W";
+            ls_periodic.EnglishName = "Tungsten";
+            ls_periodic.K_Peak = "59.305";
+            ls_periodic.L_Peak = "8.396";
+            ls_periodic.M_Peak = "1.774";
+            ls_periodic.ChineseName = "钨";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "75";
+            ls_periodic.EleWeight = "186.207";
+            ls_periodic.Symbol = "Re";
+            ls_periodic.EnglishName = "Rhenium";
+            ls_periodic.K_Peak = "61.122";
+            ls_periodic.L_Peak = "8.651";
+            ls_periodic.M_Peak = "1.842";
+            ls_periodic.ChineseName = "铼";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "76";
+            ls_periodic.EleWeight = "190.2";
+            ls_periodic.Symbol = "Os";
+            ls_periodic.EnglishName = "Osmium";
+            ls_periodic.K_Peak = "62.989";
+            ls_periodic.L_Peak = "8.910";
+            ls_periodic.M_Peak = "1.910";
+            ls_periodic.ChineseName = "锇";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "77";
+            ls_periodic.EleWeight = "192.22";
+            ls_periodic.Symbol = "Ir";
+            ls_periodic.EnglishName = "Iridium";
+            ls_periodic.K_Peak = "64.906";
+            ls_periodic.L_Peak = "9.174";
+            ls_periodic.M_Peak = "1.978";
+            ls_periodic.ChineseName = "铱";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "78";
+            ls_periodic.EleWeight = "195.08";
+            ls_periodic.Symbol = "Pt";
+            ls_periodic.EnglishName = "Platinium";
+            ls_periodic.K_Peak = "66.834";
+            ls_periodic.L_Peak = "9.441";
+            ls_periodic.M_Peak = "2.048";
+            ls_periodic.ChineseName = "铂";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "79";
+            ls_periodic.EleWeight = "196.967";
+            ls_periodic.Symbol = "Au";
+            ls_periodic.EnglishName = "Gold";
+            ls_periodic.K_Peak = "68.804";
+            ls_periodic.L_Peak = "9.712";
+            ls_periodic.M_Peak = "2.120";
+            ls_periodic.ChineseName = "金";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "80";
+            ls_periodic.EleWeight = "200.59";
+            ls_periodic.Symbol = "Hg";
+            ls_periodic.EnglishName = "Mercury";
+            ls_periodic.K_Peak = "70.806";
+            ls_periodic.L_Peak = "9.987";
+            ls_periodic.M_Peak = "2.191";
+            ls_periodic.ChineseName = "汞";
+            ls_periodic.Classfication = "img_rhombohedral";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "81";
+            ls_periodic.EleWeight = "204.38";
+            ls_periodic.Symbol = "Tl";
+            ls_periodic.EnglishName = "Thallium";
+            ls_periodic.K_Peak = "72.869";
+            ls_periodic.L_Peak = "10.256";
+            ls_periodic.M_Peak = "2.268";
+            ls_periodic.ChineseName = "铊";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "82";
+            ls_periodic.EleWeight = "207.2";
+            ls_periodic.Symbol = "Pb";
+            ls_periodic.EnglishName = "Lead";
+            ls_periodic.K_Peak = "74.989";
+            ls_periodic.L_Peak = "10.550";
+            ls_periodic.M_Peak = "2.342";
+            ls_periodic.ChineseName = "铅";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "83";
+            ls_periodic.EleWeight = "208.980";
+            ls_periodic.Symbol = "Bi";
+            ls_periodic.EnglishName = "Bismuth";
+            ls_periodic.K_Peak = "77.091";
+            ls_periodic.L_Peak = "10.837";
+            ls_periodic.M_Peak = "2.419";
+            ls_periodic.ChineseName = "铋";
+            ls_periodic.Classfication = "img_rhombohedral";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "84";
+            ls_periodic.EleWeight = "(209)";
+            ls_periodic.Symbol = "Po";
+            ls_periodic.EnglishName = "Polonium";
+            ls_periodic.K_Peak = "79.272";
+            ls_periodic.L_Peak = "11.129";
+            ls_periodic.M_Peak = "2.505";
+            ls_periodic.ChineseName = "钋";
+            ls_periodic.Classfication = "img_Monoclinic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "85";
+            ls_periodic.EleWeight = "(210)";
+            ls_periodic.Symbol = "At";
+            ls_periodic.EnglishName = "Astatine";
+            ls_periodic.K_Peak = "81.513";
+            ls_periodic.L_Peak = "11.425";
+            ls_periodic.M_Peak = "2.585";
+            ls_periodic.ChineseName = "砹";
+            ls_periodic.Classfication = "";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "86";
+            ls_periodic.EleWeight = "(222)";
+            ls_periodic.Symbol = "Rn";
+            ls_periodic.EnglishName = "Radon";
+            ls_periodic.K_Peak = "83.771";
+            ls_periodic.L_Peak = "11.725";
+            ls_periodic.M_Peak = "2.665";
+            ls_periodic.ChineseName = "氡";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "87";
+            ls_periodic.EleWeight = "(223)";
+            ls_periodic.Symbol = "Fr";
+            ls_periodic.EnglishName = "Francium";
+            ls_periodic.K_Peak = "86.098";
+            ls_periodic.L_Peak = "12.029";
+            ls_periodic.M_Peak = "2.747";
+            ls_periodic.ChineseName = "钫";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "88";
+            ls_periodic.EleWeight = "226.025";
+            ls_periodic.Symbol = "Ra";
+            ls_periodic.EnglishName = "Radium";
+            ls_periodic.K_Peak = "88.480";
+            ls_periodic.L_Peak = "12.338";
+            ls_periodic.M_Peak = "2.830";
+            ls_periodic.ChineseName = "镭";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "89";
+            ls_periodic.EleWeight = "227.028";
+            ls_periodic.Symbol = "Ac";
+            ls_periodic.EnglishName = "Actinium";
+            ls_periodic.K_Peak = "90.880";
+            ls_periodic.L_Peak = "12.650";
+            ls_periodic.M_Peak = "2.915";
+            ls_periodic.ChineseName = "锕";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //最下方的28个元素
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "58";
+            ls_periodic.EleWeight = "140.12";
+            ls_periodic.Symbol = "Ce";
+            ls_periodic.EnglishName = "Cerium";
+            ls_periodic.K_Peak = "34.717";
+            ls_periodic.L_Peak = "4.839";
+            ls_periodic.M_Peak = "0.883";
+            ls_periodic.ChineseName = "铈";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "59";
+            ls_periodic.EleWeight = "140.908";
+            ls_periodic.Symbol = "Pr";
+            ls_periodic.EnglishName = "Praseodymium";
+            ls_periodic.K_Peak = "36.031";
+            ls_periodic.L_Peak = "5.033";
+            ls_periodic.M_Peak = "0.929";
+            ls_periodic.ChineseName = "镨";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "60";
+            ls_periodic.EleWeight = "144.24";
+            ls_periodic.Symbol = "Nd";
+            ls_periodic.EnglishName = "Neodymium";
+            ls_periodic.K_Peak = "37.358";
+            ls_periodic.L_Peak = "5.229";
+            ls_periodic.M_Peak = "0.978";
+            ls_periodic.ChineseName = "钕";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "61";
+            ls_periodic.EleWeight = "(145)";
+            ls_periodic.Symbol = "Pm";
+            ls_periodic.EnglishName = "Promethium";
+            ls_periodic.K_Peak = "38.725";
+            ls_periodic.L_Peak = "5.432";
+            ls_periodic.M_Peak = "1.032";
+            ls_periodic.ChineseName = "钷";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "62";
+            ls_periodic.EleWeight = "150.36";
+            ls_periodic.Symbol = "Sm";
+            ls_periodic.EnglishName = "Samarium";
+            ls_periodic.K_Peak = "40.118";
+            ls_periodic.L_Peak = "5.635";
+            ls_periodic.M_Peak = "1.081";
+            ls_periodic.ChineseName = "钐";
+            ls_periodic.Classfication = "img_rhombohedral";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "63";
+            ls_periodic.EleWeight = "151.97";
+            ls_periodic.Symbol = "Eu";
+            ls_periodic.EnglishName = "Europium";
+            ls_periodic.K_Peak = "41.534";
+            ls_periodic.L_Peak = "5.845";
+            ls_periodic.M_Peak = "1.137";
+            ls_periodic.ChineseName = "铕";
+            ls_periodic.Classfication = "img_cubicbodycentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "64";
+            ls_periodic.EleWeight = "157.25";
+            ls_periodic.Symbol = "Gd";
+            ls_periodic.EnglishName = "Gadolinium";
+            ls_periodic.K_Peak = "42.992";
+            ls_periodic.L_Peak = "6.056";
+            ls_periodic.M_Peak = "1.185";
+            ls_periodic.ChineseName = "铕";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "65";
+            ls_periodic.EleWeight = "158.925";
+            ls_periodic.Symbol = "Tb";
+            ls_periodic.EnglishName = "Terbium";
+            ls_periodic.K_Peak = "44.476";
+            ls_periodic.L_Peak = "6.272";
+            ls_periodic.M_Peak = "1.240";
+            ls_periodic.ChineseName = "铽";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "66";
+            ls_periodic.EleWeight = "162.50";
+            ls_periodic.Symbol = "Dy";
+            ls_periodic.EnglishName = "Dysprosium";
+            ls_periodic.K_Peak = "45.997";
+            ls_periodic.L_Peak = "6.494";
+            ls_periodic.M_Peak = "1.293";
+            ls_periodic.ChineseName = "镝";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "67";
+            ls_periodic.EleWeight = "164.930";
+            ls_periodic.Symbol = "Ho";
+            ls_periodic.EnglishName = "Holmium";
+            ls_periodic.K_Peak = "47.534";
+            ls_periodic.L_Peak = "6.719";
+            ls_periodic.M_Peak = "1.347";
+            ls_periodic.ChineseName = "钬";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "68";
+            ls_periodic.EleWeight = "167.26";
+            ls_periodic.Symbol = "Er";
+            ls_periodic.EnglishName = "Erbium";
+            ls_periodic.K_Peak = "49.100";
+            ls_periodic.L_Peak = "6.947";
+            ls_periodic.M_Peak = "1.405";
+            ls_periodic.ChineseName = "铒";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "69";
+            ls_periodic.EleWeight = "168.934";
+            ls_periodic.Symbol = "Tm";
+            ls_periodic.EnglishName = "Thulium";
+            ls_periodic.K_Peak = "50.730";
+            ls_periodic.L_Peak = "7.179";
+            ls_periodic.M_Peak = "1.462";
+            ls_periodic.ChineseName = "铥";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "70";
+            ls_periodic.EleWeight = "173.04";
+            ls_periodic.Symbol = "Yb";
+            ls_periodic.EnglishName = "Ytterbium";
+            ls_periodic.K_Peak = "52.362";
+            ls_periodic.L_Peak = "7.414";
+            ls_periodic.M_Peak = "1.521";
+            ls_periodic.ChineseName = "镱";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "71";
+            ls_periodic.EleWeight = "174.967";
+            ls_periodic.Symbol = "Lu";
+            ls_periodic.EnglishName = "Lutetium";
+            ls_periodic.K_Peak = "54.078";
+            ls_periodic.L_Peak = "7.654";
+            ls_periodic.M_Peak = "1.581";
+            ls_periodic.ChineseName = "镥";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "90";
+            ls_periodic.EleWeight = "232.038";
+            ls_periodic.Symbol = "Th";
+            ls_periodic.EnglishName = "Thorium";
+            ls_periodic.K_Peak = "93.382";
+            ls_periodic.L_Peak = "12.967";
+            ls_periodic.M_Peak = "2.991";
+            ls_periodic.ChineseName = "钍";
+            ls_periodic.Classfication = "img_cubicfacecentered";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "91";
+            ls_periodic.EleWeight = "231.036";
+            ls_periodic.Symbol = "Pa";
+            ls_periodic.EnglishName = "Protoactinium";
+            ls_periodic.K_Peak = "95.886";
+            ls_periodic.L_Peak = "13.288";
+            ls_periodic.M_Peak = "3.077";
+            ls_periodic.ChineseName = "镤";
+            ls_periodic.Classfication = "img_orthohombic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "92";
+            ls_periodic.EleWeight = "238.029";
+            ls_periodic.Symbol = "U";
+            ls_periodic.EnglishName = "Uranium";
+            ls_periodic.K_Peak = "98.434";
+            ls_periodic.L_Peak = "13.612";
+            ls_periodic.M_Peak = "3.165";
+            ls_periodic.ChineseName = "铀";
+            ls_periodic.Classfication = "img_orthohombic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "93";
+            ls_periodic.EleWeight = "237.048";
+            ls_periodic.Symbol = "Np";
+            ls_periodic.EnglishName = "Neptunium";
+            ls_periodic.K_Peak = "100.800";
+            ls_periodic.L_Peak = "13.941";
+            ls_periodic.M_Peak = "3.253";
+            ls_periodic.ChineseName = "镎";
+            ls_periodic.Classfication = "img_orthohombic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "94";
+            ls_periodic.EleWeight = "(244)";
+            ls_periodic.Symbol = "Pu";
+            ls_periodic.EnglishName = "Plutonium";
+            ls_periodic.K_Peak = "103.320";
+            ls_periodic.L_Peak = "14.275";
+            ls_periodic.M_Peak = "3.344";
+            ls_periodic.ChineseName = "钚";
+            ls_periodic.Classfication = "img_Monoclinic";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "95";
+            ls_periodic.EleWeight = "(243)";
+            ls_periodic.Symbol = "Am";
+            ls_periodic.EnglishName = "Americium";
+            ls_periodic.K_Peak = "105.970";
+            ls_periodic.L_Peak = "14.615";
+            ls_periodic.M_Peak = "3.435";
+            ls_periodic.ChineseName = "镅";
+            ls_periodic.Classfication = "img_Hexagonal";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "96";
+            ls_periodic.EleWeight = "(247)";
+            ls_periodic.Symbol = "Cm";
+            ls_periodic.EnglishName = "Curium";
+            ls_periodic.K_Peak = "108.737";
+            ls_periodic.L_Peak = "14.961";
+            ls_periodic.M_Peak = "3.539";
+            ls_periodic.ChineseName = "锔";
+            ls_periodic.Classfication = "";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "97";
+            ls_periodic.EleWeight = "(247)";
+            ls_periodic.Symbol = "Bk";
+            ls_periodic.EnglishName = "Berkelium";
+            ls_periodic.K_Peak = "111.676";
+            ls_periodic.L_Peak = "15.309";
+            ls_periodic.M_Peak = "3.634";
+            ls_periodic.ChineseName = "锫";
+            ls_periodic.Classfication = "";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "98";
+            ls_periodic.EleWeight = "(251)";
+            ls_periodic.Symbol = "Cf";
+            ls_periodic.EnglishName = "Californium";
+            ls_periodic.K_Peak = "114.778";
+            ls_periodic.L_Peak = "15.661";
+            ls_periodic.M_Peak = "3.731";
+            ls_periodic.ChineseName = "锎";
+            ls_periodic.Classfication = "";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "99";
+            ls_periodic.EleWeight = "(252)";
+            ls_periodic.Symbol = "Es";
+            ls_periodic.EnglishName = "Einsteinium";
+            ls_periodic.K_Peak = "-";
+            ls_periodic.L_Peak = "16.018";
+            ls_periodic.M_Peak = "3.829";
+            ls_periodic.ChineseName = "锿";
+            ls_periodic.Classfication = "";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "100";
+            ls_periodic.EleWeight = "(257)";
+            ls_periodic.Symbol = "Fm";
+            ls_periodic.EnglishName = "Fermium";
+            ls_periodic.K_Peak = "";
+            ls_periodic.L_Peak = "";
+            ls_periodic.M_Peak = "";
+            ls_periodic.ChineseName = "镄";
+            ls_periodic.Classfication = "";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "101";
+            ls_periodic.EleWeight = "(258)";
+            ls_periodic.Symbol = "Md";
+            ls_periodic.EnglishName = "Mendelevium";
+            ls_periodic.K_Peak = "";
+            ls_periodic.L_Peak = "";
+            ls_periodic.M_Peak = "";
+            ls_periodic.ChineseName = "钔";
+            ls_periodic.Classfication = "";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "102";
+            ls_periodic.EleWeight = "(259)";
+            ls_periodic.Symbol = "No";
+            ls_periodic.EnglishName = "Nobelium";
+            ls_periodic.K_Peak = "";
+            ls_periodic.L_Peak = "";
+            ls_periodic.M_Peak = "";
+            ls_periodic.ChineseName = "锘";
+            ls_periodic.Classfication = "";
+            List_Periodic.Add(ls_periodic);
+
+            //维护表-----------------------------
+            ls_periodic = new Periodic();
+            ls_periodic.Number = "103";
+            ls_periodic.EleWeight = "(260)";
+            ls_periodic.Symbol = "Lr";
+            ls_periodic.EnglishName = "Lawrencium";
+            ls_periodic.K_Peak = "";
+            ls_periodic.L_Peak = "";
+            ls_periodic.M_Peak = "";
+            ls_periodic.ChineseName = "铹";
+            ls_periodic.Classfication = "";
+            List_Periodic.Add(ls_periodic);
+
+            return List_Periodic;
+        }
+
+        /// <summary>
+        /// 根据传入的元素名判断,该元素是否存在于此元素表中
+        /// </summary>
+        /// <param name="in_list_periodic"></param>
+        /// <param name="str_ysm"></param>
+        /// <returns></returns>
+        public static bool ExistPeriodicByEleName( string str_ysm)
+        {
+            List<Periodic> in_list_periodic = GetListPeriodic();
+            for (int i = 0; i < in_list_periodic.Count(); i++)
+            {
+                if (str_ysm.ToUpper() == in_list_periodic[i].Symbol.ToUpper())
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 根据传入的元素名,获得元素类对象
+        /// </summary>
+        /// <param name="in_list_periodic"></param>
+        /// <param name="str_ysm"></param>
+        /// <returns></returns>
+        public static Periodic GetPeriodicByEleName( string str_ysm)
+        {
+            List<Periodic> in_list_periodic = GetListPeriodic();
+            Periodic ls_p = new Periodic();
+            for (int i = 0; i < in_list_periodic.Count(); i++)
+            {
+                if (str_ysm.ToUpper() == in_list_periodic[i].Symbol.ToUpper())
+                {
+                    ls_p = in_list_periodic[i];
+                    break;
+                }
+            }
+            return ls_p;
+        }
+
+        /// <summary>
+        /// 根据传入的序号,获得元素类对象
+        /// </summary>
+        /// <param name="in_list_periodic"></param>
+        /// <param name="str_xh"></param>
+        /// <returns></returns>
+        public static Periodic GetPeriodicByNumber( string str_xh)
+        {
+            List<Periodic> in_list_periodic = GetListPeriodic();
+            Periodic ls_p = new Periodic();
+            for (int i = 0; i < in_list_periodic.Count(); i++)
+            {
+                if (str_xh.ToUpper() == in_list_periodic[i].Number.ToUpper())
+                {
+                    ls_p = in_list_periodic[i];
+                }
+            }
+            return ls_p;
+        }
+    }
+
+    //夹杂物结构类的子类,元素类
+    public class ElementRange
+    {
+        string _rangeid;
+        string _rangenum;
+        string _stdid;
+        string _rangestart;
+        string _rangeend;
+        string _atomnum;
+        string _percentage;
+        string _molarratio;
+
+        /// <summary>
+        /// id?
+        /// </summary>
+        public string RangeID
+        {
+            get { return _rangeid; }
+            set { _rangeid = value; }
+        }
+
+        /// <summary>
+        /// 数量?
+        /// </summary>
+        public string RangeNum
+        {
+            get { return _rangenum; }
+            set { _rangenum = value; }
+        }
+
+        /// <summary>
+        /// 夹杂物ID
+        /// </summary>
+        public string STDID
+        {
+            get { return _stdid; }
+            set { _stdid = value; }
+        }
+
+        /// <summary>
+        /// 起
+        /// </summary>
+        public string RangeStart
+        {
+            get { return _rangestart; }
+            set { _rangestart = value; }
+        }
+
+        /// <summary>
+        /// 止
+        /// </summary>
+        public string RangeEnd
+        {
+            get { return _rangeend; }
+            set { _rangeend = value; }
+        }
+
+        /// <summary>
+        /// 原子数
+        /// </summary>
+        public string AtomNum
+        {
+            get { return _atomnum; }
+            set { _atomnum = value; }
+        }
+
+        /// <summary>
+        /// 比例
+        /// </summary>
+        public string Percentage
+        {
+            get { return _percentage; }
+            set { _percentage = value; }
+        }
+
+        /// <summary>
+        /// 摩尔比
+        /// </summary>
+        public string MolarRatio
+        {
+            get { return _molarratio; }
+            set { _molarratio = value; }
+        }
+
+    }
+
+    //夹杂物结构类
+    public class IncALib
+    {
+        string _name;   //名称
+        string _incaid; //夹杂物ID
+        string _color;  //颜色
+        string _heightwidthratio;   //宽高比
+        string _graystart;  //起
+        string _grayend;    //止
+        string _rangeelementnum;//数量
+        List<ElementRange> m_list_elementrange;
+
+        /// <summary>
+        /// 构造函数
+        /// </summary>
+        public IncALib()
+        {
+            //m_list_periodic = new List<Periodic>();
+            m_list_elementrange = new List<ElementRange>();
+        }
+
+        /// <summary>
+        /// 名称
+        /// </summary>
+        public string Name
+        {
+            get { return _name; }
+            set { _name = value; }
+        }
+
+        /// <summary>
+        /// 夹杂物ID
+        /// </summary>
+        public string IncAId
+        {
+            get { return _incaid; }
+            set { _incaid = value; }
+        }
+
+        /// <summary>
+        /// 颜色
+        /// </summary>
+        public string Color
+        {
+            get { return _color; }
+            set { _color = value; }
+        }
+
+        /// <summary>
+        /// 宽高比
+        /// </summary>
+        public string HeightWidthRatio
+        {
+            get { return _heightwidthratio; }
+            set { _heightwidthratio = value; }
+        }
+
+        /// <summary>
+        /// 起
+        /// </summary>
+        public string GrayStart
+        {
+            get { return _graystart; }
+            set { _graystart = value; }
+        }
+
+        /// <summary>
+        /// 止
+        /// </summary>
+        public string GrayEnd
+        {
+            get { return _grayend; }
+            set { _grayend = value; }
+        }
+
+        /// <summary>
+        /// 元素数量
+        /// </summary>
+        public string RangeElementNum
+        {
+            get { return _rangeelementnum; }
+            set { _rangeelementnum = value; }
+        }
+
+        /// <summary>
+        /// 所包含的元素
+        /// </summary>
+        public List<ElementRange> List_ElementRange
+        {
+            get { return m_list_elementrange; }
+            set { m_list_elementrange = value; }
+        }
+    }
+
+
+    //元素包含信息结构
+    public class Periodic
+    {
+        string _xh;         //序号
+        string _yzzl;    //原子重量,因为有标记的重量带有()括号,所以这里先用字符串进行存储
+        string _fh;      //符号
+        string _zwysm;   //中文元素名
+        string _ywm;     //英文名 
+        string _sx1;     //属性1
+        string _sx2;     //属性2
+        string _sx3;     //属性3
+        string _fl;      //分类
+
+        /// <summary>
+        /// 序号
+        /// </summary>
+        public string Number
+        {
+            get { return _xh; }
+            set { _xh = value; }
+        }
+        /// <summary>
+        /// 原子重量
+        /// </summary>
+        public string EleWeight
+        {
+            get { return _yzzl; }
+            set { _yzzl = value; }
+        }
+        /// <summary>
+        /// 符号
+        /// </summary>
+        public string Symbol
+        {
+            get { return _fh; }
+            set { _fh = value; }
+        }
+        /// <summary>
+        /// 中文元素名
+        /// </summary>
+        public string ChineseName
+        {
+            get { return _zwysm; }
+            set { _zwysm = value; }
+        }
+        /// <summary>
+        /// 英文名
+        /// </summary>
+        public string EnglishName
+        {
+            get { return _ywm; }
+            set { _ywm = value; }
+        }
+        /// <summary>
+        /// K峰
+        /// </summary>
+        public string K_Peak
+        {
+            get { return _sx1; }
+            set { _sx1 = value; }
+        }
+        /// <summary>
+        /// L峰
+        /// </summary>
+        public string L_Peak
+        {
+            get { return _sx2; }
+            set { _sx2 = value; }
+        }
+        /// <summary>
+        /// 属性3
+        /// </summary>
+        public string M_Peak
+        {
+            get { return _sx3; }
+            set { _sx3 = value; }
+        }
+        /// <summary>
+        /// 分类
+        /// </summary>
+        public string Classfication
+        {
+            get { return _fl; }
+            set { _fl = value; }
+        }
+    }
+}

+ 200 - 0
OTSIncAReportApp/2-CommonFunction/CommonClass/XmlOperateUtil.cs

@@ -0,0 +1,200 @@
+using System;
+using System.IO;
+using System.Linq;
+using System.Xml;
+
+namespace OTSIncAReportApp.Controls
+{
+    /// <summary>
+    /// XML操作类
+    /// </summary>
+    public class XmlOperateUtil
+    {
+        #region 全局变量
+        string _xmlPath;        //文件所在路径
+        #endregion
+
+        #region 构造函数
+        /// <summary>
+        /// 初始化一个配置
+        /// </summary>
+        /// <param name="xmlPath">配置所在路径</param>
+        public XmlOperateUtil(string xmlPath)
+        {
+            _xmlPath = Path.GetFullPath(xmlPath);
+        }
+        #endregion
+
+        #region 公有方法
+        /// <summary>
+        /// 写入配置,也可以用来修改
+        /// </summary>
+        /// <param name="value">写入的值</param>
+        /// <param name="nodes">节点</param>
+        public void Write(string value, params string[] nodes)
+        {
+            //初始化xml
+            XmlDocument xmlDoc = new XmlDocument();
+            if (File.Exists(_xmlPath))
+                xmlDoc.Load(_xmlPath);
+            else
+                xmlDoc.LoadXml("<XmlConfig />");
+            XmlNode xmlRoot = xmlDoc.ChildNodes[0];
+
+            //新增、编辑 节点
+            string xpath = string.Join("/", nodes);
+            XmlNode node = xmlDoc.SelectSingleNode(xpath);
+            if (node == null)    //新增节点
+            {
+                node = makeXPath(xmlDoc, xmlRoot, xpath);
+            }
+            node.InnerText = value;
+
+            //保存
+            xmlDoc.Save(_xmlPath);
+        }
+
+        /// <summary>
+        /// 设置节点上属性的值
+        /// </summary>
+        /// <param name="AttributeName">属性名</param>
+        /// <param name="AttributeValue">属性值</param>
+        /// <param name="nodes">选择节点</param>
+        public void SetAttribute(string AttributeName, string AttributeValue, params string[] nodes)
+        {
+            //初始化xml
+            XmlDocument xmlDoc = new XmlDocument();
+            if (File.Exists(_xmlPath))
+                xmlDoc.Load(_xmlPath);
+            else
+                xmlDoc.LoadXml("<XmlConfig />");
+            XmlNode xmlRoot = xmlDoc.ChildNodes[0];
+
+            //新增、编辑 节点
+            string xpath = string.Join("/", nodes);
+            XmlElement element = (XmlElement)xmlDoc.SelectSingleNode(xpath);
+            if (element == null)    //新增节点
+            {
+                element = (XmlElement)makeXPath(xmlDoc, xmlRoot, xpath);
+            }
+
+            //设置节点上属性的值
+            element.SetAttribute(AttributeName, AttributeValue);
+            //保存
+            xmlDoc.Save(_xmlPath);
+        }
+
+        public string GetAttribute(string AttributeName, params string[] nodes)
+        {
+            //初始化xml
+            XmlDocument xmlDoc = new XmlDocument();
+            if (File.Exists(_xmlPath))
+                xmlDoc.Load(_xmlPath);
+            else
+                xmlDoc.LoadXml("<XmlConfig />");
+            XmlNode xmlRoot = xmlDoc.ChildNodes[0];
+
+            //新增、编辑 节点
+            string xpath = string.Join("/", nodes);
+            XmlElement element = (XmlElement)xmlDoc.SelectSingleNode(xpath);
+            if (element == null)    //新增节点
+            {
+                element = (XmlElement)makeXPath(xmlDoc, xmlRoot, xpath);
+            }
+
+            //设置节点上属性的值
+            string retstr = element.GetAttribute(AttributeName);
+            //保存
+            xmlDoc.Save(_xmlPath);
+
+            return retstr;
+        }
+
+
+        /// <summary>
+        /// 读取配置
+        /// </summary>
+        /// <param name="nodes">节点</param>
+        /// <returns></returns>
+        public string Read(params string[] nodes)
+        {
+            XmlDocument xmlDoc = new XmlDocument();
+            if (File.Exists(_xmlPath) == false)
+                return null;
+            else
+                xmlDoc.Load(_xmlPath);
+
+            string xpath = string.Join("/", nodes);
+            XmlNode node = xmlDoc.SelectSingleNode("/XmlConfig/" + xpath);
+            if (node == null)
+                return null;
+
+            return node.InnerText;
+        }
+
+        /// <summary>
+        /// 删除节点
+        /// </summary>
+        /// <param name="nodes"></param>
+        public void RemoveNode(params string[] nodes)
+        {
+            XmlDocument xmlDoc = new XmlDocument();
+            if (File.Exists(_xmlPath) == false)
+                return;
+            else
+                xmlDoc.Load(_xmlPath);
+
+            string xpath = string.Join("/", nodes);
+            XmlNode node = xmlDoc.SelectSingleNode("/XmlConfig/" + xpath);
+
+            //取得父节点
+            string[] father_nodes = new string[nodes.Count() - 1];
+
+            //对父节点进行初始化
+            for (int i = 0; i < nodes.Count() - 1; i++)
+            {
+                father_nodes[i] = (string)nodes[i].Clone();
+            }
+
+
+            string fast_xpath = string.Join("/", father_nodes);
+            XmlNode fastnode = xmlDoc.SelectSingleNode("/XmlConfig/" + fast_xpath);
+
+            if (node == null)
+                return;
+            if (fastnode == null)
+                return;
+
+            //使用父节点删除子节点
+            fastnode.RemoveChild(node);
+
+            //保存
+            xmlDoc.Save(_xmlPath);
+        }
+
+
+        #endregion
+
+        #region 私有方法
+        //递归根据 xpath 的方式进行创建节点
+        static private XmlNode makeXPath(XmlDocument doc, XmlNode parent, string xpath)
+        {
+
+            // 在XPath抓住下一个节点的名称;父级如果是空的则返回
+            string[] partsOfXPath = xpath.Trim('/').Split('/');
+            string nextNodeInXPath = partsOfXPath.First();
+            if (string.IsNullOrEmpty(nextNodeInXPath))
+                return parent;
+
+            // 获取或从名称创建节点
+            XmlNode node = parent.SelectSingleNode(nextNodeInXPath);
+            if (node == null)
+                node = parent.AppendChild(doc.CreateElement(nextNodeInXPath));
+
+            // 加入的阵列作为一个XPath表达式和递归余数
+            string rest = String.Join("/", partsOfXPath.Skip(1).ToArray());
+            return makeXPath(doc, node, rest);
+        }
+        #endregion
+    }
+}