From 4f40e8385ff6725be8e8b642e50f9f7201a27dfa Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 11 十二月 2020 15:58:32 +0800
Subject: [PATCH] Merge branch 'NewFilePath' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into NewFilePath

---
 HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs |  107 ++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 69 insertions(+), 38 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
index 72c5ce7..4e490a8 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -69,41 +69,70 @@
             };
             bodyView.AddChidren(topView);
 
-            btnSceneTilte = new Button()
+            if (DB_ResidenceData.residenceData.GatewayType == 0)
             {
-                Y = Application.GetRealHeight(30),
-                Width = Application.GetRealWidth(170),
-                Height = Application.GetRealHeight(25),
-                TextAlignment = TextAlignment.CenterRight,
-                TextSize = CSS_FontSize.HeadlineFontSize,
-                TextColor = CSS_Color.PromptingColor1,
-                SelectedTextColor = CSS_Color.MainColor,
-                TextID = StringId.Scenes,
-                IsSelected = true
-            };
-            topView.AddChidren(btnSceneTilte);
+                btnSceneTilte = new Button()
+                {
+                    Y = Application.GetRealHeight(30),
+                    //Width = Application.GetRealWidth(170),
+                    Height = Application.GetRealHeight(25),
+                    TextAlignment = TextAlignment.Center,
+                    TextSize = CSS_FontSize.HeadlineFontSize,
+                    TextColor = CSS_Color.PromptingColor1,
+                    SelectedTextColor = CSS_Color.MainColor,
+                    TextID = StringId.Scenes,
+                    IsSelected = true
+                };
+                topView.AddChidren(btnSceneTilte);
+                btnAutomationTitle = new Button();
 
-            btnAutomationTitle = new Button()
+            }
+            else
             {
-                X = Application.GetRealWidth(209),
-                Y = Application.GetRealHeight(30),
-                Width = Application.GetRealWidth(170),
-                Height = Application.GetRealHeight(25),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = CSS_FontSize.TextFontSize,
-                TextColor = CSS_Color.PromptingColor1,
-                SelectedTextColor = CSS_Color.MainColor,
-                TextID = StringId.Automation,
-            };
-            topView.AddChidren(btnAutomationTitle);
 
-            btnAddIcon = new Button()
+                btnSceneTilte = new Button()
+                {
+                    Y = Application.GetRealHeight(30),
+                    Width = Application.GetRealWidth(170),
+                    Height = Application.GetRealHeight(25),
+                    TextAlignment = TextAlignment.CenterRight,
+                    TextSize = CSS_FontSize.HeadlineFontSize,
+                    TextColor = CSS_Color.PromptingColor1,
+                    SelectedTextColor = CSS_Color.MainColor,
+                    TextID = StringId.Scenes,
+                    IsSelected = true
+                };
+                topView.AddChidren(btnSceneTilte);
+
+                btnAutomationTitle = new Button()
+                {
+                    X = Application.GetRealWidth(209),
+                    Y = Application.GetRealHeight(30),
+                    Width = Application.GetRealWidth(170),
+                    Height = Application.GetRealHeight(25),
+                    TextAlignment = TextAlignment.CenterLeft,
+                    TextSize = CSS_FontSize.TextFontSize,
+                    TextColor = CSS_Color.PromptingColor1,
+                    SelectedTextColor = CSS_Color.MainColor,
+                    TextID = StringId.Automation,
+                };
+                topView.AddChidren(btnAutomationTitle);
+            }
+            var btnAddIconBg = new Button()
             {
                 X = Application.GetRealWidth(337),
                 Y = Application.GetRealHeight(29),
                 Width = Application.GetMinRealAverage(28),
                 Height = Application.GetMinRealAverage(28),
                 UnSelectedImagePath = "Public/AddIcon.png",
+            };
+            topView.AddChidren(btnAddIconBg);
+
+            btnAddIcon = new Button()
+            {
+                X = Application.GetRealWidth(337-20),
+                Width = Application.GetMinRealAverage(28+30),
+                Height = Application.GetMinRealAverage(28+29),
             };
             topView.AddChidren(btnAddIcon);
             #endregion
@@ -200,11 +229,11 @@
                 int index = 0;
                 foreach (var scene in DB_ResidenceData.functionList.scenes)
                 {
-                    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) });
@@ -223,9 +252,11 @@
                         Width = Application.GetRealWidth(164),
                         Height = Application.GetRealWidth(122),
                         Tag = scene.sid,
-                        BackgroundImagePath = (scene as Scene).ImagePath,
+                        //BackgroundImagePath = (scene as Scene).ImagePath,
                     };
                     rowView.AddChidren(functionView);
+                    //2020-12-03 淇敼鍥剧墖鍔犺浇鏂规硶
+                    ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, functionView);
 
                     LoadSceneFunctionDiv(functionView, scene);
                     index++;
@@ -308,7 +339,6 @@
                 };
                 view.AddChidren(btnZone);
 
-
                 Button btnSettingIcon;
                 btnSettingIcon = new Button()
                 {
@@ -334,7 +364,7 @@
                 view.AddChidren(btnCollection);
                 btnCollection.MouseUpEventHandler = (sender, e) => {
                     scene.collect = btnCollection.IsSelected = !btnCollection.IsSelected;
-                    scene.SaveSceneData();
+                    scene.SaveSceneData(true);
                 };
                 LoadEvent_ControlScene(btnCoverd,btnName,btnZone, scene);
                 btnSettingIcon.MouseUpEventHandler = (sender, e) => {
@@ -344,7 +374,9 @@
                     Action refreshAction = () => {
                         btnName.Text = scene.name;
                         btnZone.Text = scene.GetRoomListName();
-                        view.BackgroundImagePath = scene.ImagePath;
+                        //view.BackgroundImagePath = scene.ImagePath;
+                        //2020-12-03 淇敼鍥剧墖鍔犺浇鏂规硶
+                        ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, view);
                     };
                     var aep = new SceneEditPage(scene, backAction);
                     MainPage.BasePageView.AddChidren(aep);
@@ -368,9 +400,8 @@
             //btnAddIcon.RemoveFromParent();
             automationPage = new FrameLayout();
             contentPageView.AddChidren(automationPage);
-            HDL_ON.UI.UI2.Intelligence.Automation.MainView.automationPage = automationPage;
-            HDL_ON.UI.UI2.Intelligence.Automation.MainView.MainShow();
-
+            UI2.Intelligence.Automation.MainView.automationPage = automationPage;
+            UI2.Intelligence.Automation.MainView.MainShow();
         }
         #endregion
     }
@@ -462,7 +493,7 @@
                 else
                 {
                     //璺宠浆鍒伴�昏緫鐣岄潰
-                    HDL_ON.UI.UI2.Intelligence.Automation.MainView.SkipAddLogicPage();
+                    UI2.Intelligence.Automation.MainView.SkipAddLogicPage();
                 }
             };
         }

--
Gitblit v1.8.0