| | |
| | | }; |
| | | bodyView.AddChidren(topView); |
| | | |
| | | btnSceneTilte = new Button() |
| | | if (DB_ResidenceData.Instance.GatewayType == 0 || DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) |
| | | { |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(170), |
| | | Height = Application.GetRealHeight(25), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextSize = CSS_FontSize.HeadlineFontSize, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextID = StringId.Scenes, |
| | | IsSelected = true |
| | | }; |
| | | topView.AddChidren(btnSceneTilte); |
| | | |
| | | btnAutomationTitle = new Button() |
| | | btnSceneTilte = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(30), |
| | | //Width = Application.GetRealWidth(170), |
| | | Height = Application.GetRealHeight(25), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.HeadlineFontSize, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextID = StringId.Scenes, |
| | | IsSelected = true |
| | | }; |
| | | topView.AddChidren(btnSceneTilte); |
| | | btnAutomationTitle = new Button(); |
| | | } |
| | | else |
| | | { |
| | | X = Application.GetRealWidth(209), |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(170), |
| | | Height = Application.GetRealHeight(25), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextID = StringId.Automation, |
| | | }; |
| | | topView.AddChidren(btnAutomationTitle); |
| | | |
| | | btnSceneTilte = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(170), |
| | | Height = Application.GetRealHeight(25), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextSize = CSS_FontSize.HeadlineFontSize, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextID = StringId.Scenes, |
| | | IsSelected = true |
| | | }; |
| | | topView.AddChidren(btnSceneTilte); |
| | | |
| | | btnAutomationTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(209), |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(170), |
| | | Height = Application.GetRealHeight(25), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextID = StringId.Automation, |
| | | }; |
| | | topView.AddChidren(btnAutomationTitle); |
| | | } |
| | | var btnAddIconBg = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = DB_ResidenceData.residenceData.CurFoor, |
| | | Text = DB_ResidenceData.Instance.CurFloor.roomName, |
| | | }; |
| | | floorChangeView.AddChidren(btnFloor); |
| | | |
| | |
| | | try |
| | | { |
| | | int index = 0; |
| | | foreach (var scene in DB_ResidenceData.functionList.scenes) |
| | | foreach (var scene in FunctionList.List.scenes) |
| | | { |
| | | //if (scene.roomIds.Count == 0)//如何在房间已经移除了这个功能,则收藏界面也不会再显示 |
| | | //{ |
| | |
| | | }; |
| | | view.AddChidren(btnZone); |
| | | |
| | | |
| | | Button btnSettingIcon; |
| | | btnSettingIcon = new Button() |
| | | { |
| | |
| | | view.AddChidren(btnCollection); |
| | | btnCollection.MouseUpEventHandler = (sender, e) => { |
| | | scene.collect = btnCollection.IsSelected = !btnCollection.IsSelected; |
| | | scene.SaveSceneData(true); |
| | | scene.CollectScene(); |
| | | }; |
| | | LoadEvent_ControlScene(btnCoverd,btnName,btnZone, scene); |
| | | btnSettingIcon.MouseUpEventHandler = (sender, e) => { |
| | |
| | | Action refreshAction = () => { |
| | | btnName.Text = scene.name; |
| | | btnZone.Text = scene.GetRoomListName(); |
| | | //view.BackgroundImagePath = scene.ImagePath; |
| | | //2020-12-03 修改图片加载方法 |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, view); |
| | | }; |
| | | var aep = new SceneEditPage(scene, backAction); |
| | | MainPage.BasePageView.AddChidren(aep); |
| | | aep.LoadPage(StringId.EditScene, refreshAction); |
| | | aep.LoadPage(refreshAction); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | |
| | | //btnAddIcon.RemoveFromParent(); |
| | | automationPage = new FrameLayout(); |
| | | contentPageView.AddChidren(automationPage); |
| | | HDL_ON.UI.UI2.Intelligence.Automation.MainView.automationPage = automationPage; |
| | | HDL_ON.UI.UI2.Intelligence.Automation.MainView.MainShow(); |
| | | |
| | | UI2.Intelligence.Automation.MainView.automationPage = automationPage; |
| | | UI2.Intelligence.Automation.MainView.MainShow(); |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | else |
| | | { |
| | | //跳转到逻辑界面 |
| | | HDL_ON.UI.UI2.Intelligence.Automation.MainView.SkipAddLogicPage(); |
| | | UI2.Intelligence.Automation.MainView.SkipAddLogicPage(); |
| | | } |
| | | }; |
| | | } |