|
@@ -65,7 +65,7 @@ namespace OTSIncAReportApp.Control_ECharts
|
|
|
{ //三元相图模板
|
|
|
template = m_condition.m_conditionData.GetPropItemDisplayValueByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.TRIO_CHART_TYPE).ToString();
|
|
|
}
|
|
|
- //获取粒级表
|
|
|
+
|
|
|
string pathtpf = Application.StartupPath + "\\Config\\ProData\\DefaultTriTemplateFile.tpf";
|
|
|
List<string> nameList = new List<string>();
|
|
|
DataSet ds = XMLoperate.GetXmlData(pathtpf, "XMLData");
|
|
@@ -74,9 +74,47 @@ namespace OTSIncAReportApp.Control_ECharts
|
|
|
//设置标签名称
|
|
|
List<string> listName = new List<string>();
|
|
|
//获取粒级表
|
|
|
- string pathe = m_DataMgr.m_RptConfigFile.PartSizeFileFolder + m_DataMgr.m_RptConfigFile.PartSizeFile;
|
|
|
- DataSet ds2 = XMLoperate.GetXml(pathe);
|
|
|
- string sizestr = ds2.Tables[0].Rows[0]["Sizes"].ToString();
|
|
|
+ string sizestr = "";
|
|
|
+ if (m_ReportApp.m_rstDataMgr.m_RptConfigFile.PartSizeFile == "AUTO.psf")
|
|
|
+ {
|
|
|
+ double dn = 99999;
|
|
|
+ string sou1 = m_condition.m_CurrentConditions[OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE].itemDisplayVal.ToString();
|
|
|
+ if (sou1.Contains("+"))
|
|
|
+ {
|
|
|
+ for (int i = 0; i < sou1.Split('+').Length; i++)
|
|
|
+ {
|
|
|
+ ResultFile resultFile = m_ReportApp.m_rstDataMgr.ResultFilesList.Find(s => s.anotherFileName == sou1.Split('+')[i]);
|
|
|
+ if (resultFile != null)
|
|
|
+ {
|
|
|
+ if (dn > resultFile.GetParticleMINECD())
|
|
|
+ {
|
|
|
+ dn = resultFile.GetParticleMINECD();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ResultFile resultFile = m_ReportApp.m_rstDataMgr.CurResultFile;
|
|
|
+ dn = resultFile.GetParticleMINECD();
|
|
|
+ }
|
|
|
+ sizestr = dn.ToString() + ",";
|
|
|
+ for (double p = dn; p < 50; p = p * Math.Sqrt(2))
|
|
|
+ {
|
|
|
+ if (p > dn && p <= 50.5)
|
|
|
+ {
|
|
|
+ double dd = Math.Round(p);
|
|
|
+ sizestr += dd.ToString() + ",";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ sizestr = sizestr.Remove(sizestr.Length - 1, 1);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ string pathe = m_DataMgr.m_RptConfigFile.PartSizeFileFolder + m_DataMgr.m_RptConfigFile.PartSizeFile;
|
|
|
+ DataSet ds2 = XMLoperate.GetXml(pathe);
|
|
|
+ sizestr = ds2.Tables[0].Rows[0]["Sizes"].ToString();
|
|
|
+ }
|
|
|
for (int i = 0; i < sizestr.Split(',').Length - 1; i++)
|
|
|
{
|
|
|
if (sizestr.Split(',')[i].Length > 0)
|
|
@@ -492,11 +530,49 @@ namespace OTSIncAReportApp.Control_ECharts
|
|
|
ParticleData particledata = new ParticleData(filepath);
|
|
|
//设置标签名称
|
|
|
List<string> listName = new List<string>();
|
|
|
- //获取粒级表
|
|
|
- string pathe = m_DataMgr.m_RptConfigFile.PartSizeFileFolder + m_DataMgr.m_RptConfigFile.PartSizeFile;
|
|
|
- DataSet ds = XMLoperate.GetXml(pathe);
|
|
|
- string sizestr = ds.Tables[0].Rows[0]["Sizes"].ToString();
|
|
|
|
|
|
+ //获取粒级表
|
|
|
+ string sizestr = "";
|
|
|
+ if (m_ReportApp.m_rstDataMgr.m_RptConfigFile.PartSizeFile == "AUTO.psf")
|
|
|
+ {
|
|
|
+ double dn = 99999;
|
|
|
+ string sou1 = m_condition.m_CurrentConditions[OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE].itemDisplayVal.ToString();
|
|
|
+ if (sou1.Contains("+"))
|
|
|
+ {
|
|
|
+ for (int i = 0; i < sou1.Split('+').Length; i++)
|
|
|
+ {
|
|
|
+ ResultFile resultFile = m_ReportApp.m_rstDataMgr.ResultFilesList.Find(s => s.anotherFileName == sou1.Split('+')[i]);
|
|
|
+ if (resultFile != null)
|
|
|
+ {
|
|
|
+ if (dn > resultFile.GetParticleMINECD())
|
|
|
+ {
|
|
|
+ dn = resultFile.GetParticleMINECD();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ResultFile resultFile = m_ReportApp.m_rstDataMgr.CurResultFile;
|
|
|
+ dn = resultFile.GetParticleMINECD();
|
|
|
+ }
|
|
|
+ sizestr = dn.ToString() + ",";
|
|
|
+ for (double p = dn; p < 50; p = p * Math.Sqrt(2))
|
|
|
+ {
|
|
|
+ if (p > dn && p <= 50.5)
|
|
|
+ {
|
|
|
+ double dd = Math.Round(p);
|
|
|
+ sizestr += dd.ToString() + ",";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ sizestr = sizestr.Remove(sizestr.Length - 1, 1);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ string pathe = m_DataMgr.m_RptConfigFile.PartSizeFileFolder + m_DataMgr.m_RptConfigFile.PartSizeFile;
|
|
|
+ DataSet ds = XMLoperate.GetXml(pathe);
|
|
|
+ sizestr = ds.Tables[0].Rows[0]["Sizes"].ToString();
|
|
|
+ }
|
|
|
for (int i = 0; i < sizestr.Split(',').Length - 1; i++)
|
|
|
{
|
|
|
if (sizestr.Split(',')[i].Length > 0)
|