using System;
using System.Collections.Generic;
//this module's enum definition are the shadow of the PropParam.h in the OTSMODEL(C++)
//that means there're a same contrast definition in that module.that's because export an enum definition to C# from C++ through clr project is difficult.
namespace OTSIncAReportApp.OTSSampleReportInfo
{
#region 相关枚举定义
///
/// document标签标识
///
///
public enum REPORT_GRID_DATA_TYPE
{
STRING = 0,
PARTICLE = 1,
INT = 2,
FLOAT = 3
}
public enum DisplayPicutureType
{
//分析图
AnalyzeImg = 0,
//分析数据表
AnalyzeDataTable = 1,
//分析数据图
AnalyzeDataChart = 2
}
public enum IMAGE_DISPLAY_TYPE
{
INVALID = -1,
DISTRIBUTION = 0,
IMAGE_GRID = 1,
}
public enum IMAGE_TYPE
{
INVALID = -1,
BSE = 0,
CLASSIFIED = 1,
ORIGINAl=2,
ORIGINALCLASSIFIED=3
}
public enum DATASOURCE_TYPE
{
ALL=0,
SELECTED=1
}
public enum CALCULATE_TABLE_TYPE
{
INVALID = -1,
MEASURE_INFO = 0,
PARTICALE_GENE_INFO = 1,
PARTICALE_COMP = 2,
PARTICALE_SIZE_DISTRIBUTION = 3,
AVE_ELEMENT_COMP = 4,
GB_Method1 = 5,
GB_Method2 =6,
ASTM = 7,
DIN = 8
}
public enum CALCULATE_CHART_TYPE
{
INVALID = -1,
COMMON_FIVE = 0,
PARTICALE_COMP = 1,
PARTICALE_SIZE_DISTRIBUTION = 2,
TRIO_CHART = 3,
INCLUSION_AREA_RATIO = 4
}
///
/// 显示计算方法的类型
///
public enum ComputedColNameEnum
{
//最长直径
MaxDiameter = 0,
//最短直径
MinDiameter = 1,
//面积
Area = 2,
//等效圆直径
EquivalentCircleDiameter = 3,
//费雷特直径
FerretDiameter = 4,
//长短直径比
DiameterRatio = 5
}
///
/// 标记分析物的类型
///
public enum OTS_SOFT_PACKAGE_ID
{
//INVALID = -1,
//MIN = 0,
OTSIncA = 0, //夹杂物分析
OTSPartA = 1, //颗粒度分析
//MAX = 1
};
//国标信息表类型
public enum GBTypeEnum
{
GB1 = 0,
GB2 = 1
}
///
/// 样品属性值的名称
///
public enum OTS_REPORT_PROP_GRID_ITEMS
{
INVALID = -1, //image 0\3\2\7\8\5\10\13
MIN = 0,
///
/// 数据源
///
DATA_SOURCE = 0,
///
/// 数据类型
///
DATA_SOURCE_TYPE = 1,
///
/// 分布图中,测量图类型
///
IMAGE_TYPE = 2,
///
/// 分布图中,测量图显示方式
///
IMAGE_DISPLAY_TYPE = 3,
///
///
///
IMAGEGRID_DIS_TYPE = 4,
///
/// 数据表,类型,查看什么表
///
CALCULATE_TABLE_TYPE = 5,
///
/// 数据图,类型,查看什么图
///
CALCULATE_CHART_TYPE = 6,
///
/// 颗粒类型,分布图中,全部,分析颗粒
///
PARTICLE_TYPE = 7,
///
///
///
STD_ID = 8,
///
/// 粒级表
///
GRAIN_SIZE_CLASS_TABLE = 9,
///
/// 粒级,全部,自定义等
///
GRAIN_SIZE_CLASS = 10,
///
/// 粒级,最小颗粒
///
GRAIN_SIZE_MIN = 11,
///
/// 粒级,最大颗粒
///
GRAIN_SIZE_MAX = 12,
///
/// 尺寸计算法
///
SIZE_CAL_METHOD_TYPE = 13,
///
///
///
SIZE_GRID_CAL_METHOD_TYPE = 14,
///
/// 三元相图模板
///
TRIO_CHART_TYPE = 15,
MAX = 16,
///
/// 颗粒列表
///
PARTICE_LIST=17
};
///
/// 数据源类型
///
public enum DATA_SOURCR_TYPE
{
//分析颗粒
Analytical_particle=0,
//选择颗粒
Select_particles=1,
//无效颗粒
Invalid_particles=2
}
public enum IMAGEGRID_DIS_TYPE
{
CLASSIFY_TYPE = 0,
PARTICALE_SIZE_TYPE = 1
};
///
/// 样品属性值的类型
///
public enum OTS_ITEM_TYPES
{
BOOL = 0,
DOUBLE = 1,
COMBO = 2,
};
///
/// 消息框相关按钮样式
///
public enum MessageBoxRev
{
DIALOG_YES = 0,
DIALOG_NO = 1,
DIALOG_CANCEL = 2
};
public enum SIZE_CAL_METHOD_TYPE
{
DMAX = 0,
DMIN = 1,
DFERET = 2,
CIRCLE = 3
};
public enum GRAIN_SIZE_CLASS
{
ALL = 0,
USERDEFINE = 1,
};
#endregion
#region 相关结构类定义
///
/// 树控件结构类,ReportApp 给 RetMgrWindow 发送添加测量结果文件的信息
///
public class CTreeSampleRst
{
public string sSampleTitleName;
public List List_ShowGrid_Items;
public bool bSwitch;
};
///
/// 测量结果属性数据类
///
public class ConditionItem
{
public OTS_REPORT_PROP_GRID_ITEMS iItemId; //具体标题在哪行
public String sSCaptionName; //样品标题名 //具体名称
public OTS_ITEM_TYPES iItemValType; //样品标题名对应值的类型(bool,int~~~~)
public bool bReadOnly; //值的类型(可读、不可读)
public string sDescriptionInfo; //描述信息
public Object itemDisplayVal; //样品标题名对应值
public object itemVal; //当前属性的对应枚举值
public List comboDownList = new List(); //如果iSampleValType是combobox则在此处存储下拉列表
}
///
/// 测量结构信息类
///
public class ReportCondition
{
#region 变量定义
///
/// 样品属性数据
///
public List ConditionItemList;
///
/// 树控件类,全局变量
///
//public CTreeSampleRst TSampleRst;
///
/// 索引
///
public DisplayPicutureType TabIndex;
#endregion
#region 构造函数
///
/// 构造函数
///
public ReportCondition()
{
ConditionItemList = new List();
//TSampleRst = new CTreeSampleRst();
}
#endregion
///
///
///
public int GetPropIndexByPropItemName( OTS_REPORT_PROP_GRID_ITEMS in_orpgi)
{
for (int i = 0; i < ConditionItemList.Count; i++)
{
if (ConditionItemList[i].iItemId == in_orpgi)
{
return i;
}
}
return -1;
}
public int ProItemProIndex()
{
for (int i = 0; i < ConditionItemList[1].comboDownList.Count; i++)
{
if(ConditionItemList[1].itemDisplayVal.ToString()== ConditionItemList[1].comboDownList[i].ToString())
{
return i;
}
}
return -1;
}
public object GetPropItemDisplayValueByPropItemName(OTS_REPORT_PROP_GRID_ITEMS in_orpgi)
{
for (int i = 0; i < ConditionItemList.Count; i++)
{
if (ConditionItemList[i].iItemId == in_orpgi)
{
return ConditionItemList[i].itemDisplayVal;
}
}
return -1;
}
public object GetPropItemDisplayValueByPropItem(OTS_REPORT_PROP_GRID_ITEMS in_orpgi)
{
for (int i = 0; i < ConditionItemList.Count; i++)
{
if (ConditionItemList[i].iItemId == in_orpgi)
{
return i;
}
}
return -1;
}
public void SetPropByPropItemName(OTS_REPORT_PROP_GRID_ITEMS in_orpgi, string val)
{
int i = GetPropIndexByPropItemName(in_orpgi);
ConditionItemList[i].itemDisplayVal = val;
}
public int GetComboDownListIndexByItemName(OTS_REPORT_PROP_GRID_ITEMS in_orpgi)
{
int i = GetPropIndexByPropItemName(in_orpgi);
return ConditionItemList[i].comboDownList.IndexOf(ConditionItemList[i].itemDisplayVal.ToString());
}
public List GetComboDownListByItemName(OTS_REPORT_PROP_GRID_ITEMS in_orpgi)
{
int i = GetPropIndexByPropItemName(in_orpgi);
return ConditionItemList[i].comboDownList;
}
public List SetComboDownListByItemName(OTS_REPORT_PROP_GRID_ITEMS in_orpgi, List comboDownList)
{
int i = GetPropIndexByPropItemName(in_orpgi);
return ConditionItemList[i].comboDownList = comboDownList;
}
public string GetItemvalByItemName(OTS_REPORT_PROP_GRID_ITEMS in_orpgi)
{
int i = GetPropIndexByPropItemName(in_orpgi);
return ConditionItemList[i].itemDisplayVal.ToString();
}
};
#endregion
}