| | |
| | | try |
| | | { |
| | | ShowFunction vv = ShowFunction.Light; |
| | | if (SPK.ElectricalSpkList().Contains(function.spk)) |
| | | { |
| | | vv = ShowFunction.Electric; |
| | | } |
| | | else if (SPK.FhSpkList().Contains(function.spk)) |
| | | if (SPK.FhSpkList().Contains(function.spk)) |
| | | { |
| | | vv = ShowFunction.FloorHeating; |
| | | } |
| | |
| | | break; |
| | | case ShowFunction.Light: |
| | | btnText = FunctionList.List.GetLightList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count.ToString(); |
| | | break; |
| | | case ShowFunction.Electric: |
| | | btnText = FunctionList.List.GetElectricals().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count.ToString(); |
| | | break; |
| | | case ShowFunction.FreshAir: |
| | | btnText = FunctionList.List.GetAirFreshList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count.ToString(); |
| | |
| | | Control.Ins.SendWriteCommand(f, d); |
| | | } |
| | | |
| | | foreach (var m in Music.A31MusicModel.A31MusicModelList) |
| | | { |
| | | if (m.functionMusic.roomIds.Contains(room.roomId)) |
| | | { |
| | | m.functionMusic.SetAttrState("on_off", "off"); |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | dic.Add("on_off", "off"); |
| | | Music.SendMethod.Current.SendControlCommand(m.functionMusic, dic); |
| | | } |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | |
| | | System.Threading.Thread.Sleep(sleepTime); |
| | | } |
| | | break; |
| | | case ShowFunction.Electric: |
| | | foreach (var f in FunctionList.List.GetElectricals()) |
| | | { |
| | | f.trait_on_off.curValue = onoff; |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(f, d); |
| | | System.Threading.Thread.Sleep(sleepTime); |
| | | } |
| | | break; |
| | | case ShowFunction.FreshAir: |
| | | foreach (var f in FunctionList.List.GetAirFreshList()) |
| | | { |
| | |
| | | lightList.Add(f); |
| | | } |
| | | Control.Ins.SwtichFunctions(onoff == "on", lightList); |
| | | break; |
| | | case ShowFunction.Electric: |
| | | List<Function> eleList = new List<Function>(); |
| | | foreach (var f in FunctionList.List.GetElectricals()) |
| | | { |
| | | eleList.Add(f); |
| | | } |
| | | Control.Ins.SwtichFunctions(onoff == "on", eleList); |
| | | break; |
| | | } |
| | | |