Пример #1
0
        /// <summary>
        /// 获取点位对应的显示项目,如果IsShow为false则返回null
        /// </summary>
        /// <returns></returns>
        public DeviceFieldForUI getDeviceFieldForUI()
        {
            DeviceFieldForUI fieldForUI = new DeviceFieldForUI();

            if (bytesLength < 1) //如果是要计算的点位对象
            {
                if (IsShow)      //如果要显示,则该点位对象为其类型所对应的key,该计算点位将包含在SdcsoftDevice对应的List集合中
                {
                    setDeviceFieldForUIKey(fieldForUI);
                }
                else //如果无需显示,则该点位对象的key设置为SdcSoftDevice.KEY_Count_Fields,该点位将包含在该key对应的SdcsoftDevice的List集合中
                {
                    fieldForUI.setKey(SdcSoftDevice.KEY_Count_Fields);
                }
            }
            else
            {
                setDeviceFieldForUIKey(fieldForUI);
            }
            fieldForUI.setName(getName());
            fieldForUI.setTitle(getTitle());
            fieldForUI.setValue(getValue());
            fieldForUI.setValueString(getValueString());
            return(fieldForUI);
        }
Пример #2
0
 public override void setDeviceFieldForUIKey(DeviceFieldForUI fieldForUI)
 {
     fieldForUI.setKey(SdcSoftDevice.KEY_BASE);
 }