Browse Source

Merge branch 'release2.2' of http://172.16.3.77:10080/gaoshipeng/OTS2_0 into release2.2

gsp 3 years ago
parent
commit
2540c6e286

+ 0 - 1
OTSIncAReportApp/Control_Grids/ParticlesGridDevidePage.Designer.cs

@@ -100,7 +100,6 @@
             this.panel2.Name = "panel2";
             this.panel2.Size = new System.Drawing.Size(2254, 56);
             this.panel2.TabIndex = 6;
-            this.panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.panel2_Paint);
             // 
             // label_Condition
             // 

+ 33 - 220
OTSIncAReportApp/Control_Grids/ParticlesGridDevidePage.cs

@@ -503,7 +503,7 @@ namespace OTSIncAReportGrids
             }
 
             ParticleData fielddata = new ParticleData(result.FilePath);
-            DataTable particles = fielddata.GetInfoForPartucleDevidePage(PageIndex, pageSize, OrderFunction, condition);
+            DataTable particles = fielddata.GetInfoForPartucleDevidePage2(PageIndex, pageSize, OrderFunction, condition);
             if(PageSize==-1)
             {
                 PageSize = particles.Rows.Count;
@@ -514,7 +514,7 @@ namespace OTSIncAReportGrids
                 return;
             }
 
-
+            string particleM = "";
             //获取需要显示的元素名
             List<string> ElementTypeSort = new List<string>(str_ElementsColName.Split(',').ToList());//去重
             for (int i = 0; i < ElementTypeSort.Count; i++)
@@ -551,35 +551,35 @@ namespace OTSIncAReportGrids
                         }
                         if (enl.Current.Key == "ParticleImage")
                         {
-                            //string subt = particles.Rows[i]["SubParticles"].ToString();
-                            //if (subt != null && subt != "")
-                            //{
-                            //    double ScanFieldSize = Convert.ToDouble(((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["SEMDataMsr"])["ScanFieldSize"]);
-                            //    string filePatht = result.FilePath + "\\FIELD_FILES\\";
-                            //    string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
-                            //    //然后将取出的数据,转换成Bitmap对象
-                            //    Bitmap tempbit = fielddata.ReadImageFile(imagePatht);
-                            //    int pixw = tempbit.Width;
-                            //    double xs = pixw / ScanFieldSize;
-
-                            //    particleM = particleM + "," + subt;
-                            //    Bitmap bmap = fielddata.GetBitmapForBig(subt, xs, result.FilePath);
-                            //    if (bmap != null)
-                            //    {
-                            //        bmap.Tag = new List<string>() { subt.Split(',')[0].Split(':')[0], subt.Split(',')[0].Split(':')[1], particles.Rows[i]["TypeId"].ToString() };
-                            //        dgV_ParticlesDevidePage.Rows[add_rowindex].Height = 150;
-                            //        dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = bmap;
-                            //        dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Style.BackColor = Color.Azure;
-                            //    }
-                            //    else
-                            //    {
-                            //        dgV_ParticlesDevidePage.Rows[add_rowindex].Height = 150;
-
-                            //        dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Style.BackColor = Color.Azure;
-                            //    }
-                            //}
-                            //else
-                            //{
+                            string subt = particles.Rows[i]["SubParticles"].ToString();
+                            if (subt != null && subt != "")
+                            {
+                                double ScanFieldSize = Convert.ToDouble(((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["SEMDataMsr"])["ScanFieldSize"]);
+                                string filePatht = result.FilePath + "\\FIELD_FILES\\";
+                                string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
+                                //然后将取出的数据,转换成Bitmap对象
+                                Bitmap tempbit = fielddata.ReadImageFile(imagePatht);
+                                int pixw = tempbit.Width;
+                                double xs = pixw / ScanFieldSize;
+
+                                particleM = particleM + "," + subt;
+                                Bitmap bmap = fielddata.GetBitmapForBig(subt, xs, result.FilePath);
+                                if (bmap != null)
+                                {
+                                    bmap.Tag = new List<string>() { subt.Split(',')[0].Split(':')[0], subt.Split(',')[0].Split(':')[1], particles.Rows[i]["TypeId"].ToString() };
+                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Height = 150;
+                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = bmap;
+                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Style.BackColor = Color.Azure;
+                                }
+                                else
+                                {
+                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Height = 150;
+
+                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Style.BackColor = Color.Azure;
+                                }
+                            }
+                            else
+                            {
                                 if (FieldImage.Key != particles.Rows[i]["fieldid"].ToString() || FieldImage.Value == null)
                                 {
                                     string imagePath = filePath + "Field" + particles.Rows[i]["fieldid"].ToString() + ".bmp";
@@ -590,8 +590,8 @@ namespace OTSIncAReportGrids
                                 Bitmap bmap = fielddata.GetBitmapByParticle(FieldImage.Value, rectangle);
                                 bmap.Tag = new List<string>() { particles.Rows[i]["FieldId"].ToString(), particles.Rows[i]["ParticleId"].ToString(), particles.Rows[i]["TypeId"].ToString() };
                                 dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = bmap;
-                                dgV_ParticlesDevidePage.Rows[add_rowindex].Height = bmap.Height+20;
-                            //}
+                                dgV_ParticlesDevidePage.Rows[add_rowindex].Height = bmap.Height + 20;
+                            }
                         }
                         if (enl.Current.Key == "DiameterRatio")
                         {
@@ -1297,7 +1297,6 @@ namespace OTSIncAReportGrids
             btnGo.Enabled = true;
         }
 
-        bool isTextChanged = false;
         /// <summary>
         /// 分页属性改变了。
         /// </summary>
@@ -1311,26 +1310,6 @@ namespace OTSIncAReportGrids
             else { txtPageNum.Text = "1"; }
         }
 
-        /// <summary>
-        /// 光标离开分页属性
-        private void txtPageSize_Leave(object sender, EventArgs e)
-        {
-            if (isTextChanged)
-            {
-                isTextChanged = false;
-                lnkFirst_Click(null, null);
-            }
-        }
-
-        private void txtPageSize_KeyPress(object sender, KeyPressEventArgs e)
-        {
-            if (isTextChanged)
-            {
-                isTextChanged = false;
-                lnkFirst_Click(null, null);
-            }
-        }
-
         private void lnkFirst_Click(object sender, EventArgs e)
         {
             PageIndex = 1;
@@ -1375,27 +1354,6 @@ namespace OTSIncAReportGrids
             }
         }
 
