| | |
| | | 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)
|
| | |
| | | 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);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | 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;
|