| | |
| | | else
|
| | | {
|
| | | //如果住宅为虚拟住宅,直接改缓存
|
| | | ((DimmableLight)this.device).Level = value;
|
| | | ((DimmableLight)this.device).Level = value * MaxLevel / 100;
|
| | | //亮度 XX
|
| | | this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uBrightness) + " " + HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device));
|
| | | }
|
| | | };
|
| | |
|
| | |
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //没有接收到网关回复
|
| | | if (result == false)
|
| | | //接收到网关回复
|
| | | if (result == true)
|
| | | {
|
| | | bool statu = ((LightBase)this.device).OnOffStatus == 1;
|
| | | //刷新开关状态
|
| | |
| | | listControl[0].IsSelected = !listControl[0].IsSelected;
|
| | | if (isOpen == true)
|
| | | {
|
| | | waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarColor_Start, ZigbeeColor.Current.GXCWaveSeekBarColor_End);
|
| | | //打开
|
| | | this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1));
|
| | | this.device.SwitchControl(1);
|
| | | }
|
| | | else
|
| | | {
|
| | | waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
|
| | | //关闭
|
| | | this.SetStatuText(Language.StringByID(R.MyInternationalizationString.Close));
|
| | | this.device.SwitchControl(0);
|
| | | }
|
| | | }
|
| | |
| | | /// <returns></returns>
|
| | | public override bool CheckResponeResultStatu(ReceiveComandDiv comandDiv, CommonDevice report)
|
| | | {
|
| | | if (comandDiv == ReceiveComandDiv.A节点控制反馈)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | else if (comandDiv == ReceiveComandDiv.A设备属性上报)
|
| | | if (comandDiv == ReceiveComandDiv.A设备属性上报)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //刷新开关状态
|
| | | this.RefreshSwitchStatu(((LightBase)this.device).OnOffStatus == 1);
|
| | | });
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|