From eb424d24e39bab4a245725f35deab3f234ea0f13 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 13 十二月 2019 10:48:50 +0800
Subject: [PATCH] 2019.12.13

---
 ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs |   37 +++++++++++++++++++++----------------
 1 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs
index b54dac8..da0dedc 100644
--- a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs
@@ -104,7 +104,7 @@
 
             AddBodyView();
 
-            RefreshBodyView();
+            RefreshBodyView(Config.Instance.Home.CurrentFloorId);
         }
 
 
@@ -162,10 +162,10 @@
             var floors = new SelectFloor();
             AddChidren(floors);
             floors.Init(580, 184, Direction.Right);
-            floors.FloorAction += (floorName) =>
+            floors.FloorAction += (floorId) =>
             {
-                floorBtn.Text = floorName;
-                RefreshBodyView();
+                floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId);
+                RefreshBodyView(floorId);
             };
         }
         /// <summary>
@@ -187,15 +187,15 @@
         /// <summary>
         /// RefreshBodyView
         /// </summary>
-        private void RefreshBodyView()
+        private void RefreshBodyView(string floorId)
         {
-            AddRoomView();
+            AddRoomView(floorId);
         }
 
         /// <summary>
         /// AddRoomView
         /// </summary>
-        private void AddRoomView()
+        private void AddRoomView(string floorId)
         {
             var roomFL = new HorizontalScrolViewLayout()
             {
@@ -216,7 +216,7 @@
             bodyFrameLayout.AddChidren(functionSceneBodyView);
 
             Button curBtn = new Button();
-            foreach (var room in Common.Room.CurrentRoom.GetRoomsByCurrentFloorIdAppendLoveRoom())
+            foreach (var room in Common.Room.CurrentRoom.GetRoomsByFloorIdAppendLoveRoom(floorId))
             {
                 var row = new FrameLayout()
                 {
@@ -302,6 +302,7 @@
                 };
                 functionSceneBodyView.AddChidren(deviceListScrolView);
                 tempFunctionTypeBtn = new FunctionButton();
+                tempFunctionTypeBtn.Init("","");
 
                 EventHandler<MouseEventArgs> ShowSameTypeFunction = (object typeSender, MouseEventArgs mouseEventArgs) =>
                 {
@@ -463,6 +464,7 @@
                 Height = Application.GetRealHeight(530),
             };
             dialog.AddChidren(selectFL);
+            selectFL.Animate = Animate.DownToUp;
 
             var titleBG = new FrameLayout
             {
@@ -619,6 +621,7 @@
                 Height = Application.GetRealHeight(752),
             };
             dialog.AddChidren(selectFL);
+            selectFL.Animate = Animate.DownToUp;
 
             var titleBG = new FrameLayout
             {
@@ -722,7 +725,7 @@
 
             if (sceneTarget.TaskList.Count > 0)
             {
-                if (sceneTarget.TaskList[0].Data1 == 0)
+                if (sceneTarget.TaskList[0].Data1 == 1)
                 {
                     open.IsSelected = false;
                     shut.IsSelected = true;
@@ -731,7 +734,7 @@
                 {
                     open.IsSelected = true;
                     shut.IsSelected = false;
-                    open.SetProgress(sceneTarget.TaskList[0].Data1);
+                    open.SetProgress(sceneTarget.TaskList[0].Data2);
                 }
             }
 
@@ -746,14 +749,14 @@
                 if (shut.IsSelected)
                 {
                     //鍏�
-                    data1 = 0;
+                    data1 = 1;
                     data2 = 0;
                 }
                 else
                 {
                     //鐧惧垎姣�
-                    data1 = open.SeekBar.Progress;
-                    data2 = 0;
+                    data1 = 5;
+                    data2 = open.SeekBar.Progress;
                 }
 
                 var taskInfo = new ZigBee.Device.Scene.TaskListInfo
@@ -784,6 +787,7 @@
                 Height = Application.GetRealHeight(752),
             };
             dialog.AddChidren(selectFL);
+            selectFL.Animate = Animate.DownToUp;
 
             var titleBG = new FrameLayout
             {
@@ -949,6 +953,7 @@
                 Height = Application.GetRealHeight(1106),
             };
             dialog.AddChidren(selectFL);
+            selectFL.Animate = Animate.DownToUp;
 
             var titleBG = new FrameLayout
             {
@@ -1074,7 +1079,7 @@
                         }
                         if (tasklist.Data1 == 4 || tasklist.Data1 == 5)
                         {
-                            tempId = open.temperatureList.IndexOf(tasklist.Data2);
+                            tempId = open.temperatureList.IndexOf(tasklist.Data2/100);
                         }
                     }
 
@@ -1134,7 +1139,7 @@
                         {
                             TaskType = taskType,
                             Data1 = 4,
-                            Data2 = open.temperatureList[tempId]
+                            Data2 = open.temperatureList[tempId]*100
                         };
                         taskList.Add(taskInfo3);
 
@@ -1146,7 +1151,7 @@
                         {
                             TaskType = taskType,
                             Data1 = 5,
-                            Data2 = open.temperatureList[tempId]
+                            Data2 = open.temperatureList[tempId]*100
                         };
                         taskList.Add(taskInfo3);
                     }

--
Gitblit v1.8.0