| | |
| | | public void LoadPage() |
| | | { |
| | | MainPage.CurPageIndex = 0; |
| | | |
| | | //MainPage.BaseTopButton.BackgroundColor = 0xFFA09C98; |
| | | |
| | | |
| | | try |
| | |
| | | environmentalView.AddChidren(btnPm25Values); |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region msg |
| | | FrameLayout msgView; |
| | | msgView = new FrameLayout() |
| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | #region 功能场景切换 |
| | | |
| | | bodyView.AddChidren(new Button() { Height = Application.GetRealHeight(20), BackgroundColor = 0x00000000 }); |
| | |
| | | { |
| | | contentView = new PageLayout() |
| | | { |
| | | Height = Application.GetRealHeight(310 + 30 + 10 + 100), //20为超出部分 |
| | | Height = Application.GetRealHeight(310 + 30 + 10), //20为超出部分 |
| | | IsShowPoint = false, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | |
| | | TextSize = CSS_FontSize.HeadlineFontSize, |
| | | TextAlignment = TextAlignment.Center, |
| | | IsSelected = true, |
| | | //IsBold = true, |
| | | IsBold = true, |
| | | }; |
| | | changeView.AddChidren(btnChangeFunction); |
| | | |
| | |
| | | { |
| | | |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | CurShowTypeContent = 0; |
| | | contentView.PageIndex = 0; |
| | | }; |
| | |
| | | btnChangeScene.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.IsBold = false; |
| | | CurShowTypeContent = 1; |
| | | contentView.PageIndex = 1; |
| | | }; |
| | |
| | | { |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeScene.IsSelected = false; |
| | | btnChangeScene.IsBold = false; |
| | | } |
| | | else if (contentView.PageIndex == 1) |
| | | { |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.IsBold = false; |
| | | } |
| | | }; |
| | | |
| | |
| | | Width = Application.GetRealWidth(164), |
| | | Height = Application.GetRealWidth(122), |
| | | Tag = scene.sid, |
| | | BackgroundImagePath = scene.ImagePath, |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BorderColor = 0x00000000, |
| | | BorderWidth = 1, |
| | | }; |
| | | rowView.AddChidren(functionView); |
| | | |
| | | //2020-12-03 修改图片加载方法 |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, functionView); |
| | | |
| | | LoadSceneFunctionDiv( functionView, scene); |
| | | index++; |
| | |
| | | btnIcon.MouseUpEventHandler = skipControlPageEvent; |
| | | btnState.MouseUpEventHandler = skipControlPageEvent; |
| | | |
| | | var btnOffline = new Button() |
| | | { |
| | | X = btnIcon.Right, |
| | | Y = Application.GetRealWidth(16), |
| | | Height = Application.GetMinRealAverage(32), |
| | | TextID = StringId.DeviceOffline, |
| | | TextColor = CSS_Color.WarningColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Tag = "OnlineTag", |
| | | Visible = !function.isOnline() |
| | | }; |
| | | view.AddChidren(btnOffline); |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | try |
| | | { |
| | | var btnSceneGg = new ImageView() |
| | | { |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BorderColor = 0x00000000, |
| | | BorderWidth = 1, |
| | | }; |
| | | view.AddChidren(btnSceneGg); |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, btnSceneGg); |
| | | |
| | | |
| | | Button btnCoverd = new Button() |
| | | { |
| | | UnSelectedImagePath = "Collection/SceneCovered.png", |
| | | //UnSelectedImagePath = "Collection/SceneCovered.png", |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BackgroundColor = 0x44000000, |
| | | }; |
| | | view.AddChidren(btnCoverd); |
| | | |
| | |
| | | { |
| | | btnName.Text = scene.name; |
| | | btnZone.Text = scene.GetRoomListName(); |
| | | //view.BackgroundImagePath = (scene as Scene).ImagePath; |
| | | //2020-12-03 修改图片加载方法 |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, view); |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages(scene.ImagePath, btnSceneGg); |
| | | }; |
| | | var aep = new SceneEditPage(scene, backAction); |
| | | MainPage.BasePageView.AddChidren(aep); |