Esempio n. 1
0
 public override UI GetObject(UI_Info info)
 {
     return(controller.CreateUI(info));
 }
Esempio n. 2
0
 public virtual void execute(UI_Info info)
 {
     throw new UnityException("Not defined");
 }
Esempio n. 3
0
 public UI CreateUI(CommandType type, UI_Info info)
 {
     return(m_client.GetObject(type, info));
 }
Esempio n. 4
0
        public override void SetParaMeter(List <UI_Analog> AnalogSignalValueList, List <UI_Digital> DigitalSignalValueList, UI_Info Info)
        {
            basic.PortId     = Info.PortId;
            basic.DeviceId   = Info.DeviceId;
            basic.PortName   = Info.PortName;
            basic.DeviceName = Info.DeviceName;
            CommStateInfo UPSCommState;
            bool          ComminicationState = false;

            if (UPS_Three_Info == null)
            {
                UPS_Three_Info = Info;
            }
            if (Info.CommuState == DivCommStateEnum.Success)
            {
                ComminicationState = true;
                UPSCommState       = CommStateInfo.Normal;
                if (AnalogSignalValueList != null && DigitalSignalValueList != null)
                {
                    UI_Analog[]  AnalogArray  = AnalogSignalValueList.ToArray();
                    UI_Digital[] DigitalArray = DigitalSignalValueList.ToArray();
                    //三相UPS状态信息框更新
                    StatePageInt(UPSCommState);
                    AnalogArray  = AnalogSignalValueList.ToArray();
                    DigitalArray = DigitalSignalValueList.ToArray();
                    //设置数字量同时返回UPS与SNMP卡通讯状态
                    UPSCommState = SetDigitalData(DigitalArray);
                    if (UPSCommState == CommStateInfo.Normal)
                    {
                        //设置模拟量
                        SetAnalogData(AnalogArray);
                    }
                    else if (UPSCommState == CommStateInfo.FailToUPS)
                    {
                        ArrayInt(UPSCommState);
                    }
                }
            }
            else if (Info.CommuState == DivCommStateEnum.Failed)
            {
                ComminicationState = false;
                UPSCommState       = CommStateInfo.FailToSnmp;
                ArrayInt(UPSCommState);
            }
            //UPS直接控制页面各控件使能与否
            upsControlPage1.LoadShowInfo(ComminicationState);
            //更新控制页面除外的其他页面
            RefreshPagesShow();
        }
Esempio n. 5
0
 public UI GetObject(CommandType type, UI_Info info)
 {
     return(commands[(int)type].GetObject(info));
 }
Esempio n. 6
0
    public void execute(CommandType type, UI_Info info)
    {
        int commandType = (int)type;

        commands [commandType].execute(info);
    }
Esempio n. 7
0
 public UI  CreateUI(UI_Info info)
 {
     return(m_client.GetObject(CommandType.UI_Create, info));
 }