From cc57e8d53611813232e8f5761aca452a020e031a Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期一, 06 十一月 2023 16:59:03 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into wjc --- HDL_ON/UI/UI2/3-Intelligence/Scene/SceneTargetTypeChoosePage.cs | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 158 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneTargetTypeChoosePage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneTargetTypeChoosePage.cs new file mode 100644 index 0000000..effe348 --- /dev/null +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneTargetTypeChoosePage.cs @@ -0,0 +1,158 @@ +锘縰sing System; +using System.Collections.Generic; +using HDL_ON.Entity; +using HDL_ON.UI.CSS; +using Shared; + +namespace HDL_ON.UI +{ + /// <summary> + /// 鍦烘櫙妯℃澘绫诲瀷閫夋嫨鐣岄潰 + /// 鍔熻兘 + /// 鑷姩鍖� + /// </summary> + public class SceneTargetTypeChoosePage : FrameLayout + { + FrameLayout bodyView; + Scene scene; + /// <summary> + /// 鏇存柊鍔熻兘row + /// </summary> + Action refreshFunctionRowAction; + + public SceneTargetTypeChoosePage(Scene function, Action action) + { + bodyView = this; + scene = function; + refreshFunctionRowAction = () => + { + this.RemoveFromParent(); + action(); + }; + } + + public void LoadPage() + { + bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; + bodyView.AddChidren(new Button() + { + Height = Application.GetRealHeight(20), + BackgroundColor = CSS_Color.BackgroundColor + }); + var topView = new TopViewDiv(bodyView,Language.StringByID(StringId.AddExecutionAction)); + topView.maginY = 10; + topView.LoadTopView(); + + + var contentView = new VerticalScrolViewLayout() + { + Y = Application.GetRealHeight(74), + Height = Application.GetRealHeight(530), + ScrollEnabled = false, + }; + bodyView.AddChidren(contentView); + + var funtionView = new FrameLayout() + { + Height = Application.GetRealHeight(50), + }; + contentView.AddChidren(funtionView); + + + var btnFunctionIcon = new Button() + { + Gravity = Gravity.CenterVertical, + X = Application.GetRealWidth(16), + Width = Application.GetMinRealAverage(22), + Height = Application.GetMinRealAverage(22), + UnSelectedImagePath = "Navigation/ClassificationIcon.png", + }; + funtionView.AddChidren(btnFunctionIcon); + + var btnFunctionRight = new Button() + { + X = Application.GetRealWidth(339), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/Right.png", + }; + funtionView.AddChidren(btnFunctionRight); + + var btnFunctionTitle = new Button() + { + X = Application.GetRealWidth(50), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = StringId.Functions, + }; + funtionView.AddChidren(btnFunctionTitle); + + btnFunctionTitle.MouseUpEventHandler = (sender, e) => { + + refreshFunctionRowAction += () => { + this.RemoveFromParent(); + }; + var sefp = new SceneFunctionListChoosePage(scene, refreshFunctionRowAction); + MainPage.BasePageView.AddChidren(sefp); + sefp.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + + contentView.AddChidren(new Button() { Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); + + var automationView = new FrameLayout() + { + Height = Application.GetRealHeight(50), + }; + contentView.AddChidren(automationView); + + + var btnAutomationRight = new Button() + { + X = Application.GetRealWidth(339), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/Right.png", + }; + automationView.AddChidren(btnAutomationRight); + var btnAutomationIcon = new Button() + { + Gravity = Gravity.CenterVertical, + X = Application.GetRealWidth(16), + Width = Application.GetMinRealAverage(22), + Height = Application.GetMinRealAverage(22), + UnSelectedImagePath = "Navigation/IntellectualizationIcon.png", + }; + automationView.AddChidren(btnAutomationIcon); + + var btnAutomationTitle = new Button() + { + X = Application.GetRealWidth(50), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = StringId.Automation, + }; + automationView.AddChidren(btnAutomationTitle); + + btnAutomationTitle.MouseUpEventHandler = (sender, e) => { + + refreshFunctionRowAction += () => { + this.RemoveFromParent(); + }; + + var sefp = new SceneAutomationListChoosePage(scene, refreshFunctionRowAction); + MainPage.BasePageView.AddChidren(sefp); + sefp.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + + + contentView.AddChidren(new Button() { Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); + } + } +} + -- Gitblit v1.8.0