| | |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using HDL_ON.DAL; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Newtonsoft.Json; |
| | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | } |
| | | |
| | | public override void RemoveFromParent() |
| | | { |
| | | UnregisterGetPushMessageAction(); |
| | | base.RemoveFromParent(); |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | try |
| | |
| | | topView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(216), |
| | | BackgroundImagePath = DB_ResidenceData.residenceData.residenceImage, |
| | | BackgroundImagePath = DB_ResidenceData.Instance.residenceImage, |
| | | }; |
| | | bodyView.AddChidren(topView); |
| | | |
| | |
| | | Radius = (uint)Application.GetRealWidth(3), |
| | | }; |
| | | topView.AddChidren(btnLinkStateTip); |
| | | if (Control.Ins.GatewayOnline) |
| | | { |
| | | if (Control.Ins.IsRemote) |
| | | { |
| | | bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipRemote; |
| | | } |
| | | else |
| | | { |
| | | bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.MainColor; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipFail; |
| | | } |
| | | |
| | | btnResidenceName = new Button() |
| | | { |
| | |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = DB_ResidenceData.residenceData.residecenInfo.Name, |
| | | Text = DB_ResidenceData.Instance.CurrentRegion.Name, |
| | | IsBold = true |
| | | }; |
| | | topView.AddChidren(btnResidenceName); |
| | |
| | | { |
| | | //DriverLayer.Control.Ins.SearchLoaclGateway(); |
| | | MainPage.InitializationData(); |
| | | //DriverLayer.Control.Ins.IsRemote = true; |
| | | }); |
| | | }; |
| | | #endif |
| | |
| | | |
| | | // 查询未读消息并显示 |
| | | GetUnreadPushMessages(); |
| | | RegisterGetPushMessageAction(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | try |
| | | { |
| | | int index = 0; |
| | | foreach (var function in DB_ResidenceData.functionList.GetAllDeviceFunctionList()) |
| | | foreach (var function in FunctionList.List.GetDeviceFunctionList()) |
| | | { |
| | | //音乐模块有主从关系,需要特殊处理 |
| | | if (function.functionCategory == FunctionCategory.Music) |
| | |
| | | try |
| | | { |
| | | int index = 0; |
| | | foreach (var scene in DB_ResidenceData.functionList.scenes) |
| | | foreach (var scene in FunctionList.List.scenes) |
| | | { |
| | | if (!scene.collect) |
| | | continue; |
| | | if (scene.roomIds.Count == 0)//如何在房间已经移除了这个功能,则收藏界面也不会再显示 |
| | | { |
| | | scene.collect = false; |
| | | continue; |
| | | } |
| | | //if (scene.roomIds.Count == 0)//如何在房间已经移除了这个功能,则收藏界面也不会再显示 |
| | | //{ |
| | | // scene.collect = false; |
| | | // continue; |
| | | //} |
| | | if (index % 2 == 0) |
| | | { |
| | | sceneFunctionView.AddChidren(new Button() { Height = Application.GetRealHeight(7) }); |
| | |
| | | }; |
| | | 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; |
| | | }; |
| | | } |