Ejemplo n.º 1
0
 private void ArrayInt(bool commustate)
 {
     //初始化 版本信息
     VersionNumberText = VersionNumberName;
     //初始化 显著信息(界面左边LED)
     InfoIni();
     //初始化 状态信息
     StatePageInt(commustate);
     //初始化 基本信息
     devRt1.Inition();
     //初始化 设备控制界面
     StartControlPage.LoadShowInfo(commustate);
     //初始化 系统控制界面
     systemControlPage.LoadShowInfo(commustate);
 }
Ejemplo n.º 2
0
        //对外接口函数
        public void SetParaMeter(DeviceBll device, DeviceModel dm)
        {
            //用来标志定时器在运行
            lbFlag.ForeColor = lbFlag.ForeColor == Color.Red ? Color.Blue : Color.Red;

            if (EASolar_Info == null)
            {
                EASolar_Info = device.Device;
            }
            if (device.Device.ComState == DivCommStateEnum.Failed)
            {
                SystemStateInfo.Name  = SysTemStateDescribe.Describe1;
                SystemStateInfo.Value = 1;
            }
            else if (device.Device.ComState == DivCommStateEnum.Success)
            {
                SystemStateInfo.Name  = SysTemStateDescribe.Describe0;
                SystemStateInfo.Value = 0;
            }
            else
            {
                SystemStateInfo.Name  = SysTemStateDescribe.Describe;
                SystemStateInfo.Value = 2;
            }
            if (device.Device.ComState == Model_Data.CommunicateEntity.DivCommStateEnum.Success)
            {
                if (device.AnalogList != null && device.DigitalList != null)
                {
                    SetAnalogData(dm.Analog);
                    SetDigitalData(dm.Digital);
                    StartControlPage.LoadShowInfo(true);
                    systemControlPage.LoadShowInfo(true);
                }
            }
            else
            {
                ArrayInt(false);
            }
            RefreshPagesShow();
        }