-        /// <summary>
-        /// 跳转页数限制
-        /// </summary>
-        private void txtPageNum_TextChanged(object sender, EventArgs e)
-        {
-            int num = 0;
-            if (int.TryParse(txtPageNum.Text.Trim(), out num) && num > 0)
-            {
-
-            }
-            else { txtPageNum.Text = "1"; }
-        }
-
-        /// <summary>
-        /// enter键功能
-        /// </summary>
-        private void txtPageNum_KeyPress(object sender, KeyPressEventArgs e)
-        {
-            btnGo_Click(null, null);
-        }
-
         private void cbB_PageSize_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (cbB_PageSize.SelectedItem.ToString() == "All")
@@ -1643,151 +1601,6 @@ namespace OTSIncAReportGrids
             return ms.ToArray();
         }
 
-        /// <summary>
-        /// 返回原子序数
-        /// </summary>
-        /// <param name="ElementName"></param>
-        /// <returns></returns>
-        int ReturnsAtomicNumberByElementName(string ElementName)
-        {
-            switch (ElementName)
-            {
-                case "H": return 1;
-                case "He": return 2;
-                case "Li": return 3;
-                case "Be": return 4;
-                case "B": return 5;
-                case "C": return 6;
-                case "N": return 7;
-                case "O": return 8;
-                case "F": return 9;
-                case "Ne": return 10;
-                case "Na": return 11;
-                case "Mg": return 12;
-                case "Al": return 13;
-                case "Si": return 14;
-                case "P": return 15;
-                case "S": return 16;
-                case "Cl": return 17;
-                case "Ar": return 18;
-                case "K": return 19;
-                case "Ca": return 20;
-                case "Sc": return 21;
-                case "Ti": return 22;
-                case "V": return 23;
-                case "Cr": return 24;
-                case "Mn": return 25;
-                case "Fe": return 26;
-                case "Co": return 27;
-                case "Ni": return 28;
-                case "Cu": return 29;
-                case "Zn": return 30;
-                case "Ga": return 31;
-                case "Ge": return 32;
-                case "As": return 33;
-                case "Se": return 34;
-                case "Br": return 35;
-                case "Kr": return 36;
-                case "Rb": return 37;
-                case "Sr": return 38;
-                case "Y": return 39;
-                case "Zr": return 40;
-                case "Nb": return 41;
-                case "Mo": return 42;
-                case "Tc": return 43;
-                case "Ru": return 44;
-                case "Rh": return 45;
-                case "Pd": return 46;
-                case "Ag": return 47;
-                case "Cd": return 48;
-                case "In": return 49;
-                case "Sn": return 50;
-                case "Sb": return 51;
-                case "Te": return 52;
-                case "I": return 53;
-                case "Xe": return 54;
-                case "Cs": return 55;
-                case "Ba": return 56;
-                case "La": return 57;
-                case "Ce": return 58;
-                case "Pr": return 59;
-                case "Nd": return 60;
-                case "Pm": return 61;
-                case "Sm": return 62;
-                case "Eu": return 63;
-                case "Gd": return 64;
-                case "Tb": return 65;
-                case "Dy": return 66;
-                case "Ho": return 67;
-                case "Er": return 68;
-                case "Tm": return 69;
-                case "Yb": return 70;
-                case "Lu": return 71;
-                case "Hf": return 72;
-                case "Ta": return 73;
-                case "W": return 74;
-                case "Re": return 75;
-                case "Os": return 76;
-                case "Ir": return 77;
-                case "Pt": return 78;
-                case "Au": return 79;
-                case "Hq": return 80;
-                case "TI": return 81;
-                case "Pb": return 82;
-                case "Bi": return 83;
-                case "Po": return 84;
-                case "At": return 85;
-                case "Rn": return 86;
-                case "Fr": return 87;
-                case "Ra": return 88;
-                case "Ac": return 89;
-                case "Th": return 90;
-                case "Pa": return 91;
-                case "U": return 92;
-                case "Np": return 93;
-                case "Pu": return 94;
-                case "Am": return 95;
-                case "Cm": return 96;
-                case "Bk": return 97;
-                case "Cf": return 98;
-                case "Es": return 99;
-                case "Fm": return 100;
-                case "Mc": return 101;
-                case "No": return 102;
-                case "Lr": return 103;
-                case "Rf": return 104;
-                case "Db": return 105;
-                case "Sg": return 106;
-                case "Bh": return 107;
-                case "Hs": return 108;
-                case "Mt": return 109;
-                case "Ds": return 110;
-                case "Rg": return 111;
-                case "Unb": return 112;
-                default: return 1000;
-            }
-        }
-
-
-
-        public List<string> GetElementsColName()
-        {
-            List<string> list_str = new List<string>();
-            string ls_str = "Ar,Al,Si,B,P,C,S,N,Cl,O,F,Ne,He,Lr,Lu,Rn,Xe,Kr,Md,Tm,Po,Te,Se,Es,Ho,Pb,Sn,Ge,Np,Pm,Os,Ru,Fe,Bk,Tb,Hg,Cd,Zn,Pa,Pr,W,Mo,Cr,No,Yb,At,I,Br,Fm,Er,Bi,Sb,As,Hf,Zr,Ti,Am,Eu,Pt,Pd,Ni,U,Nd,Re,Tc,Mn,Cf,Dy,Tl,In,Ga,Ra,Ba,Sr,Ca,Cm,Gd,Au,Ag,Cu,Th,Ce,Ta,Pu,Nb,Sm,V,Ir,Rh,Co,Ac,La,Y,Sc,Fr,Cs,Rb,K,Na,Mg,Be,Li,H";
-
-            string[] strs = ls_str.Split(',');
-            for (int i = 0; i < strs.Count(); i++)
-            {
-                list_str.Add(strs[i]);
-            }
-
-            return list_str;
-        }
-
-        private void panel2_Paint(object sender, PaintEventArgs e)
-        {
-
-        }
     }
 
 

+ 0 - 11
OTSIncAReportApp/frmMeasureRstMgr.cs

@@ -323,17 +323,6 @@ namespace OTSIncAReportApp
                 return;
             }
 
-            //添加启动系统界面显示
-            string SystemMode = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)suggestions["Sample"])["Members"])["MsrParams"])["SysType"].ToString();
-            if (SystemMode == "IncA")
-            {
-                m_ReportApp.Text = m_ReportApp.Text.Split(' ')[0] + " -- Inclusion Analysis System";
-            }
-            else if (SystemMode == "CleanlinessA")
-            {
-                m_ReportApp.Text = m_ReportApp.Text.Split(' ')[0] + " -- Cleanliness Analysis System";
-            }
-
             DataOperation.Model.ResultFile result = new DataOperation.Model.ResultFile()
             {
                 FileId = workingid.ToString(),