| | |
| | | /// 场景/自动化分页区域 |
| | | /// </summary> |
| | | PageLayout contentPageView; |
| | | Button btnAutomationTitle; |
| | | #region 场景区域 |
| | | FrameLayout scenePageView; |
| | | /// <summary> |
| | | /// 场景内容显示区域 |
| | | /// </summary> |
| | | FrameLayout floorChangeView; |
| | | Button btnSceneTilte; |
| | | |
| | | #region 场景底部切换显示区域 |
| | | /// <summary> |
| | | /// 场景区域,顶部区域 |
| | |
| | | /// </summary> |
| | | VerticalScrolViewLayout sceneFunctionView; |
| | | #endregion |
| | | |
| | | #region 自动化区域 |
| | | /// <summary> |
| | | /// 自动化内容显示区域 |
| | | /// </summary> |
| | | FrameLayout automationPage; |
| | | #endregion |
| | | public IntelligencePage() |
| | | { |
| | | bodyView = this; |
| | |
| | | }; |
| | | bodyView.AddChidren(topView); |
| | | |
| | | Button btnSceneTilte = new Button() |
| | | btnSceneTilte = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(170), |
| | |
| | | }; |
| | | topView.AddChidren(btnSceneTilte); |
| | | |
| | | Button btnAutomationTitle = new Button() |
| | | btnAutomationTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(209), |
| | | Y = Application.GetRealHeight(30), |
| | |
| | | bodyView.AddChidren(contentPageView); |
| | | |
| | | LoadScenePageView(); |
| | | //LoadFunctionPageView(); |
| | | LoadAutomationPageView(); |
| | | LoadEventList(); |
| | | |
| | | } |
| | | #region 场景部分 |
| | | /// <summary> |
| | | /// 加载场景列表界面 |
| | | /// </summary> |
| | |
| | | MainPage.Log("homepage LoadControlView error : " + ex.Message); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 自动化部分 |
| | | /// <summary> |
| | | /// 加载自动化列表界面 |
| | | /// </summary> |
| | | void LoadAutomationPageView() |
| | | { |
| | | automationPage = new FrameLayout(); |
| | | contentPageView.AddChidren(automationPage); |
| | | |
| | | Button btnTipNot = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(120), |
| | | Width = Application.GetRealWidth(180), |
| | | Height = Application.GetRealWidth(180), |
| | | UnSelectedImagePath = "TipNot.png", |
| | | }; |
| | | automationPage.AddChidren(btnTipNot); |
| | | |
| | | Button btnTipNotText = new Button() |
| | | { |
| | | Y = btnTipNot.Bottom, |
| | | Height = Application.GetRealWidth(100), |
| | | TextID = StringId.TipNotOpen, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | }; |
| | | automationPage.AddChidren(btnTipNotText); |
| | | } |
| | | #endregion |
| | | } |
| | | |
| | | |
| | |
| | | void LoadEventList() |
| | | { |
| | | LoadEvent_SkipAddScenePage(); |
| | | LoadEvent_ShowedChange(); |
| | | } |
| | | |
| | | #region 顶部导航栏事件 |
| | | /// <summary> |
| | | /// 显示界面切换 |
| | | /// </summary> |
| | | void LoadEvent_ShowedChange() |
| | | { |
| | | contentPageView.PageChange = (sender, e) => |
| | | { |
| | | if (contentPageView.PageIndex == 0) |
| | | { |
| | | btnSceneTilte.IsSelected = true; |
| | | btnSceneTilte.TextSize = CSS_FontSize.HeadlineFontSize; |
| | | btnSceneTilte.IsBold = true; |
| | | btnAutomationTitle.IsSelected = false; |
| | | btnAutomationTitle.TextSize = CSS_FontSize.TextFontSize; |
| | | btnAutomationTitle.IsBold = false; |
| | | } |
| | | else |
| | | { |
| | | btnAutomationTitle.IsSelected = true; |
| | | btnAutomationTitle.TextSize = CSS_FontSize.HeadlineFontSize; |
| | | btnAutomationTitle.IsBold = true; |
| | | btnSceneTilte.IsSelected = false; |
| | | btnSceneTilte.TextSize = CSS_FontSize.TextFontSize; |
| | | btnSceneTilte.IsBold = false; |
| | | } |
| | | }; |
| | | |
| | | btnSceneTilte.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (btnSceneTilte.IsSelected) |
| | | { |
| | | return; |
| | | } |
| | | btnSceneTilte.IsSelected = true; |
| | | btnSceneTilte.TextSize = CSS_FontSize.HeadlineFontSize; |
| | | btnAutomationTitle.IsSelected = false; |
| | | btnAutomationTitle.TextSize = CSS_FontSize.TextFontSize; |
| | | |
| | | contentPageView.PageIndex = 0; |
| | | }; |
| | | btnAutomationTitle.MouseUpEventHandler = (sender, e) => { |
| | | if (btnAutomationTitle.IsSelected) |
| | | { |
| | | return; |
| | | } |
| | | btnAutomationTitle.IsSelected = true; |
| | | btnAutomationTitle.TextSize = CSS_FontSize.HeadlineFontSize; |
| | | btnSceneTilte.IsSelected = false; |
| | | btnSceneTilte.TextSize = CSS_FontSize.TextFontSize; |
| | | contentPageView.PageIndex = 1; |
| | | }; |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 跳转至添加场景的界面 |
| | | /// </summary> |