| | |
| | | var midFL = new FrameLayout |
| | | { |
| | | Y = topView.Bottom, |
| | | Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight) - topView.Bottom, |
| | | Height = Application.GetRealHeight(1549), |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor |
| | | }; |
| | | AddChidren(midFL); |
| | |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor |
| | | }; |
| | | midFL.AddChidren(functionSceneAutoBG); |
| | | //功能 |
| | | functionBtn = new ButtonLineForm(CommonFormResouce.X_Left, 34, 150, 68); |
| | | functionSceneAutoBG.AddChidren(functionBtn); |
| | | functionBtn.Init(); |
| | | functionBtn.SetTitle(R.MyInternationalizationString.Function); |
| | | |
| | | //场景 |
| | | sceneBtn = new ButtonLineForm(CommonFormResouce.X_Left + 150 + 20, 34, 150, 68); |
| | | sceneBtn = new ButtonLineForm(CommonFormResouce.X_Left, 34, 150, 68); |
| | | functionSceneAutoBG.AddChidren(sceneBtn); |
| | | sceneBtn.Init(); |
| | | sceneBtn.SetTitle(R.MyInternationalizationString.Scence); |
| | | |
| | | //功能 |
| | | functionBtn = new ButtonLineForm(CommonFormResouce.X_Left + 150 + 20, 34, 150, 68); |
| | | functionSceneAutoBG.AddChidren(functionBtn); |
| | | functionBtn.Init(); |
| | | functionBtn.SetTitle(R.MyInternationalizationString.Function); |
| | | //自动化 |
| | | automationBtn = new ButtonLineForm(CommonFormResouce.X_Left + 150 * 2 + 20, 34, 150, 68); |
| | | automationBtn.Init(); |
| | |
| | | deviceListScrolView = new VerticalScrolViewLayout |
| | | { |
| | | X = Application.GetRealWidth(CommonFormResouce.X_Left), |
| | | Y = functionTypeScrowView.Bottom + Application.GetRealHeight(50), |
| | | Y = Application.GetRealHeight(35+275), |
| | | Width = Application.GetRealWidth(1028), |
| | | Height = functionSceneBodyView.Height - Application.GetRealHeight(279 + 50) - 1, |
| | | Height = Application.GetRealHeight(938) - 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor |
| | | |
| | | }; |
| | | functionSceneBodyView.AddChidren(deviceListScrolView); |
| | | tempFunctionTypeBtn = new FunctionButton(); |
| | |
| | | |
| | | var deviceTypeRowLayout = new RowLayout() |
| | | { |
| | | Height = Application.GetRealHeight(127 + 35), |
| | | Height = Application.GetRealHeight(129 + 35), |
| | | LineColor = ZigbeeColor.Current.GXCBackgroundColor, |
| | | Tag = deviceUI |
| | | }; |
| | | deviceListScrolView.AddChidren(deviceTypeRowLayout); |
| | | |
| | | var deviceRow = new FunctionRow(0, 35); |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetStatu(light.IsOnline == 1); |
| | | deviceRow.SetZoneText(deviceUI.GetZone()); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | | |
| | | |
| | | deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) => |
| | | { |
| | |
| | | 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) |
| | | { |
| | | light.SwitchControl(1); |
| | |
| | | }); |
| | | }; |
| | | |
| | | deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => |
| | | { |
| | | var lightControl = new Phone.Device.Light.LightControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, room); |
| | | }; |
| | | |
| | | var editBtn = new CommonForm.RowLayoutEditButton() |
| | | { |
| | | Tag = deviceUI, |
| | |
| | | }; |
| | | deviceListScrolView.AddChidren(deviceTypeRowLayout); |
| | | |
| | | var deviceRow = new FunctionRow(0, 35); |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetStatu(airSwitch.IsOnline == 1); |
| | | deviceRow.SetZoneText(deviceUI.GetZone()); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | | |
| | | deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) => |
| | |
| | | DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => |
| | | { |
| | | var lightControl = new Phone.Device.Light.LightControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, room); |
| | | }; |
| | | |
| | | var editBtn = new CommonForm.RowLayoutEditButton() |
| | |
| | | |
| | | var deviceTypeRowLayout = new RowLayout() |
| | | { |
| | | Height = Application.GetRealHeight(127 + 35), |
| | | Height = Application.GetRealHeight(129 + 35), |
| | | LineColor = ZigbeeColor.Current.GXCBackgroundColor, |
| | | Tag = deviceUI |
| | | }; |
| | | deviceListScrolView.AddChidren(deviceTypeRowLayout); |
| | | |
| | | var deviceRow = new FunctionRow(0, 35); |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetStatu(dimmableLight.IsOnline == 1); |
| | | deviceRow.SetZoneText(deviceUI.GetZone()); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | | |
| | | deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) => |
| | |
| | | DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => |
| | | { |
| | | var dimmableLightControl = new Phone.Device.Light.DimmableLightControl(); |
| | | UserView.HomePage.Instance.AddChidren(dimmableLightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | dimmableLightControl.action = RefreshBodyView; |
| | | dimmableLightControl.Show(deviceUI, room); |
| | | }; |
| | | |
| | | var editBtn = new CommonForm.RowLayoutEditButton() |
| | |
| | | var roomFL = new HorizontalScrolViewLayout() |
| | | { |
| | | X = Application.GetRealWidth(CommonFormResouce.X_Left), |
| | | Height = Application.GetRealHeight(167), |
| | | Height = Application.GetRealHeight(170), |
| | | Width = Application.GetRealWidth(CommonPage.AppRealWidth - CommonFormResouce.X_Left), |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor |
| | | }; |
| | |
| | | functionSceneBodyView = new FrameLayout() |
| | | { |
| | | Y = roomFL.Bottom, |
| | | Height = Application.GetRealHeight(1316), |
| | | Height = Application.GetRealHeight(973+279), |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor |
| | | }; |
| | | functionSceneAutoBodyView.AddChidren(functionSceneBodyView); |
| | |
| | | { |
| | | var sceneScrolView = new VerticalScrolViewLayout |
| | | { |
| | | Y = Application.GetRealHeight(58) |
| | | //Y = Application.GetRealHeight(58) |
| | | }; |
| | | functionSceneBodyView.AddChidren(sceneScrolView); |
| | | foreach (var scene in sceneList) |