Explorar o código

修复导出国标图片失败的BUG

zhangjiaxin hai 1 ano
pai
achega
ba89226f9c

+ 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++)
                     {

+ 0 - 4
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/InclusionProportion.cs

@@ -241,12 +241,8 @@ 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();

+ 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>