Browse Source

Merge branch 'OTSRelease3_0' of http://36.129.163.148:30080/gogsadmin/OTS into OTSRelease3_0

gsp 1 year ago
parent
commit
0b7cb2e0ea

+ 8 - 8
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.cs

@@ -1433,7 +1433,7 @@ namespace OTSIncAReportGraph.Controls
             if (sfd.ShowDialog() == DialogResult.OK)
             {
                 this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
-                OutPIC outpic = new OutPIC();
+                ImageExporter outpic = new ImageExporter();
                 outpic.m_list_allDfield = m_list_allDfield;
                 outpic.resultFile = resultFile;
                 outpic.sfd = sfd;
@@ -1919,7 +1919,7 @@ namespace OTSIncAReportGraph.Controls
             if (sfd.ShowDialog() == DialogResult.OK)
             {
                 this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
-                OutPIC outpic = new OutPIC();
+                ImageExporter outpic = new ImageExporter();
                 outpic.m_list_allDfield = m_list_allDfield;
                 outpic.resultFile = resultFile;
                 outpic.sfd = sfd;
@@ -2240,7 +2240,7 @@ namespace OTSIncAReportGraph.Controls
             if (sfd.ShowDialog() == DialogResult.OK)
             {
                 this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
-                OutPIC outpic = new OutPIC();
+                ImageExporter outpic = new ImageExporter();
                 outpic.m_list_allDfield = m_list_allDfield;
                 outpic.resultFile = resultFile;
                 outpic.sfd = sfd;
@@ -2315,7 +2315,7 @@ namespace OTSIncAReportGraph.Controls
             if (sfd.ShowDialog() == DialogResult.OK)
             {
                 this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
-                OutPIC outpic = new OutPIC();
+                ImageExporter outpic = new ImageExporter();
                 outpic.m_list_allDfield = m_list_allDfield;
                 outpic.resultFile = resultFile;
                 outpic.sfd = sfd;
@@ -2338,7 +2338,7 @@ namespace OTSIncAReportGraph.Controls
             if (sfd.ShowDialog() == DialogResult.OK)
             {
                 this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
-                OutPIC outpic = new OutPIC();
+                ImageExporter outpic = new ImageExporter();
                 outpic.m_list_allDfield = m_list_allDfield;
                 outpic.resultFile = resultFile;
                 outpic.sfd = sfd;
@@ -2580,7 +2580,7 @@ namespace OTSIncAReportGraph.Controls
             {
                 var datd = GetGBDataTable(sender, (int)CALCULATE_TABLE_TYPE.GB_Method1);
                 this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
-                OutPIC outpic = new OutPIC();
+                ImageExporter outpic = new ImageExporter();
                 outpic.GBDatatableOne = datd;
                 outpic.GridLength = Convert.ToInt32(710.0 / imageDisHelper.m_pixelSize);
                 outpic.m_list_allDfield = m_list_allDfield;
@@ -2604,7 +2604,7 @@ namespace OTSIncAReportGraph.Controls
             {
                 var datd = GetGBDataTable(sender, (int)CALCULATE_TABLE_TYPE.GB_Method2);
                 this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
-                OutPIC outpic = new OutPIC();
+                ImageExporter outpic = new ImageExporter();
                 outpic.GBDatatableOne = datd;
                 outpic.GridLength = Convert.ToInt32(710.0 / imageDisHelper.m_pixelSize);
                 outpic.m_list_allDfield = m_list_allDfield;
@@ -2628,7 +2628,7 @@ namespace OTSIncAReportGraph.Controls
             {
                 var datd = GetGBDataTable(sender, (int)CALCULATE_TABLE_TYPE.ASTM);
                 this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
-                OutPIC outpic = new OutPIC();
+                ImageExporter outpic = new ImageExporter();
                 outpic.GBDatatableOne = datd;
                 outpic.GridLength = Convert.ToInt32(710.0 / imageDisHelper.m_pixelSize);
                 outpic.m_list_allDfield = m_list_allDfield;

+ 4 - 4
OTSIncAReportApp/1-UI/Control_Graph/Controls/OutPIC.cs → OTSIncAReportApp/1-UI/Control_Graph/Controls/ImageExporter.cs

@@ -16,7 +16,7 @@ using System.Windows.Forms;
 
 namespace OTSIncAReportApp._3_ServiceCenter
 {
-    class OutPIC
+    class ImageExporter
     {
         public OTSIncAReportApp.frmReportApp m_ReportApp;
         //包含particle的field的列表对象
@@ -299,7 +299,7 @@ namespace OTSIncAReportApp._3_ServiceCenter
            
 
             //导出原图(渲染图)在下方增加每种颜色的标注和面积占比
-            if (type == (int)Outpic_enum.Render_pic || type == (int)Outpic_enum.GBOne)
+            if (type == (int)Outpic_enum.Render_pic /*|| type == (int)Outpic_enum.GBOne*/)
             {
                 DataTable particleData = ParticleDataIntegration(ParticleData, ParticleClassData);
                 int NumberOfRows = getPICstringLong(particleData, list_pano);
@@ -383,10 +383,10 @@ namespace OTSIncAReportApp._3_ServiceCenter
 
                 //int Yzhou = 0;
                 int Yzhou = (int)picYmin- distinctY.Min();
-                Yzhou = Yzhou + (GridLength / 2)+(imgeH/2);
+                Yzhou = Yzhou + (GridLength / 2) + (imgeH / 2);
                 for (int i = 0; i < distinctY.Count; i++)
                 {
-                    int Xzhou = +(GridLength / 2) + (imgeW / 2);
+                    int Xzhou = +(GridLength / 2) /*+ (imgeW / 2)*/;
                     DataTable number = CountTheNumberOfX_axes(GBDatatableOne, "fieldY", distinctY[i].ToString());
                     for (int j = 0; j < number.Rows.Count; j++)
                     {

+ 39 - 5
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/InclusionProportion.cs

@@ -241,13 +241,47 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
         {
             ParticleData fielddata = new ParticleData(m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_otsreport_export.m_ReportApp.m_rstDataMgr.getSelectedIndex()].FilePath);
 
-            
-
             DataTable m_bt_DBData = fielddata.GetAreaByAllIncA("");//获取所有分类面积和数量信息
-           
+
+            //按照list列表进行物质类排序,物质类中的元素分类按照面积的大小进行排序
+            List<string> ClassName = new List<string>();
+            DataTable getClass_dt = fielddata.GetAllClass();
+            bool bl = false;
+            for (int i = 0; i < getClass_dt.Rows.Count; i++)
+            {
+                if (getClass_dt.Rows[i]["GroupName"].ToString() != "NOT_INCLUTION" && getClass_dt.Rows[i]["GroupName"].ToString() != "Invalid"
+                && getClass_dt.Rows[i]["GroupName"].ToString() != "Not Identified")
+                    if (getClass_dt.Rows[i]["GroupName"].ToString() == "")
+                    {
+                        if (!bl)
+                        {
+                            ClassName.Add("Default");
+                            bl = true;
+                        }
+                    }
+                    else
+                    {
+                        if (getClass_dt.Rows[i]["GroupName"].ToString() != "Default")
+                        {
+                            ClassName.Add(getClass_dt.Rows[i]["GroupName"].ToString());
+                        }
+                    }
+            }
+            DataTable dataTable = m_bt_DBData.Clone();
+            for (int i=0;i< m_bt_DBData.Rows.Count;i++)
+            {
+                for (int a=0;a< ClassName.Count;a++)
+                {
+                    if (m_bt_DBData.Rows[i]["GroupName"].ToString()== ClassName[a].ToString())
+                    {
+                        dataTable.Rows.Add(m_bt_DBData.Rows[i].ItemArray);
+                    }
+                }
+            }
+
             if (m_mbszclass.list_str_MainPriority.Count==0)
             {
-                return ConSolidateInvalid(m_bt_DBData);
+                return ConSolidateInvalid(dataTable);
             }
             DataTable data = m_bt_DBData.Clone();
             for (int i = 0; i < m_bt_DBData.Rows.Count; i++)
@@ -262,7 +296,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 }
             }
 
-            return ConSolidateInvalid(data);
+            return ConSolidateInvalid(dataTable);
         }
 
         /// <summary>

+ 21 - 8
OTSIncAReportApp/1-UI/OTSReportExport/Template/DataTemplate.cs

@@ -208,7 +208,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             xrTa_ParticleSizeTable.Rows[1].Cells[0].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
             xrTa_ParticleSizeTable.Rows[1].Cells[0].Text = xrTa_ParticleSizeTable.Rows[1].Cells[0].Text + ComputeModeName + "(μm)";
             xrTa_ParticleSizeTable.Rows[1].Cells[0].Font = new Font(Schriftart_chinese, xrTa_ParticleSizeTable.Rows[1].Cells[0].Font.Size);
-
+            int total = 0;
             for (int i = 0; i < CompositeData[1].Rows.Count; i++)
             {
                 XRTableRow row = new XRTableRow();
@@ -245,6 +245,11 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 XRTableCellData(row, tCell_size_7, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_7");
                 xrTa_ParticleSizeTable.Rows.Add(row);
 
+                if (CompositeData[1].Rows[i]["Name"].ToString()!="")
+                {
+                    total += Convert.ToInt32(CompositeData[1].Rows[i]["total"]);
+                }
+
             }
             this.Detail.Controls.Add(xrTa_ParticleSizeTable);
             xrTa_ParticleSizeTable.LocationF = new PointF(10f, 940f);
@@ -263,10 +268,10 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             vs.Add(0);
             vs.Add(0);
             vs.Add(0);
-            int total = 0;
+            
             for (int i = 0; i < surface_dt2.Rows.Count; i++)
             {
-                for (int a = 1; a < 11; a++)
+                for (int a = 1; a < 10; a++)
                 {
                     if (surface_dt2.Rows[i]["c" + a.ToString()] != " " && surface_dt2.Rows[i]["c" + a.ToString()] != "" && surface_dt2.Rows[i]["c" + a.ToString()] != null)
                     {
@@ -275,7 +280,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                             vs[a - 1] += Convert.ToInt32(result);
                     }
                 }
-                total += Convert.ToInt32(surface_dt2.Rows[i]["total"]);
+                //total += Convert.ToInt32(surface_dt2.Rows[i]["total"]);
             }
             setXRLabelData(xrTable3.Rows[0].Cells[0], GetlanguageData("dev_total", languageData));
             //xrTable3.Rows[0].Cells[0].Text = "总数量";
@@ -402,7 +407,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             int total = 0;
             for (int i = 0; i < surface_dt2.Rows.Count; i++)
             {
-                for (int a = 1; a < 11; a++)
+                for (int a = 1; a < 10; a++)
                 {
                     if (surface_dt2.Rows[i]["c" + a.ToString()] != " " && surface_dt2.Rows[i]["c" + a.ToString()] != "" && surface_dt2.Rows[i]["c" + a.ToString()] != null)
                     {
@@ -484,7 +489,15 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             DataTable classData= particleList.GetLargeClassification(TemplateClass, m_otsreport_export, ComputeMode);
             DataTable subdivdeData = particleList.GetSubClassification(TemplateClass, m_otsreport_export, ComputeMode);
             DataTable chartmax= particleList.GetChartDataCalss(TemplateClass, m_otsreport_export, ComputeMode);
-            DataTable surface_dt2 = particleList.ParticleResults(TemplateClass, m_otsreport_export, ComputeMode);
+            //DataTable surface_dt2 = particleList.ParticleResults(TemplateClass, m_otsreport_export, ComputeMode);
+            DataTable surface_dt2 = CompositeData[1].Clone();
+            for (int i=0;i< CompositeData[1].Rows.Count;i++)
+            {
+                if (CompositeData[1].Rows[i]["Name"].ToString()!="")
+                {
+                    surface_dt2.Rows.Add(CompositeData[1].Rows[i].ItemArray);
+                }
+            }
 
             for (int i = 0; i < classData.Rows.Count; i++)
             {
@@ -562,10 +575,10 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 
 
             xrChart_ParticelSizeSubdivision.Visible = false;
-            if (a_pieSeries && subdivdeData.Rows.Count>0)
+            if (a_pieSeries && surface_dt2.Rows.Count>0)
             {
 
-                DataView dv2 = subdivdeData.DefaultView;
+                DataView dv2 = surface_dt2.DefaultView;
                 dv2.Sort = "total DESC";
                 DataTable dt_subdivde_dt = dv2.ToTable();
 

+ 1 - 1
OTSIncAReportApp/OTSIncAReportApp.csproj

@@ -766,7 +766,7 @@
       <DependentUpon>OutputNlog.cs</DependentUpon>
     </Compile>
     <Compile Include="3-ServiceCenter\HardwareController.cs" />
-    <Compile Include="1-UI\Control_Graph\Controls\OutPIC.cs" />
+    <Compile Include="1-UI\Control_Graph\Controls\ImageExporter.cs" />
     <Compile Include="Help.cs">
       <SubType>Form</SubType>
     </Compile>

+ 15 - 15
OTSPartA_STDEditor/UI/Form_Main.cs

@@ -403,7 +403,7 @@ namespace OTSPartA_STDEditor
 
 
                 //forth_elem干扰or分隔符,故先行去掉
-                str_RemoveBlank = str_RemoveBlank.Replace("forth_elem", "");
+                //str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
 
                 string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
                 List<string> str_Removeandor = new List<string>();
@@ -645,12 +645,12 @@ namespace OTSPartA_STDEditor
                     List<string> UsingOtherPropertyL = new List<string>();
 
                     string str_RemoveBlank = kv.Value.Expression;
-                    //forth_elem干扰or分隔符,故先行去掉
-                    if (str_RemoveBlank.Contains("forth_elem"))
-                    {
-                        str_RemoveBlank = str_RemoveBlank.Replace("forth_elem", "");
-                        UsingOtherPropertyList = "forth_elem";
-                    }
+                    ////forth_elem干扰or分隔符,故先行去掉
+                    //if (str_RemoveBlank.Contains("fourth_elem"))
+                    //{
+                    //    str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+                    //    UsingOtherPropertyList = "fourth_elem";
+                    //}
 
                     str_RemoveBlank = str_RemoveBlank.Replace(" ", "");
                     string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
@@ -796,12 +796,12 @@ namespace OTSPartA_STDEditor
                     List<string> UsingOtherPropertyL = new List<string>();
 
                     string str_RemoveBlank = kv.Value.Expression;
-                    //forth_elem干扰or分隔符,故先行去掉
-                    if (str_RemoveBlank.Contains("forth_elem"))
-                    {
-                        str_RemoveBlank = str_RemoveBlank.Replace("forth_elem", "");
-                        UsingOtherPropertyList = "forth_elem,";
-                    }
+                    ////forth_elem干扰or分隔符,故先行去掉
+                    //if (str_RemoveBlank.Contains("fourth_elem"))
+                    //{
+                    //    str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+                    //    UsingOtherPropertyList = "fourth_elem,";
+                    //}
 
                     str_RemoveBlank = str_RemoveBlank.Replace(" ", "");
                     string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
@@ -1173,9 +1173,9 @@ namespace OTSPartA_STDEditor
                     this.Text = this.Text.Split(' ')[0] + "   " + STDDBAddress;
                     IsModified = false;
                 }
-                catch
+                catch(Exception ex)
                 {
-                    MessageBox.Show("The selected standard library is formatted incorrectly, please open the correct standard library!", "Tip");
+                    MessageBox.Show(ex.ToString(), "Tip");
                 }
             }
         }

+ 7 - 7
OTSPartA_STDEditor/UI/Form_MaxEDSRules.cs

@@ -42,7 +42,7 @@ namespace OTSPartA_STDEditor
             this.comboBox_Elem1.Items.Add("first_elem");
             this.comboBox_Elem1.Items.Add("second_elem");
             this.comboBox_Elem1.Items.Add("third_elem");
-            this.comboBox_Elem1.Items.Add("forth_elem");
+            this.comboBox_Elem1.Items.Add("fourth_elem");
             this.comboBox_Elem1.Items.Add("fifth_elem");
             this.comboBox_Elem1.Items.Add("sixth_elem");
             this.comboBox_Elem1.Items.Add("seventh_elem");
@@ -498,11 +498,11 @@ namespace OTSPartA_STDEditor
 
                 string str_RemoveBlank = "";
                 //forth_elem干扰or分隔符,故先行去掉
-                if (XmlTree_MaxEDSRules.Nodes[num].Tag.ToString().Contains("forth_elem"))
-                {
-                    str_RemoveBlank = str_RemoveBlank.Replace("forth_elem", "");
-                    UsingOtherPropertyList = "forth_elem,";
-                }
+                //if (XmlTree_MaxEDSRules.Nodes[num].Tag.ToString().Contains("fourth_elem"))
+                //{
+                //    str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+                //    UsingOtherPropertyList = "fourth_elem,";
+                //}
 
                 str_RemoveBlank = XmlTree_MaxEDSRules.Nodes[num].Tag.ToString().Replace(" ", "");
                 string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
@@ -788,7 +788,7 @@ namespace OTSPartA_STDEditor
             }
 
             //forth_elem干扰or分隔符,故先行去掉
-            str_RemoveBlank = str_RemoveBlank.Replace("forth_elem", "");
+            //str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
 
             string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
             List<string> str_Removeandor = new List<string>();

+ 7 - 7
OTSPartA_STDEditor/UI/Form_ZeroElementRules.cs

@@ -40,7 +40,7 @@ namespace OTSPartA_STDEditor
             this.comboBox_Elem1.Items.Add("first_elem");
             this.comboBox_Elem1.Items.Add("second_elem");
             this.comboBox_Elem1.Items.Add("third_elem");
-            this.comboBox_Elem1.Items.Add("forth_elem");
+            this.comboBox_Elem1.Items.Add("fourth_elem");
             this.comboBox_Elem1.Items.Add("fifth_elem");
             this.comboBox_Elem1.Items.Add("sixth_elem");
             this.comboBox_Elem1.Items.Add("seventh_elem");
@@ -467,11 +467,11 @@ namespace OTSPartA_STDEditor
 
                 string str_RemoveBlank = "";
                 //forth_elem干扰or分隔符,故先行去掉
-                if (XmlTree_ZeroElementRules.Nodes[num].Tag.ToString().Contains("forth_elem"))
-                {
-                    str_RemoveBlank = str_RemoveBlank.Replace("forth_elem", "");
-                    UsingOtherPropertyList = "forth_elem,";
-                }
+                //if (XmlTree_ZeroElementRules.Nodes[num].Tag.ToString().Contains("fourth_elem"))
+                //{
+                //    str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
+                //    UsingOtherPropertyList = "fourth_elem,";
+                //}
 
                 str_RemoveBlank = XmlTree_ZeroElementRules.Nodes[num].Tag.ToString().Replace(" ", "");
                 string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
@@ -781,7 +781,7 @@ namespace OTSPartA_STDEditor
             }
 
             //forth_elem干扰or分隔符,故先行去掉
-            str_RemoveBlank = str_RemoveBlank.Replace("forth_elem", "");
+            //str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
 
             string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
             List<string> str_Removeandor = new List<string>();

+ 1 - 1
OTSPartA_STDEditor/UI/STDEditor.cs

@@ -688,7 +688,7 @@ namespace OTSPartA_STDEditor
 
             string str_RemoveBlank = textbox_STDEditor.Text.ToString().Replace(" ", "");
             str_RemoveBlank = str_RemoveBlank.Replace("\r\n", "");
-            str_RemoveBlank = str_RemoveBlank.Replace("forth_elem", "");
+            //str_RemoveBlank = str_RemoveBlank.Replace("fourth_elem", "");
             string[] str_Removeand = System.Text.RegularExpressions.Regex.Split(str_RemoveBlank, "and", System.Text.RegularExpressions.RegexOptions.None);
             List<string> str_Removeandor = new List<string>();
             for (int i = 0; i < str_Removeand.Length; i++)