From 5bfb959c47017825c8cf7dc8570c55b04dab694c Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 09 六月 2021 16:42:11 +0800 Subject: [PATCH] Merge branch 'dev-tzy' into wxr6 --- HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 47 ++++++++++++++++++++++++++++++----------------- 1 files changed, 30 insertions(+), 17 deletions(-) diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index 9366529..871b7a1 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -113,6 +113,7 @@ public void LoadPage() { + MainPage.CurPageIndex = 0; try { this.BeginHeaderRefreshingAction = () => @@ -163,7 +164,7 @@ TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel, TextAlignment = TextAlignment.CenterLeft, - Text = DB_ResidenceData.Instance.CurrentRegion.Name, + Text = DB_ResidenceData.Instance.CurrentRegion.homeName, IsBold = true }; topView.AddChidren(btnResidenceName); @@ -380,6 +381,11 @@ MainPage.Log($"HomePage LoadPage Error : {ex.Message}"); } + +#if DEBUG + //FunctionList.List.Functions.Add(new Function() { spk = SPK.ClothesHanger, name = "娴嬭瘯鍑夐湼", attributes = new List<FunctionAttributes> { new FunctionAttributes { key = FunctionAttributeKey.HotDry } ,new FunctionAttributes { key = FunctionAttributeKey.HotDryTime } ,new FunctionAttributes { key = FunctionAttributeKey.HotDryTimeLeft } } }); +#endif + } /// <summary> /// 鍔犺浇鍐呭鍖哄煙 @@ -466,12 +472,18 @@ try { int index = 0; - foreach (var function in FunctionList.List.GetDeviceFunctionList()) + var list = FunctionList.List.GetDeviceFunctionList(); + foreach (var function in list) { //闊充箰妯″潡鏈変富浠庡叧绯伙紝闇�瑕佺壒娈婂鐞� if (function.Spk_Prefix == FunctionCategory.Music) { - var music = function as Music.A31MusicModel; + //var music = function as Music.A31MusicModel; + var music = Music.A31MusicModel.A31MusicModelList.Find((obj) => obj.sid == function.sid); + if (music == null) + { + continue; + } if (music.ServerClientType == -1) { continue; @@ -731,15 +743,16 @@ SelectedImagePath = "Collection/CollectionWhiteIcon.png", UnSelectedImagePath = "Collection/CollectionIcon.png", }; - //view.AddChidren(btnCollection); + view.AddChidren(btnCollection); //2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳� - if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) - { - view.AddChidren(btnCollection); - } + //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) + //{ + // view.AddChidren(btnCollection); + //} LoadEvent_FunctionCollection(btnCollection, function); - if (function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || + if (//SPK.CurtainSpkList().Contains(function.spk)) + function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex ) { btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainIcon.png"; @@ -771,14 +784,14 @@ LoadEvent_ControlCurtain(function, btnCurtainClose, btnCurtainOpen); } - else if (function.spk == SPK.ElectricTV) + else if (function.spk == SPK.ElectricTV || function.spk == SPK.TvIr) { btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/TVIcon.png"; Button btnPower; btnPower = new Button() { X = Application.GetRealWidth(131), - Y = Application.GetRealHeight(86), + Y = Application.GetRealHeight(70), Width = Application.GetRealWidth(32), Height = Application.GetRealWidth(32), UnSelectedImagePath = "Public/PowerClose.png", @@ -1004,7 +1017,7 @@ Width = Application.GetRealWidth(32), UnSelectedImagePath = "Public/FuncInfoSetIcon_white.png", }; - if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) + if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) { view.AddChidren(btnSettingIcon); } @@ -1049,12 +1062,12 @@ SelectedImagePath = "Collection/CollectionWhiteIcon.png", UnSelectedImagePath = "Collection/CollectionIcon.png", }; - //view.AddChidren(btnCollection); + view.AddChidren(btnCollection); //2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳� - if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) - { - view.AddChidren(btnCollection); - } + //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) + //{ + // view.AddChidren(btnCollection); + //} LoadEvent_SceneCollection(btnCollection, scene); -- Gitblit v1.8.0