| | |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetOnLineStatu(light.IsOnline == 1); |
| | | //deviceRow.SetOnLineStatu(light.IsOnline == 1); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.SetStatu(light.OnOffStatus == 1); |
| | | deviceRow.IsSelected = light.OnOffStatus == 1; |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | | |
| | | deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) => |
| | |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetOnLineStatu(airSwitch.IsOnline == 1); |
| | | deviceRow.SetStatu(airSwitch.OnOffStatus == 1); |
| | | //deviceRow.SetOnLineStatu(airSwitch.IsOnline == 1); |
| | | deviceRow.IsSelected = airSwitch.OnOffStatus == 1; |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | | |
| | |
| | | sendedControlCommand = false; |
| | | zbGateway.ReportAction += UpdateDeviceControllStatu; |
| | | AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice); |
| | | |
| | | (send2 as Button).IsSelected = !(send2 as Button).IsSelected; |
| | | deviceRow.IsSelected = (send2 as Button).IsSelected; |
| | | if ((send2 as Button).IsSelected) |
| | | { |
| | | airSwitch.SwitchControl(1); |
| | |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetOnLineStatu(dimmableLight.IsOnline == 1); |
| | | //deviceRow.SetOnLineStatu(dimmableLight.IsOnline == 1); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.SetStatu(dimmableLight.OnOffStatus == 1); |
| | | deviceRow.IsSelected = dimmableLight.OnOffStatus == 1; |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | | |
| | | deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) => |
| | |
| | | sendedControlCommand = false; |
| | | zbGateway.ReportAction += UpdateDeviceControllStatu; |
| | | AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice); |
| | | |
| | | (send2 as Button).IsSelected = !(send2 as Button).IsSelected; |
| | | deviceRow.IsSelected = (send2 as Button).IsSelected; |
| | | if ((send2 as Button).IsSelected) |
| | | { |
| | | dimmableLight.SwitchControl(1); |
| | |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetOnLineStatu(ac.IsOnline == 1); |
| | | //deviceRow.SetOnLineStatu(ac.IsOnline == 1); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.SetStatu(ac.currentSystemMode != 1); |
| | | deviceRow.IsSelected = ac.currentSystemMode != 1; |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | | |
| | | deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) => |
| | |
| | | AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice); |
| | | |
| | | (send2 as Button).IsSelected = !(send2 as Button).IsSelected; |
| | | deviceRow.IsSelected = (send2 as Button).IsSelected; |
| | | if ((send2 as Button).IsSelected) |
| | | { |
| | | ac.Open(); |
| | |
| | | var deviceRow = new CategoryFunctionForWinRow(0, 35); |
| | | deviceRow.Init(deviceUI); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetOnLineStatu(rollerShade.IsOnline == 1); |
| | | //deviceRow.SetOnLineStatu(rollerShade.IsOnline == 1); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.IsSelected = rollerShade.WcdCurrentPositionLiftPercentage != 0; |
| | | deviceRow.SetRollerShadeIcon(rollerShade.WcdType); |
| | |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetOnLineStatu(deviceUI.CommonDevice.IsOnline == 1); |
| | | //deviceRow.SetOnLineStatu(deviceUI.CommonDevice.IsOnline == 1); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.HideSwitchBtn(true); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetOnLineStatu(deviceUI.CommonDevice.IsOnline == 1); |
| | | //deviceRow.SetOnLineStatu(deviceUI.CommonDevice.IsOnline == 1); |
| | | |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.HideSwitchBtn(true); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | |
| | | }; |
| | | functionSceneAutoBodyView.AddChidren(functionSceneBodyView); |
| | | |
| | | Button curBtn = new Button(); |
| | | RoomButton curBtn = new RoomButton(0,0); |
| | | foreach (var room in Common.Room.CurrentRoom.GetRoomsByCurrentFloorIdAppendLoveRoom()) |
| | | { |
| | | var row = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(187 + 50), |
| | | Width = Application.GetRealWidth(255), |
| | | Height = Application.GetRealHeight(167) |
| | | }; |
| | | roomFL.AddChidren(row); |
| | | |
| | | var roomBtn = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(187), |
| | | Height = Application.GetRealHeight(78), |
| | | Radius = (uint)Application.GetRealHeight(78 / 2), |
| | | Gravity = Gravity.Center, |
| | | Text = room.Name, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor3, |
| | | SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor, |
| | | BorderColor = ZigbeeColor.Current.GXCBorderUnSelectedColor, |
| | | BorderWidth = 1 |
| | | }; |
| | | RoomButton roomBtn = new RoomButton(0, 0); |
| | | roomBtn.Gravity = Gravity.Center; |
| | | roomBtn.Init(); |
| | | roomBtn.SetTitle(room.Name); |
| | | row.AddChidren(roomBtn); |
| | | roomBtn.SetViewShadow(true,5); |
| | | |
| | | if (room.IsLove) |
| | | { |
| | |
| | | { |
| | | RefreshFunction(room); |
| | | } |
| | | |
| | | } |
| | | roomBtn.MouseUpEventHandler += (sender, e) => |
| | | roomBtn.ButtonClickEvent += (sender, e) => |
| | | { |
| | | if ((sender as Button) == curBtn) |
| | | if (sender == curBtn) |
| | | { |
| | | return; |
| | | } |
| | | (sender as Button).IsSelected = true; |
| | | sender.IsSelected = true; |
| | | curBtn.IsSelected = false; |
| | | curBtn = sender as Button; |
| | | curBtn = sender; |
| | | this.curRoom = room; |
| | | if (sceneBtn.IsSelected) |
| | | { |