| | |
| | | } |
| | | set |
| | | { |
| | | //if (_GatewayOnline_Local != value) |
| | | if (_GatewayOnline_Local != value) |
| | | { |
| | | _GatewayOnline_Local = value; |
| | | if (value) |
| | |
| | | } |
| | | set |
| | | { |
| | | //if (_GatewayOnline_Cloud != value) |
| | | if (_GatewayOnline_Cloud != value) |
| | | { |
| | | _GatewayOnline_Cloud = value; |
| | | if(GatewayOnline_Local) |
| | |
| | | } |
| | | if (DB_ResidenceData.Instance.GatewayType == 0) |
| | | { |
| | | new Control_Udp().ControlBytesSend(Command.ReadGateway, 255, 255, new byte[] { (byte)new Random().Next(255), (byte)new Random().Next(255) }); |
| | | new Control_Udp().ControlBytesSend(Command.ReadGateway, 255, 255, |
| | | new byte[] { (byte)new Random().Next(255), (byte)new Random().Next(255) }); |
| | | } |
| | | else if (DB_ResidenceData.Instance.GatewayType == 1) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid); |
| | | if (localFunction == null) |
| | | { |
| | |
| | | localFunction.lastState = localFunction.trait_on_off.curValue.ToString() == "on" ? Language.StringByID(StringId.Open) : Language.StringByID(StringId.Close); |
| | | CurtainModulePage.UpdataState(localFunction); |
| | | break; |
| | | case SPK.CurtainDream: |
| | | if(localFunction.GetAttrState(FunctionAttributeKey.Percent) == "0") |
| | | { |
| | | localFunction.SetAttrState(FunctionAttributeKey.OnOff, "off"); |
| | | } |
| | | localFunction.lastState = localFunction.trait_on_off.curValue.ToString() == "on" ? Language.StringByID(StringId.Open) : Language.StringByID(StringId.Close); |
| | | CurtainDreamPage.UpdataState(localFunction); |
| | | break; |
| | | case SPK.CurtainTrietex: |
| | | localFunction.lastState = Language.StringByID(StringId.Open) + localFunction.GetAttrState(FunctionAttributeKey.Percent) + "%"; |
| | | MotorCurtainPage.UpdataState(localFunction); |