From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28

---
 ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
index cef40e7..6916f59 100644
--- a/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
@@ -91,10 +91,10 @@
         /// </summary>
         public void Show()
         {
+            RemoveAll();
             InitData();
             AddTop();
             AddBodyView();
-            
         }
 
         /// <summary>
@@ -123,7 +123,7 @@
             }
             foreach (var device in devList)
             {
-                var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device?.CommonDevice });
+                var info = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device?.CommonDevice);
                 if (typeDeviceDic.ContainsKey(info.BeloneTextId) == false)
                 {
                     var sameDevList = new List<DeviceUI> { };
@@ -250,7 +250,7 @@
         public void RefreshBodyView()
         {
             functionSceneBodyView.RemoveAll();
-            
+
             if (functionBtn.IsSelected)
             {
                 ShowFunction();
@@ -305,7 +305,7 @@
                     Width = Application.GetRealWidth(1028)
                 };
                 functionSceneBodyView.AddChidren(functionTypeScrowView);
-                
+
                 deviceListScrolView = new VerticalScrolViewLayout
                 {
                     X = Application.GetRealWidth(CommonFormResouce.X_Left),
@@ -334,7 +334,7 @@
                     };
                     string imgPath=string.Empty;
                     string imgSeletedPath=string.Empty;
-                    Common.LocalDevice.Current.GetDeviceBeloneIcon(deviceType.Value, ref imgPath ,ref imgSeletedPath);
+                    Common.LocalDevice.Current.GetDeviceObjectIcon(deviceType.Value, ref imgPath ,ref imgSeletedPath);
                     functionTypeIMG.Init(imgPath,imgSeletedPath);
                     functionTypeIMG.SetTitle(deviceType.Key);
                     typeRowLayout.AddChidren(functionTypeIMG);
@@ -378,7 +378,7 @@
 
                 var deviceRow = new SelectFunctionView(0, 35);
                 deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
-                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
+                deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice));
                 deviceTypeRowLayout.AddChidren(deviceRow);
 
                 EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
@@ -468,16 +468,16 @@
             add.MouseUpEventHandler += (sender, e) =>
             {
                 var selectZone = new SelectZone();
-                AddChidren(selectZone);
+                selectZone.title = Language.StringByID(R.MyInternationalizationString.AddTo);
                 selectZone.Init();
-                selectZone.ZoneAction = (r) =>
+                selectZone.ZoneAction += (r) =>
                 {
                     foreach (var d in selectedList)
                     {
                         r.AddDevice(d.CommonDevice, true);
                         deviceListScrolView.RemoveViewByTag(d);
                     }
-                    
+
                     if (sameTypeList.Count == selectedList.Count)
                     {
                         RefreshData();
@@ -536,7 +536,7 @@
                 ShowNoSceneTip();
             }
             else
-            {
+            {
                 var sceneScrolView = new VerticalScrolViewLayout
                 {
                     Y = Application.GetRealHeight(22),
@@ -656,7 +656,7 @@
                             var frame = sceneScrolView.GetChildren(i) as FrameLayout;
                             (frame.GetChildren(1) as Button).IsSelected = (sender as Button).IsSelected;
                         }
-                        
+
                         if ((sender as Button).IsSelected)
                         {
                             (sender as Button).TextID = R.MyInternationalizationString.Cancel;
@@ -699,9 +699,9 @@
                 add.MouseUpEventHandler += (sender, e) =>
                 {
                     var selectZone = new SelectZone();
-                    CommonPage.Instance.AddChidren(selectZone);
+                    selectZone.title = Language.StringByID(R.MyInternationalizationString.AddTo);
                     selectZone.Init();
-                    selectZone.ZoneAction = (r) =>
+                    selectZone.ZoneAction += (r) =>
                     {
                         foreach (var s in selectedList)
                         {

--
Gitblit v1.8.0