Prechádzať zdrojové kódy

Add a ternary graph

cxs 3 mesiacov pred
rodič
commit
3d620b372e

+ 6 - 5
OTSIncAReportApp/1-UI/OTSDisplaySourceGridData/OTSSampleReportInfo/OTSSampleReportInfo.cs

@@ -57,11 +57,12 @@ namespace OTSIncAReportApp.OTSSampleReportInfo
         PARTICALE_COMP = 0,
         PARTICALE_SIZE_DISTRIBUTION = 1,
         AVE_ELEMENT_COMP = 2,
-        GB_Method1 = 3,
-        GB_Method2 =4,
-        ASTM = 5,
-        DIN = 6,
-        YB6156=7
+        TRIO_CHART = 3,
+        GB_Method1 = 4,
+        GB_Method2 =5,
+        ASTM = 6,
+        DIN = 7,
+        YB6156=8
     }
     public enum CALCULATE_CHART_TYPE
     {

+ 26 - 8
OTSIncAReportApp/1-UI/OTSDisplaySourceGridData/frmReportConditionChoose.cs

@@ -196,7 +196,7 @@ namespace OTSIncAReportApp
             //计算方式
             AddGridData(OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE, dimensionCalculationMethod, OTS_ITEM_TYPES.COMBO, false, "image property calculation method", DefaultSIZE_CAL_METHOD_TYPE, m_rstDataMgr.GetSizeCalMethodTypeList(), ind);
             //数据表类型
-            List<string> list2 = new List<string>() { granularComponent, particleSizeDistribution, averageElementComposition };
+            List<string> list2 = new List<string>() { granularComponent, particleSizeDistribution, averageElementComposition, ternaryPhaseDiagram };
             ResultFile resultinfo = m_rstDataMgr.ResultFilesList[m_rstDataMgr.GetWorkingResultId()];
             var Systype = RptConfigFile.GetRptConfig().Systype;
 
@@ -510,20 +510,28 @@ namespace OTSIncAReportApp
 
                     list.Insert(2, sampleData1);
                 }
-
-                //if ((int)sampleData3.itemVal == (int)CALCULATE_TABLE_TYPE.PARTICALE_GENE_INFO)
-                //{
-                //    var sampleData1 = m_CurrentConditions[OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST];
-
-                //    list.Insert(2, sampleData1);
-                //}
                 if ((int)sampleData3.itemVal == (int)CALCULATE_TABLE_TYPE.AVE_ELEMENT_COMP)
                 {
                     var sampleData1 = m_CurrentConditions[OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE];
 
                     list.Insert(2, sampleData1);
                 }
+                if ((int)sampleData3.itemVal == (int)CALCULATE_TABLE_TYPE.TRIO_CHART)
+                {
 
+                    var sampleData1 = m_CurrentConditions[OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE];
+                    list.Add(sampleData1);
+                    //三元相图模板
+                    var sampleData15 = m_CurrentConditions[OTS_REPORT_PROP_GRID_ITEMS.TRIO_CHART_TYPE];
+                    list.Add(sampleData15);
+                    //粒级表
+                    var sampleData_partsizefile = m_CurrentConditions[OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE];
+                    m_ReportApp.m_rstDataMgr.m_RptConfigFile.PartSizeFile = sampleData_partsizefile.itemDisplayVal.ToString();
+                    list.Add(sampleData_partsizefile);
+                    //尺寸计算方法
+                    var sampleData5 = m_CurrentConditions[OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE];
+                    list.Add(sampleData5);
+                }
             }
             else if (tbindex == DisplayPicutureType.OverviewTable)//概况
             {
@@ -716,6 +724,14 @@ namespace OTSIncAReportApp
                             m_ReportApp.m_TablesWindowandChart.Controls.Add(m_ReportApp.im_ElementCompositionAvgGrid);
                             m_ReportApp.m_TablesWindowandChart.Activate();
                             break;
+                        case CALCULATE_TABLE_TYPE.TRIO_CHART:
+                            m_ReportApp.m_TablesWindowandChart.Controls.Clear();
+                            m_ReportApp.im_EChart_Trianglediagram = new Control_ECharts.DEVChart_Trianglediagram(m_ReportApp);
+                            m_ReportApp.im_EChart_Trianglediagram.Template = "";
+                            m_ReportApp.im_EChart_Trianglediagram.Dock = DockStyle.Fill;
+                            m_ReportApp.m_TablesWindowandChart.Controls.Add(m_ReportApp.im_EChart_Trianglediagram);
+                            m_ReportApp.m_TablesWindowandChart.Activate();
+                            break;
                         case CALCULATE_TABLE_TYPE.GB_Method1:
                             var sou = m_ReportApp.m_conditionChoose.m_CurrentConditions[OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE].itemDisplayVal.ToString();
                             if (sou.Contains("+"))
@@ -869,6 +885,8 @@ namespace OTSIncAReportApp
                             //    MessageBox.Show("This standard requires at least 6 measurements!");
                             //    return;
                             //}
+
+
                             //德标
                             Cursor.Current = Cursors.WaitCursor;
                             int index5 = m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListIndexByItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);