123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using OTSModelSharp.ResourceManage;
- using System;
- using System.Collections.Generic;
- namespace OTSMeasureApp
- {
- public class CPropItem
- {
- private OTS_SAMPLE_PROP_GRID_ITEMS iSampleId; //样品属性ID
- private String sSCaptionName; //样品标题名
- private OTS_ITEM_TYPES iSampleValType; //样品标题名对应值的类型
- private Object sampleVal=""; //样品标题名对应值,全部是string
- public List<String> comboDownList = new List<string>();//如果iSampleValType是combobox则在此处存储下拉列表
- public bool bReadOnly; //值的类型
- private string sDescriptionInfo; //描述信息
- private string sTag;
- public OTS_SAMPLE_PROP_GRID_ITEMS SampleId { get => iSampleId; set => iSampleId = value; }
- public string CaptionName { get => sSCaptionName; set => sSCaptionName = value; }
- public OTS_ITEM_TYPES SampleValType { get => iSampleValType; set => iSampleValType = value; }
- public object GetSampleVal()
- {
- return sampleVal;
- }
- public void SetSampleVal(object value)
- {
- sampleVal = value;
- }
- public string Description { get => sDescriptionInfo; set => sDescriptionInfo = value; }
- public string Tag { get => sTag; set => sTag = value; }
- public void InitialSmplParameter(OTS_SAMPLE_PROP_GRID_ITEM_GROUPS GROUPS, OTS_SAMPLE_PROP_GRID_ITEMS a_nSmplId, OTS_ITEM_TYPES a_nType, bool a_bReadOnly, bool a_bShow)
- {
-
- var strRes = ResourceData.GetStringResourceByKey(GROUPS, a_nSmplId);
- if (a_nType == OTS_ITEM_TYPES.COMBO)
- {
- comboDownList = strRes.combolist;
- }
- if (a_nType == OTS_ITEM_TYPES.BUTTON)
- {
- sTag = a_nSmplId.ToString();
- }
- sSCaptionName = strRes.text;
- sDescriptionInfo = strRes.Description;
- iSampleId = a_nSmplId;
- iSampleValType = a_nType;
- bReadOnly = a_bReadOnly;
- }
- }
- }
|