| | |
| | | btnDeviceName.TextSize = 16;
|
| | | btnDeviceName.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnDeviceName.SelectedTextColor = UserCenterColor.Current.White;
|
| | | btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
|
| | | btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(i_device);
|
| | | this.AddChidren(btnDeviceName, ChidrenBindMode.BindEvent);
|
| | |
|
| | | //收集控件
|
| | |
| | | btnCollect.IsSelected = collect;
|
| | | }
|
| | | //设备图标也刷新
|
| | | Common.LocalDevice.Current.SetDeviceIconToControl2(btnDeviceIcon, i_device);
|
| | | HdlDeviceCommonLogic.Current.SetDeviceIconToControl2(btnDeviceIcon, i_device);
|
| | | //名字刷新
|
| | | this.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
|
| | | this.btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(i_device);
|
| | | //检测设备是否是打开状态
|
| | | bool isOpen = this.CheckIsOpenStatu(i_device);
|
| | | if (this.isHadOpenSwitch == true && i_device.HadReadDeviceStatu == false)
|
| | |
| | | //等待网关回复后会重新刷新,不然一直是关闭状态
|
| | | isOpen = false;
|
| | | }
|
| | | //如果是传感器类,则默认是关的效果
|
| | | if (this.device.Type == DeviceType.PMSensor || this.device.Type == DeviceType.IASZone
|
| | | || this.device.Type == DeviceType.TemperatureSensor)
|
| | | {
|
| | | isOpen = false;
|
| | | }
|
| | |
|
| | | this.SetCardOpenStatu(isOpen);
|
| | | }
|
| | |
|
| | |
| | | public void SetCardOpenStatu(bool isOpen)
|
| | | {
|
| | | //设备状态必须刷新
|
| | | this.btnStatu.Text = HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device);
|
| | | this.btnStatu.Text = HdlDeviceCommonLogic.Current.GetMainPageDeviceStatuText(this.device);
|
| | | //开关控件
|
| | | if (btnSwitch != null && this.btnSwitch.IsSelected != isOpen)
|
| | | {
|
| | |
| | | //如果这个函数被重写的话,则代表这个设备有开关功能
|
| | | this.isHadOpenSwitch = false;
|
| | | //默认用在线状态来判断
|
| | | return Common.LocalDevice.Current.CheckDeviceIsOnline(i_device);
|
| | | return HdlDeviceCommonLogic.Current.CheckDeviceIsOnline(i_device);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | this.ResponeResult = 1;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 接收网关回复的状态(true:已经接收到网关的回复 false:还没有接收到网关回复)
|
| | | /// </summary>
|
| | | /// <returns></returns>
|
| | | public bool ReceiveResponeResultStatu()
|
| | | {
|
| | | return this.ResponeResult == 1;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 显示低电量_________________________
|
| | |
| | | public void StartCardLightAppeal()
|
| | | {
|
| | | //设备状态必须刷新
|
| | | this.btnStatu.Text = HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device);
|
| | | this.btnStatu.Text = HdlDeviceCommonLogic.Current.GetMainPageDeviceStatuText(this.device);
|
| | |
|
| | | if (this.isAppeal == true) { return; }
|
| | | this.isAppeal = true;
|
| | |
| | | /// <summary>
|
| | | /// 切换卡片状态特效
|
| | | /// </summary>
|
| | | private void SwitchCardStatuAppeal(bool isOpen)
|
| | | public void SwitchCardStatuAppeal(bool isOpen)
|
| | | {
|
| | | if (this.btnBackGroud.IsSelected == isOpen)
|
| | | {
|