| | |
| | | using System; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | |
| | | Button btnSceneTilte; |
| | | |
| | | #region 场景底部切换显示区域 |
| | | FrameLayout topView; |
| | | /// <summary> |
| | | /// 场景区域,顶部区域 |
| | | /// </summary> |
| | |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | #region top |
| | | FrameLayout topView = new FrameLayout() |
| | | topView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(64), |
| | | BackgroundColor = CSS_Color.TopViewColor, |
| | |
| | | /// </summary> |
| | | void LoadSceneFunctionControlZone() |
| | | { |
| | | //topView.AddChidren(btnAddIcon); |
| | | |
| | | sceneFunctionView.RemoveAll(); |
| | | var rowView = new FrameLayout(); |
| | | try |
| | |
| | | /// </summary> |
| | | void LoadAutomationPageView() |
| | | { |
| | | //btnAddIcon.RemoveFromParent(); |
| | | ///清除之前界面数据重新加载新数据; |
| | | contentPageView.RemoveAll(); |
| | | automationPage = new FrameLayout(); |
| | | contentPageView.AddChidren(automationPage); |
| | | |
| | |
| | | btnSceneTilte.TextSize = CSS_FontSize.HeadlineFontSize; |
| | | btnAutomationTitle.IsSelected = false; |
| | | btnAutomationTitle.TextSize = CSS_FontSize.TextFontSize; |
| | | |
| | | contentPageView.PageIndex = 0; |
| | | }; |
| | | //逻辑点击事件 |
| | | btnAutomationTitle.MouseUpEventHandler = (sender, e) => { |
| | | if (btnAutomationTitle.IsSelected) |
| | | { |
| | |
| | | btnSceneTilte.IsSelected = false; |
| | | btnSceneTilte.TextSize = CSS_FontSize.TextFontSize; |
| | | contentPageView.PageIndex = 1; |
| | | LoadAutomationPageView(); |
| | | |
| | | }; |
| | | } |
| | | #endregion |
| | |
| | | { |
| | | btnAddIcon.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | Action action = () => { |
| | | LoadSceneFunctionControlZone(); |
| | | }; |
| | | var aep = new NewSceneMenuListPage(action); |
| | | MainPage.BasePageView.AddChidren(aep); |
| | | aep.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | if (!btnAutomationTitle.IsSelected) |
| | | { |
| | | Action action = () => |
| | | { |
| | | LoadSceneFunctionControlZone(); |
| | | }; |
| | | var aep = new NewSceneMenuListPage(action); |
| | | MainPage.BasePageView.AddChidren(aep); |
| | | aep.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | else |
| | | { |
| | | //跳转到逻辑界面 |
| | | SkipAddLogicPage(); |
| | | } |
| | | }; |
| | | } |
| | | |
| | |
| | | { |
| | | string msg = function.name + Language.StringByID(StringId.AlreadyOpened); |
| | | new PublicAssmebly().TipMsgAutoClose(msg, true); |
| | | Control.Send(function); |
| | | Control.ins.ControlScene(function as Scene); |
| | | }; |
| | | btnCoverd.MouseUpEventHandler = eventHandler; |
| | | btnName.MouseUpEventHandler = eventHandler; |
| | | btnZone.MouseUpEventHandler = eventHandler; |
| | | } |
| | | /// <summary> |
| | | /// 跳转到逻辑界面的方法 |
| | | /// </summary> |
| | | public void SkipAddLogicPage() |
| | | { |
| | | HDL_ON.UI.UI2.Intelligence.Automation.Logic.currlogic = new UI2.Intelligence.Automation.Logic(); |
| | | var addLogic = new UI2.Intelligence.Automation.AddLogic(); |
| | | MainPage.BasePageView.AddChidren(addLogic); |
| | | addLogic.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | } |
| | | |
| | | } |