| | |
| | | using System;
|
| | | using System; |
| | | 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); |
| | |
| | | { |
| | | System.Threading.Tasks.Task.Run(() => |
| | | { |
| | | DriverLayer.Control.Ins.SearchLoaclGateway(); |
| | | //DriverLayer.Control.Ins.SearchLoaclGateway(); |
| | | MainPage.InitializationData(); |
| | | //DriverLayer.Control.Ins.IsRemote = true; |
| | | }); |
| | | }; |
| | | #endif |
| | |
| | | { |
| | | X = Application.GetRealWidth(10) + btnMsgIcon.Right, |
| | | Width = Application.GetRealWidth(240), |
| | | Text = "无", |
| | | Text = "...", |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | |
| | | #endregion |
| | | |
| | | LoadEvent_ChangeShowedFunctionType(); |
| | | |
| | | // 查询未读消息并显示 |
| | | 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) }); |
| | |
| | | Width = Application.GetRealWidth(164), |
| | | Height = Application.GetRealWidth(122), |
| | | Tag = scene.sid, |
| | | BackgroundImagePath = (scene as Scene).ImagePath, |
| | | BackgroundImagePath = scene.ImagePath, |
| | | }; |
| | | rowView.AddChidren(functionView); |
| | | |
| | | //2020-12-03 修改图片加载方法 |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, functionView); |
| | | |
| | | LoadSceneFunctionDiv( functionView, scene); |
| | | index++; |
| | |
| | | Action refreshAction = () => { |
| | | btnName.Text = scene.name; |
| | | btnZone.Text = scene.GetRoomListName(); |
| | | view.BackgroundImagePath = (scene as Scene).ImagePath; |
| | | //view.BackgroundImagePath = (scene as Scene).ImagePath; |
| | | //2020-12-03 修改图片加载方法 |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, view); |
| | | }; |
| | | var aep = new SceneEditPage(scene as Scene, backAction); |
| | | 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; |
| | | }; |
| | | } |