|
@@ -199,45 +199,44 @@ namespace OTSIncAReportApp.OTSDataMgrFunction
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 界面显示Grid
|
|
/// 界面显示Grid
|
|
/// </summary>
|
|
/// </summary>
|
|
- private SampleData NewGridData(int tbindex, OTS_REPORT_PROP_GRID_ITEMS iItemId, string sSCaptionName, OTS_ITEM_TYPES iItemValType, bool bReadOnly, string sDescriptionInfo, object itemVal, List<string> comboDownList)
|
|
|
|
|
|
+ private SampleData NewGridData(int tbindex, OTS_REPORT_PROP_GRID_ITEMS iItemId, int number, OTS_ITEM_TYPES iItemValType, bool bReadOnly, object itemVal, List<string> comboDownList)
|
|
{
|
|
{
|
|
string text = "";
|
|
string text = "";
|
|
string des = "" ;
|
|
string des = "" ;
|
|
string downlist = "";
|
|
string downlist = "";
|
|
- //OTSDataType.XmlResourceData.GetInstance().GetStringByKey(tbindex, 20000,ref text, ref des, ref downlist);
|
|
|
|
|
|
+ OTSDataType.XmlResourceData.GetInstance().GetStringByKey(tbindex, number, ref text, ref des, ref downlist);
|
|
SampleData sampleData = new SampleData();
|
|
SampleData sampleData = new SampleData();
|
|
sampleData.iItemId = iItemId;
|
|
sampleData.iItemId = iItemId;
|
|
- sampleData.sSCaptionName = sSCaptionName;
|
|
|
|
|
|
+ sampleData.sSCaptionName = text;
|
|
sampleData.iItemValType = iItemValType;
|
|
sampleData.iItemValType = iItemValType;
|
|
sampleData.bReadOnly = bReadOnly;
|
|
sampleData.bReadOnly = bReadOnly;
|
|
sampleData.sDescriptionInfo = des;
|
|
sampleData.sDescriptionInfo = des;
|
|
|
|
|
|
- //if (comboDownList.Count==0)
|
|
|
|
- //{
|
|
|
|
- // List<string> liststr = new List<string>();
|
|
|
|
- // if (downlist!="")
|
|
|
|
- // {
|
|
|
|
- // string[] arrTemp = downlist.Split(',');
|
|
|
|
- // for (int i = 0; i < arrTemp.Count(); i++)
|
|
|
|
- // {
|
|
|
|
- // liststr.Add(arrTemp[i]);
|
|
|
|
- // }
|
|
|
|
- // sampleData.itemVal = liststr[0];
|
|
|
|
- // sampleData.comboDownList = liststr;
|
|
|
|
- // }
|
|
|
|
- // else
|
|
|
|
- // {
|
|
|
|
- // sampleData.itemVal = "0";
|
|
|
|
- // sampleData.comboDownList = liststr;
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- //}
|
|
|
|
- //else
|
|
|
|
- //{
|
|
|
|
|
|
+ if (comboDownList.Count == 0)
|
|
|
|
+ {
|
|
|
|
+ List<string> liststr = new List<string>();
|
|
|
|
+ if (downlist != "")
|
|
|
|
+ {
|
|
|
|
+ string[] arrTemp = downlist.Split(',');
|
|
|
|
+ for (int i = 0; i < arrTemp.Count(); i++)
|
|
|
|
+ {
|
|
|
|
+ liststr.Add(arrTemp[i]);
|
|
|
|
+ }
|
|
|
|
+ sampleData.itemVal = liststr[0];
|
|
|
|
+ sampleData.comboDownList = liststr;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ sampleData.itemVal = "0";
|
|
|
|
+ sampleData.comboDownList = liststr;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
sampleData.itemVal = itemVal;
|
|
sampleData.itemVal = itemVal;
|
|
sampleData.comboDownList = comboDownList;
|
|
sampleData.comboDownList = comboDownList;
|
|
- //}
|
|
|
|
-
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
return sampleData;
|
|
return sampleData;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -254,123 +253,63 @@ namespace OTSIncAReportApp.OTSDataMgrFunction
|
|
{
|
|
{
|
|
//测量结果数据
|
|
//测量结果数据
|
|
List<string> list_source_str = GetSampleListName();
|
|
List<string> list_source_str = GetSampleListName();
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex, 0, table["sscaptionname1"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Select Measurement Result", list_source_str[m_ReportApp.WorkingResult], list_source_str));
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex, 0, 40000, OTS_ITEM_TYPES.COMBO, false, list_source_str[m_ReportApp.WorkingResult], list_source_str));
|
|
//bse,颗粒分类图
|
|
//bse,颗粒分类图
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.IMAGE_TYPE, table["sscaptionname2"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Survey Chart Type", "BSE", new List<string>() { "BSE", table["sscaptionname13"].ToString(), "Original", "原图颗粒分布" }));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.IMAGE_TYPE, 40001, OTS_ITEM_TYPES.COMBO, false, "", new List<string>() { }));
|
|
//测量图类型
|
|
//测量图类型
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.IMAGE_DISPLAY_TYPE, table["sscaptionname3"].ToString(), OTS_ITEM_TYPES.COMBO, false, "chart display mode", table["sscaptionname14"].ToString(), new List<string>() { table["sscaptionname14"].ToString(), table["sscaptionname15"].ToString() }));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.IMAGE_DISPLAY_TYPE, 40002, OTS_ITEM_TYPES.COMBO, false, "", new List<string>() { }));
|
|
//测量图显示方式
|
|
//测量图显示方式
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.PARTICLE_TYPE, table["sscaptionname4"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Particle Type", table["sscaptionname16"].ToString(), new List<string>() { table["sscaptionname16"].ToString(), table["sscaptionname17"].ToString() }));
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.PARTICLE_TYPE, 40003, OTS_ITEM_TYPES.COMBO, false, "", new List<string>() { }));
|
|
//粒级表
|
|
//粒级表
|
|
-
|
|
|
|
List<string> list_partsizelist = GetPartSizeFileList();//从系统默认的路径中查找出所有的粒级表文件
|
|
List<string> list_partsizelist = GetPartSizeFileList();//从系统默认的路径中查找出所有的粒级表文件
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE, "粒级表", OTS_ITEM_TYPES.COMBO, false, "Particle Table", list_partsizelist[0], list_partsizelist));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE, 40004, OTS_ITEM_TYPES.COMBO, false, list_partsizelist[0], list_partsizelist));
|
|
//粒级
|
|
//粒级
|
|
-
|
|
|
|
List<string> sizeList = GetPartSizeList();//获取粒级后额外增加全部,自定义,选项
|
|
List<string> sizeList = GetPartSizeList();//获取粒级后额外增加全部,自定义,选项
|
|
- sizeList.Insert(0, table["sscaptionname16"].ToString());//全部
|
|
|
|
- sizeList.Insert(1, table["sscaptionname18"].ToString());//自定义
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS, table["sscaptionname5"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Grain Size", table["sscaptionname16"].ToString(), sizeList));
|
|
|
|
-
|
|
|
|
|
|
+ sizeList.Insert(0, OTSDataType.XmlResourceData.GetInstance().GetStringByKey(tbindex, 40010));//全部
|
|
|
|
+ sizeList.Insert(1, OTSDataType.XmlResourceData.GetInstance().GetStringByKey(tbindex, 40011));//自定义
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS, 40005, OTS_ITEM_TYPES.COMBO, false, sizeList[0], sizeList));
|
|
//自定义最小
|
|
//自定义最小
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_MIN, table["sscaptionname6"].ToString(), OTS_ITEM_TYPES.DOUBLE, false, "Smallest Particle", "0",new List<string> { }));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_MIN, 40006, OTS_ITEM_TYPES.DOUBLE, false, "0",new List<string> { }));
|
|
//自定义最大
|
|
//自定义最大
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_MAX, table["sscaptionname7"].ToString(), OTS_ITEM_TYPES.DOUBLE, false, "Maximum Particle","0",new List<string> { }));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_MAX, 40007, OTS_ITEM_TYPES.DOUBLE, false, "0",new List<string> { }));
|
|
//测量数据
|
|
//测量数据
|
|
-
|
|
|
|
- List<string> list3 = new List<string>() { table["sscaptionname19"].ToString(), table["sscaptionname20"].ToString(), table["sscaptionname21"].ToString() };
|
|
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.MEASURE_DATA_TYPE, table["sscaptionname22"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Measured Data", list3[0], list3));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.MEASURE_DATA_TYPE, 40008, OTS_ITEM_TYPES.COMBO, false, "", new List<string> { }));
|
|
//计算方式
|
|
//计算方式
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE, table["sscaptionname8"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Dimension calculation method", "DMAX", GetSizeCalMethodTypeList()));
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE, 40009, OTS_ITEM_TYPES.COMBO, false, GetSizeCalMethodTypeList()[0], GetSizeCalMethodTypeList()));
|
|
}
|
|
}
|
|
else if (tbindex == 1)//Grid表格页
|
|
else if (tbindex == 1)//Grid表格页
|
|
{
|
|
{
|
|
//测量结果数据
|
|
//测量结果数据
|
|
List<string> list_source_str = GetSampleListName();
|
|
List<string> list_source_str = GetSampleListName();
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,0, table["sscaptionname1"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Select Measurement Result", list_source_str[m_ReportApp.WorkingResult], list_source_str));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,0, 40000, OTS_ITEM_TYPES.COMBO, false, list_source_str[m_ReportApp.WorkingResult], list_source_str));
|
|
//数据类型
|
|
//数据类型
|
|
List<string> list_datasourcetypelist = GetDataSourceTypeList();
|
|
List<string> list_datasourcetypelist = GetDataSourceTypeList();
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE, table["sscaptionname9"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Data Type", list_datasourcetypelist[0], list_datasourcetypelist));
|
|
|
|
-
|
|
|
|
- //数据表类型
|
|
|
|
- //string sSCaptionName10 = table["sscaptionname10"].ToString();
|
|
|
|
- List<string> list2 = new List<string>() { table["sscaptionname25"].ToString(), table["sscaptionname26"].ToString(), table["sscaptionname27"].ToString(), table["sscaptionname28"].ToString(), table["sscaptionname29"].ToString(), table["sscaptionname30"].ToString()};
|
|
|
|
- string[] aa = m_ReportApp.Text.Split('-');
|
|
|
|
- List<string> listStd = new List<string>() { "国标一", "国标二", "美标", "德标" };
|
|
|
|
- list2.AddRange(listStd);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.CALCULATE_TABLE_TYPE, table["sscaptionname10"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Data table type", list2[0], list2));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE, 40001, OTS_ITEM_TYPES.COMBO, false, list_datasourcetypelist[0], list_datasourcetypelist));
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.CALCULATE_TABLE_TYPE, 40002, OTS_ITEM_TYPES.COMBO, false, "", new List<string> { }));
|
|
//粒级表
|
|
//粒级表
|
|
-
|
|
|
|
List<string> list_partsizelist = GetPartSizeFileList();//从系统默认的路径中查找出所有的粒级表文件
|
|
List<string> list_partsizelist = GetPartSizeFileList();//从系统默认的路径中查找出所有的粒级表文件
|
|
-
|
|
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE, "粒级表", OTS_ITEM_TYPES.COMBO, false, "Particle Table", list_partsizelist[0], list_partsizelist));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE, 40003, OTS_ITEM_TYPES.COMBO, false, list_partsizelist[0], list_partsizelist));
|
|
//尺寸计算方法
|
|
//尺寸计算方法
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE, table["sscaptionname8"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Dimension Calculation Method", "DMAX", GetSizeCalMethodTypeList()));
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE, 40004, OTS_ITEM_TYPES.COMBO, false, GetSizeCalMethodTypeList()[0], GetSizeCalMethodTypeList()));
|
|
}
|
|
}
|
|
else if (tbindex == 2)//Chart图页
|
|
else if (tbindex == 2)//Chart图页
|
|
{
|
|
{
|
|
//测量结果数据
|
|
//测量结果数据
|
|
List<string> list_source_str = GetSampleListName();
|
|
List<string> list_source_str = GetSampleListName();
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,0, table["sscaptionname1"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Select Measurement Result", list_source_str[m_ReportApp.WorkingResult], list_source_str));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,0, 40000, OTS_ITEM_TYPES.COMBO, false, list_source_str[m_ReportApp.WorkingResult], list_source_str));
|
|
//数据类型
|
|
//数据类型
|
|
List<string> list_datasourcetypelist = GetDataSourceTypeList();
|
|
List<string> list_datasourcetypelist = GetDataSourceTypeList();
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE, table["sscaptionname9"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Data Type", list_datasourcetypelist[0], list_datasourcetypelist));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE, 40001, OTS_ITEM_TYPES.COMBO, false, list_datasourcetypelist[0], list_datasourcetypelist));
|
|
//数据图类型
|
|
//数据图类型
|
|
-
|
|
|
|
- List<string> list2 = new List<string>() { "常用夹杂物分类", table["sscaptionname27"].ToString(), table["sscaptionname28"].ToString(), table["sscaptionname29"].ToString(), table["sscaptionname12"].ToString() };
|
|
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.CALCULATE_CHART_TYPE, table["sscaptionname10"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Data graph type", list2[0], list2));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.CALCULATE_CHART_TYPE, 40002, OTS_ITEM_TYPES.COMBO, false, "", new List<string> { }));
|
|
//三元相图模板
|
|
//三元相图模板
|
|
-
|
|
|
|
List<string> trio_listname = GetTriTemplateNameList();
|
|
List<string> trio_listname = GetTriTemplateNameList();
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.TRIO_CHART_TYPE, table["sscaptionname12"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Ternary phase diagram", trio_listname.First(), trio_listname));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.TRIO_CHART_TYPE, 40003, OTS_ITEM_TYPES.COMBO, false, trio_listname.First(), trio_listname));
|
|
//粒级表
|
|
//粒级表
|
|
-
|
|
|
|
List<string> list_partsizelist = GetPartSizeFileList();
|
|
List<string> list_partsizelist = GetPartSizeFileList();
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE, "粒级表", OTS_ITEM_TYPES.COMBO, false, "Particle Table", list_partsizelist[0], list_partsizelist));
|
|
|
|
-
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE,40004, OTS_ITEM_TYPES.COMBO, false, list_partsizelist[0], list_partsizelist));
|
|
//尺寸计算法
|
|
//尺寸计算法
|
|
-
|
|
|
|
- list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE, table["sscaptionname8"].ToString(), OTS_ITEM_TYPES.COMBO, false, "Dimension Calculation Method", "DMAX", GetSizeCalMethodTypeList()));
|
|
|
|
|
|
+ list.Add(NewGridData(tbindex,OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE, 40005, OTS_ITEM_TYPES.COMBO, false, GetSizeCalMethodTypeList().First(), GetSizeCalMethodTypeList()));
|
|
}
|
|
}
|
|
|
|
|
|
return list;
|
|
return list;
|