| | |
| | | ac.currentSystemMode = attList.AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | case 4099: |
| | | var value = Convert.ToString(attList.AttriButeData, 2).PadLeft(16, '0'); |
| | | var modeStr = value.Substring(value.Length - 5, 5); |
| | | for (int k = 0; k < modeStr.Length; k++) |
| | | { |
| | | ac.listSupportMode[k] = Convert.ToInt32(modeStr[k]) == 49 ? 1 : 0; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | (rowFL.GetChildren(j) as FunctionMainView).IsSelected = ac.currentSystemMode != 0; |
| | |
| | | var dList = new List<DeviceUI> { }; |
| | | foreach(var device in deviceList) |
| | | { |
| | | var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device.CommonDevice }); |
| | | var info = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device.CommonDevice); |
| | | if (info.BeloneType == DeviceBeloneType.A干接点 || info.BeloneType == DeviceBeloneType.A中继器) |
| | | { |
| | | continue; |
| | |
| | | functionView.Init(); |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetStatuText(device.GetDeviceStatu()); |
| | | functionView.SetDeviceName(rollerShade.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(rollerShade)); |
| | | functionView.IsSelected = rollerShade.WcdCurrentPositionLiftPercentage == 100; |
| | | functionView.SetCollect(true); |
| | | |
| | |
| | | UserView.HomePage.Instance.AddChidren(rollerShadeControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | rollerShadeControl.IsDrawerLockMode = true; |
| | | rollerShadeControl.Show(device, Room.CurrentRoom); |
| | | rollerShadeControl.action += (curDev, curRoom) => |
| | | { |
| | |
| | | functionView.Tag = device; |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetStatuText(device.GetDeviceStatu()); |
| | | functionView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | functionView.IsSelected = light.OnOffStatus == 1; |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName)); |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | |
| | | var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName); |
| | | if (dev == null) |
| | | if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false) |
| | | { |
| | | functionView.CollectButton.IsSelected = false; |
| | | } |
| | |
| | | functionView.CardBG.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | CommonPage.Instance.IsDrawerLockMode = true; |
| | | if (device.CommonDevice.DfunctionType == DeviceFunctionType.A开关) |
| | | |
| | | var lightControl = new Phone.Device.Light.OnOffControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.IsDrawerLockMode = true; |
| | | lightControl.Show(device, Room.CurrentRoom); |
| | | lightControl.action += (curDev, curRoom) => |
| | | { |
| | | var lightControl = new Phone.Device.Light.OnOffControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.Show(device, Room.CurrentRoom); |
| | | lightControl.action += (curDev, curRoom) => |
| | | { |
| | | ReFreshEditDeviceAction(device, curRoom, functionView); |
| | | }; |
| | | } |
| | | else if (device.CommonDevice.DfunctionType == DeviceFunctionType.A插座) |
| | | { |
| | | var lightControl = new Phone.Device.Light.PlugControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.Show(device, Room.CurrentRoom); |
| | | lightControl.action += (curDev, curRoom) => |
| | | { |
| | | ReFreshEditDeviceAction(device, curRoom, functionView); |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | var lightControl = new Phone.Device.Light.LightControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.Show(device, Room.CurrentRoom); |
| | | lightControl.action += (curDev, curRoom) => |
| | | { |
| | | ReFreshEditDeviceAction(device, curRoom, functionView); |
| | | }; |
| | | } |
| | | ReFreshEditDeviceAction(device, curRoom, functionView); |
| | | }; |
| | | }; |
| | | |
| | | functionView.CollectButton.MouseUpEventHandler += collectionEvent; |
| | |
| | | functionView.Tag = device; |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetStatuText(device.GetDeviceStatu()); |
| | | functionView.SetDeviceName(airSwitch.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(airSwitch)); |
| | | functionView.IsSelected = airSwitch.OnOffStatus == 1; |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName)); |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom( device.FileName)); |
| | | |
| | | functionView.SwitchButton.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | var lightControl = new Phone.Device.Light.AirSwitchControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.IsDrawerLockMode = true; |
| | | lightControl.Show(device, Room.CurrentRoom); |
| | | lightControl.action += (curDev, curRoom) => |
| | | { |
| | |
| | | functionView.Tag = device; |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetStatuText(device.GetDeviceStatu()); |
| | | functionView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | functionView.IsSelected = ac.currentSystemMode != 0; |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName)); |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | |
| | | functionView.SwitchButton.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | var lightControl = new Phone.Device.AC.ACControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.IsDrawerLockMode = true; |
| | | lightControl.Show(device, Room.CurrentRoom); |
| | | lightControl.action += (curDev, curRoom) => |
| | | { |
| | |
| | | functionView.Tag = device; |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetStatuText(device.GetDeviceStatu()); |
| | | functionView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | functionView.IsSelected = dimmableLight.OnOffStatus == 1; |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName)); |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | |
| | | var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName); |
| | | if (dev == null) |
| | | if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false) |
| | | { |
| | | functionView.CollectButton.IsSelected = false; |
| | | } |
| | |
| | | var dimmableLightControl = new Phone.Device.Light.DimmableLightControl(); |
| | | UserView.HomePage.Instance.AddChidren(dimmableLightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | dimmableLightControl.IsDrawerLockMode = true; |
| | | dimmableLightControl.Show(device, Room.CurrentRoom); |
| | | dimmableLightControl.action += (curDev, curRoom) => |
| | | { |
| | |
| | | lightView.Tag = device; |
| | | lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | lightView.SetStatuText(device.GetDeviceStatu()); |
| | | lightView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | lightView.IsSelected = ias.iASInfo?.Alarm1 == 1; |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName)); |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | lightView.CanControl(false); |
| | | var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName); |
| | | if (dev == null) |
| | | if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false) |
| | | { |
| | | lightView.CollectButton.IsSelected = false; |
| | | } |
| | |
| | | lightView.Tag = device; |
| | | lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | lightView.SetStatuText(device.GetDeviceStatu()); |
| | | lightView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | lightView.IsSelected = false; |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName)); |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | lightView.CanControl(false); |
| | | var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName); |
| | | if (dev == null) |
| | | if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false) |
| | | { |
| | | lightView.CollectButton.IsSelected = false; |
| | | } |
| | |
| | | lightView.Tag = device; |
| | | lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | lightView.SetStatuText(device.GetDeviceStatu()); |
| | | lightView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | lightView.IsSelected = dimmableLight.IsOnline == 1; |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName)); |
| | | lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | lightView.IsSelected = false; |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | lightView.CanControl(false); |
| | | var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName); |
| | | if (dev == null) |
| | | if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false) |
| | | { |
| | | lightView.CollectButton.IsSelected = false; |
| | | } |
| | |
| | | lightView.Tag = device; |
| | | lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | lightView.SetStatuText(device.GetDeviceStatu()); |
| | | lightView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | lightView.CanControl(false); |
| | | //lightView.IsSelected = device.CommonDevice.IsOnline == 1; |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName)); |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | |
| | | var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName); |
| | | if (dev == null) |
| | | if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false) |
| | | { |
| | | lightView.CollectButton.IsSelected = false; |
| | | } |
| | |
| | | /// <param name="functionView"></param> |
| | | private void ReFreshEditDeviceAction(DeviceUI device, Common.Room curRoom, FunctionMainView functionView) |
| | | { |
| | | if (curRoom.Id != Common.Room.CurrentRoom.Id) |
| | | if (Common.Room.CurrentRoom.IsLove) |
| | | { |
| | | if (Common.Room.CurrentRoom.IsLove) |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | if (Room.CurrentRoom.IsCollectInRoom(device.FileName) == false) |
| | | { |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | } |
| | | else |
| | | { |
| | | Common.Room.CurrentRoom.DeleteDevice(device.FileName); |
| | | ShowFunction(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | if (curRoom.Id != Common.Room.CurrentRoom.Id) |
| | | { |
| | | |
| | | Common.Room.CurrentRoom.DeleteDevice(device.FileName); |
| | | ShowFunction(); |
| | | } |
| | | else |
| | | { |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | var sceneView = new SceneMainView(xx, yy); |
| | | itemView.AddChidren(sceneView); |
| | | sceneView.Init(scene); |
| | | itemView.AddChidren(sceneView); |
| | | sceneView.CollectionAction += ShowScene; |
| | | } |
| | | GetDelayScene(sceneScrolView); |
| | | } |