From 944b87b6bcccb095cd73f13f4410fb20faf48f74 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期三, 25 十二月 2019 11:21:06 +0800
Subject: [PATCH] 2019.12.25

---
 ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs |  335 ++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 204 insertions(+), 131 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs
index b54dac8..40723c9 100644
--- a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs
@@ -3,6 +3,7 @@
 using Shared.Common;
 using Shared.Phone.Device.CommonForm;
 using Shared.Phone.UserView;
+using ZigBee.Device;
 
 namespace Shared.Phone.Device.Category
 {
@@ -56,11 +57,11 @@
         /// <summary>
         /// 璁惧绫诲瀷RowLayout
         /// </summary>
-        private FrameLayout typeRowLayout;
+        //private FrameLayout typeRowLayout;
         /// <summary>
         /// 鍔熻兘绫诲瀷鎸夐挳
         /// </summary>
-        private FunctionButton functionTypeIMG;
+        //private FunctionButton functionTypeIMG;
         /// <summary>
         /// 娓╁害
         /// </summary>
@@ -74,9 +75,28 @@
         /// </summary>
         private int fanid;
 
+        /// <summary>
+        /// dList
+        /// </summary>
+        private List<DeviceUI> devList;
+        /// <summary>
+        /// 鐩稿悓绫诲瀷鐨勮澶囧垪琛�
+        /// </summary>
+        private Dictionary<int, List<DeviceUI>> typeDeviceDic;
+        /// <summary>
+        /// 璁惧绫诲瀷鐨勫浘id
+        /// </summary>
+        private Dictionary<int, DeviceConcreteType> typeIdDic;
+        /// <summary>
+        /// 褰撳墠閫変腑鎴块棿
+        /// </summary>
+        private Common.Room curRoom;
 
         #endregion
 
+        /// <summary>
+        /// RemoveFromParent
+        /// </summary>
         public override void RemoveFromParent()
         {
             HomePage.Instance.ScrollEnabled = true;
@@ -96,6 +116,8 @@
         /// </summary>
         public void Show()
         {
+            InitData();
+
             if (sceneTargetDevice == null)
             {
                 sceneTargetDevice = new SceneTargetDeviceUI { Type = 0 };
@@ -104,9 +126,50 @@
 
             AddBodyView();
 
-            RefreshBodyView();
+            RefreshBodyView(Config.Instance.Home.CurrentFloorId);
         }
 
+        /// <summary>
+        /// InitData
+        /// </summary>
+        private void InitData()
+        {
+            typeDeviceDic = new Dictionary<int, List<DeviceUI>> { };
+            typeIdDic = new Dictionary<int, DeviceConcreteType> { };
+        }
+
+        /// <summary>
+        /// RefreshData
+        /// </summary>
+        private void RefreshData(Common.Room room)
+        {
+            devList = room.DeviceUIList;
+            typeDeviceDic.Clear();
+            typeIdDic.Clear();
+            foreach (var device in devList)
+            {
+                var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device.CommonDevice });
+                if (info.BeloneType == DeviceBeloneType.A寮�鍏� || info.BeloneType == DeviceBeloneType.A褰╃伅
+                    || info.BeloneType == DeviceBeloneType.A鎻掑骇 || info.BeloneType == DeviceBeloneType.A鏅鸿兘绌哄紑
+                    || info.BeloneType == DeviceBeloneType.A鐏厜 || info.BeloneType == DeviceBeloneType.A绌鸿皟
+                    || info.BeloneType == DeviceBeloneType.A绐楀笜 || info.BeloneType == DeviceBeloneType.A缁х數鍣�
+                    || info.BeloneType == DeviceBeloneType.A璋冨厜鍣� 
+                    )
+                {
+                    if (typeDeviceDic.ContainsKey(info.BeloneTextId) == false)
+                    {
+                        var sameDevList = new List<DeviceUI> { };
+                        sameDevList.Add(device);
+                        typeDeviceDic[info.BeloneTextId] = sameDevList;
+                    }
+                    else
+                    {
+                        typeDeviceDic[info.BeloneTextId].Add(device);
+                    }
+                    typeIdDic[info.BeloneTextId] = info.ConcreteType;
+                }
+            }
+        }
 
         #region Add____________________________________
         /// <summary>
@@ -117,7 +180,7 @@
             var top = new TopFrameLayout();
             AddChidren(top);
             top.InitTopview();
-            top.SetTopTitle(R.MyInternationalizationString.AddScence);
+            top.SetTopTitle(R.MyInternationalizationString.AddFunction);
             top.backButton.MouseUpEventHandler += (sender, e) =>
             {
                 RemoveFromParent();
@@ -131,6 +194,8 @@
                 Gravity = Gravity.CenterVertical,
                 TextAlignment = TextAlignment.CenterRight,
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                TextSize=14,
+                IsBold=true
             };
 
             selectFloorBtn = new Button()
@@ -162,10 +227,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 +252,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()
             {
@@ -210,54 +275,44 @@
             functionSceneBodyView = new FrameLayout()
             {
                 Y = roomFL.Bottom,
-                Height = Application.GetRealHeight(910 + 622),
+                Height = Application.GetRealHeight(279+35+1218),
                 BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
             };
             bodyFrameLayout.AddChidren(functionSceneBodyView);
 
-            Button curBtn = new Button();
-            foreach (var room in Common.Room.CurrentRoom.GetRoomsByCurrentFloorIdAppendLoveRoom())
+            RoomButton curBtn = new RoomButton(0, 0);
+            foreach (var room in Common.Room.CurrentRoom.GetRoomsByFloorIdAppendLoveRoom(floorId))
             {
                 var row = new FrameLayout()
                 {
-                    Width = Application.GetRealWidth(187 + 50),
-                    Height = Application.GetRealHeight(204),
+                    Width = Application.GetRealWidth(255),
+                    Height = Application.GetRealHeight(167)
                 };
                 roomFL.AddChidren(row);
 
-                var roomBtn = new Button()
-                {
-                    Width = Application.GetRealWidth(187),
-                    Height = Application.GetRealHeight(78),
-                    Radius = (uint)Application.GetRealHeight(78 / 2),
-                    Gravity = Gravity.Center,
-                    Text = room.Name,
-                    TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                    SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor3,
-                    SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor,
-                    BorderColor = ZigbeeColor.Current.GXCBorderUnSelectedColor,
-                    BorderWidth = 1
-                };
+                RoomButton roomBtn = new RoomButton(0, 0);
+                roomBtn.Gravity = Gravity.Center;
+                roomBtn.Init();
+                roomBtn.SetTitle(room.Name);
                 row.AddChidren(roomBtn);
 
                 if (room.IsLove)
                 {
                     roomBtn.IsSelected = true;
                     curBtn = roomBtn;
-
+                    this.curRoom = room;
                     RefreshFunction(room);
                 }
-                roomBtn.MouseUpEventHandler += (sender, e) =>
+                roomBtn.ButtonClickEvent += (sender, e) =>
                 {
-                    if ((sender as Button) == curBtn)
+                    if (sender == curBtn)
                     {
                         return;
                     }
-                    (sender as Button).IsSelected = true;
+                    sender.IsSelected = true;
                     curBtn.IsSelected = false;
-                    curBtn = sender as Button;
-
+                    curBtn = sender;
+                    this.curRoom = room;
                     RefreshFunction(room);
                 };
             }
@@ -275,111 +330,130 @@
         /// <param name="room"></param>
         private void RefreshFunction(Common.Room room)
         {
+            RefreshData(room);
             functionSceneBodyView.RemoveAll();
 
-            if (room.DeviceUIList.Count == 0)
+            if (typeDeviceDic.Count == 0)
             {
                 ShowNoFunctionTip();
             }
             else
             {
+                var functionTypeView1 = new FrameLayout
+                {
+                    X = Application.GetRealWidth(CommonFormResouce.X_Left),
+                    Height = Application.GetRealHeight(160),
+                    Width = Application.GetRealWidth(1028),
+                    BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+                };
+                functionSceneBodyView.AddChidren(functionTypeView1);
+                functionTypeView1.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft);
+
+                var functionTypeView2 = new FrameLayout
+                {
+                    X = Application.GetRealWidth(CommonFormResouce.X_Left),
+                    Y = Application.GetRealHeight(150),
+                    Height = Application.GetRealHeight(279 - 150),
+                    Width = Application.GetRealWidth(1028),
+                    BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+                };
+                functionSceneBodyView.AddChidren(functionTypeView2);
+                functionTypeView2.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerBottomLeft);
+
                 functionTypeScrowView = new HorizontalScrolViewLayout
                 {
                     X = Application.GetRealWidth(CommonFormResouce.X_Left),
                     Height = Application.GetRealHeight(279),
-                    Width = Application.GetRealWidth(1028),
-                    BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+                    Width = Application.GetRealWidth(1028)
                 };
                 functionSceneBodyView.AddChidren(functionTypeScrowView);
 
                 deviceListScrolView = new VerticalScrolViewLayout
                 {
                     X = Application.GetRealWidth(CommonFormResouce.X_Left),
-                    Y = functionTypeScrowView.Bottom + Application.GetRealHeight(50),
+                    Y = Application.GetRealHeight(35 + 275),
                     Width = Application.GetRealWidth(1028),
-                    Height = functionSceneBodyView.Height - Application.GetRealHeight(279 + 50) - 1,
+                    Height = Application.GetRealHeight(1218),
                     BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
                 };
                 functionSceneBodyView.AddChidren(deviceListScrolView);
+                deviceListScrolView.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
+
                 tempFunctionTypeBtn = new FunctionButton();
+                tempFunctionTypeBtn.Init("","");
 
-                EventHandler<MouseEventArgs> ShowSameTypeFunction = (object typeSender, MouseEventArgs mouseEventArgs) =>
+                foreach (var deviceType in typeIdDic)
                 {
-                    tempFunctionTypeBtn.IsSelected = false;
-                    tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton;
-                    ((typeSender as Button).Parent as FunctionButton).IsSelected = true;
-
-                    deviceListScrolView.RemoveAll();
-
-                    var sameTypeList = new List<DeviceUI> { };
-                    foreach (var devieceUI in room.DeviceUIList)
+                    var typeRowLayout = new FrameLayout()
                     {
-                        if (devieceUI == null || devieceUI.CommonDevice == null)
-                        {
-                            continue;
-                        }
-                        if (devieceUI.CommonDevice.Type.ToString() == (typeSender as Button).Tag.ToString())
-                        {
-                            if (!sameTypeList.Contains(devieceUI))
-                            {
-                                sameTypeList.Add(devieceUI);
-                            }
-                        }
-                    }
-                    foreach (var device in sameTypeList)
-                    {
-                        if (beforeSceneTargetDeviceUIs.Find((obj) => obj.DeviceUI.DeviceEpoint == device.DeviceEpoint && obj.DeviceUI.DeviceAddr == device.DeviceAddr) != null)
-                        {
-                            continue;
-                        }
-                        var deviceTypeRowLayout = new FrameLayout()
-                        {
-                            Height = Application.GetRealHeight(127 + 35),
-                            Tag = device
-                        };
-                        deviceListScrolView.AddChidren(deviceTypeRowLayout);
-
-                        var deviceRow = new FunctionRow(0, 35);
-                        deviceTypeRowLayout.AddChidren(deviceRow);
-                        deviceRow.Init(device.IconPath, device.OnlineIconPath,true);
-                        deviceRow.SetTitle(device.CommonDevice.DeviceEpointName);
-                        deviceRow.SetStatu(device.CommonDevice.IsOnline == 1);
-                        deviceRow.HideSwitchBtn(false);
-
-                        deviceRow.ClickBtn.MouseUpEventHandler += (sender, e) =>
-                        {
-                            ShowSelectAction(device, sceneTargetDevice);
-                        };
-                    }
-                };
-
-                foreach (var deviceType in Common.Room.GetdeviceTypes(room))
-                {
-                    typeRowLayout = new FrameLayout()
-                    {
-                        Width = Application.GetRealWidth(CommonPage.AppRealWidth / 5),
-                        Tag = deviceType
+                        Width = Application.GetRealWidth(220),
                     };
                     functionTypeScrowView.AddChidren(typeRowLayout);
 
-                    functionTypeIMG = new FunctionButton()
+                    var functionTypeIMG = new FunctionButton()
                     {
-                        Tag = deviceType
+                        Tag = deviceType.Key
                     };
-                    functionTypeIMG.Init(DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType), DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType));
-                    functionTypeIMG.SetTitle(DeviceUI.GetDeviceTypeName(deviceType));
+                    string imgPath = string.Empty;
+                    string imgSeletedPath = string.Empty;
+                    Common.LocalDevice.Current.GetDeviceBeloneIcon(deviceType.Value, ref imgPath, ref imgSeletedPath);
+                    functionTypeIMG.Init(imgPath, imgSeletedPath);
+                    functionTypeIMG.SetTitle(deviceType.Key);
                     typeRowLayout.AddChidren(functionTypeIMG);
 
                     functionTypeIMG.ClickBtn.MouseUpEventHandler += ShowSameTypeFunction;
 
-
-                    if (deviceType == room.DeviceUIList[0].CommonDevice.Type)
+                    if (functionTypeScrowView.ChildrenCount == 1)
                     {
-                        ShowSameTypeFunction(functionTypeIMG.ClickBtn, null);
+                        ShowSameTypeFunction(functionTypeIMG.ImageBtn, null);
                     }
                 }
             }
         }
+
+        /// <summary>
+        /// 鏄剧ず鐩稿悓绫诲瀷鐨勫姛鑳�
+        /// </summary>
+        /// <param name="typeSender">typeSender.</param>
+        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
+        private void ShowSameTypeFunction(object typeSender, MouseEventArgs mouseEventArgs)
+        {
+            tempFunctionTypeBtn.IsSelected = false;
+            tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton;
+            ((typeSender as Button).Parent as FunctionButton).IsSelected = true;
+
+            deviceListScrolView.RemoveAll();
+
+            var sameTypeList = new List<DeviceUI> { };
+            sameTypeList = typeDeviceDic[int.Parse((typeSender as Button).Tag.ToString())];
+            
+            foreach (var device in sameTypeList)
+            {
+                if (beforeSceneTargetDeviceUIs.Find((obj) => obj.DeviceUI.DeviceEpoint == device.DeviceEpoint && obj.DeviceUI.DeviceAddr == device.DeviceAddr) != null)
+                {
+                    continue;
+                }
+                var deviceTypeRowLayout = new FrameLayout()
+                {
+                    Height = Application.GetRealHeight(127 + 35),
+                    Tag = device
+                };
+                deviceListScrolView.AddChidren(deviceTypeRowLayout);
+
+                var deviceRow = new FunctionRow(0, 35);
+                deviceTypeRowLayout.AddChidren(deviceRow);
+                deviceRow.Init(device.IconPath, device.OnlineIconPath, true);
+                deviceRow.SetTitle(device.CommonDevice.DeviceEpointName);
+                deviceRow.IsSelected = true;
+                deviceRow.HideSwitchBtn(false);
+
+                deviceRow.ClickBtn.MouseUpEventHandler += (sender, e) =>
+                {
+                    ShowSelectAction(device, sceneTargetDevice);
+                };
+            }
+        }
+
 
         /// <summary>
         /// 鎻愮ず娌℃湁鍔熻兘
@@ -402,7 +476,7 @@
                 Height = Application.GetRealHeight(200),
                 Width = Application.GetRealWidth(700),
                 Gravity = Gravity.CenterHorizontal,
-                Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}", "\r\n"),
+                Text = Language.StringByID(R.MyInternationalizationString.NoFunction_Tip).Replace("{\\r\\n}", "\r\n"),
                 TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                 TextAlignment = TextAlignment.Center,
                 IsMoreLines = true
@@ -463,11 +537,12 @@
                 Height = Application.GetRealHeight(530),
             };
             dialog.AddChidren(selectFL);
+            //selectFL.Animate = Animate.DownToUp;
 
             var titleBG = new FrameLayout
             {
                 Height = Application.GetRealHeight(138 * 2),
-                Radius = (uint)Application.GetRealHeight(20),
+                Radius = (uint)Application.GetRealHeight(58),
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
             };
             selectFL.AddChidren(titleBG);
@@ -491,7 +566,7 @@
                 X = Application.GetRealWidth(80),
                 Width = Application.GetRealWidth(200),
                 TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                TextSize = 15,
+                TextSize = 14,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextID = R.MyInternationalizationString.Cancel
             };
@@ -502,8 +577,7 @@
                 Width = Application.GetRealWidth(400),
                 Gravity = Gravity.CenterHorizontal,
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextSize = 15,
-                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = 16,
                 Text = device.CommonDevice.DeviceEpointName
             };
             titleFL.AddChidren(deviceName);
@@ -513,7 +587,7 @@
                 X = Application.GetRealWidth(800),
                 Width = Application.GetRealWidth(200),
                 TextColor = ZigbeeColor.Current.GXCTextSelectedColor2,
-                TextSize = 15,
+                TextSize = 14,
                 TextAlignment = TextAlignment.CenterRight,
                 TextID = R.MyInternationalizationString.Complete
             };
@@ -619,11 +693,12 @@
                 Height = Application.GetRealHeight(752),
             };
             dialog.AddChidren(selectFL);
+            //selectFL.Animate = Animate.DownToUp;
 
             var titleBG = new FrameLayout
             {
                 Height = Application.GetRealHeight(138 * 2),
-                Radius = (uint)Application.GetRealHeight(20),
+                Radius = (uint)Application.GetRealHeight(58),
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
             };
             selectFL.AddChidren(titleBG);
@@ -647,7 +722,7 @@
                 X = Application.GetRealWidth(80),
                 Width = Application.GetRealWidth(200),
                 TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                TextSize = 15,
+                TextSize = 14,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextID = R.MyInternationalizationString.Cancel
             };
@@ -658,8 +733,7 @@
                 Width = Application.GetRealWidth(400),
                 Gravity = Gravity.CenterHorizontal,
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextSize = 15,
-                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = 16,
                 Text = device.CommonDevice.DeviceEpointName
             };
             titleFL.AddChidren(deviceName);
@@ -669,7 +743,7 @@
                 X = Application.GetRealWidth(800),
                 Width = Application.GetRealWidth(200),
                 TextColor = ZigbeeColor.Current.GXCTextSelectedColor2,
-                TextSize = 15,
+                TextSize = 14,
                 TextAlignment = TextAlignment.CenterRight,
                 TextID = R.MyInternationalizationString.Complete
             };
@@ -722,7 +796,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 +805,7 @@
                 {
                     open.IsSelected = true;
                     shut.IsSelected = false;
-                    open.SetProgress(sceneTarget.TaskList[0].Data1);
+                    open.SetProgress(sceneTarget.TaskList[0].Data2);
                 }
             }
 
@@ -746,14 +820,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,11 +858,12 @@
                 Height = Application.GetRealHeight(752),
             };
             dialog.AddChidren(selectFL);
+            //selectFL.Animate = Animate.DownToUp;
 
             var titleBG = new FrameLayout
             {
                 Height = Application.GetRealHeight(138 * 2),
-                Radius = (uint)Application.GetRealHeight(20),
+                Radius = (uint)Application.GetRealHeight(58),
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
             };
             selectFL.AddChidren(titleBG);
@@ -812,7 +887,7 @@
                 X = Application.GetRealWidth(80),
                 Width = Application.GetRealWidth(200),
                 TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                TextSize = 15,
+                TextSize = 14,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextID = R.MyInternationalizationString.Cancel
             };
@@ -823,7 +898,7 @@
                 Width = Application.GetRealWidth(400),
                 Gravity = Gravity.CenterHorizontal,
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextSize = 15,
+                TextSize = 16,
                 TextAlignment = TextAlignment.CenterLeft,
                 Text = device.CommonDevice.DeviceEpointName
             };
@@ -834,7 +909,7 @@
                 X = Application.GetRealWidth(800),
                 Width = Application.GetRealWidth(200),
                 TextColor = ZigbeeColor.Current.GXCTextSelectedColor2,
-                TextSize = 15,
+                TextSize = 14,
                 TextAlignment = TextAlignment.CenterRight,
                 TextID = R.MyInternationalizationString.Complete
             };
@@ -949,11 +1024,12 @@
                 Height = Application.GetRealHeight(1106),
             };
             dialog.AddChidren(selectFL);
+            //selectFL.Animate = Animate.DownToUp;
 
             var titleBG = new FrameLayout
             {
                 Height = Application.GetRealHeight(138 * 2),
-                Radius = (uint)Application.GetRealHeight(20),
+                Radius = (uint)Application.GetRealHeight(58),
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
             };
             selectFL.AddChidren(titleBG);
@@ -977,7 +1053,7 @@
                 X = Application.GetRealWidth(80),
                 Width = Application.GetRealWidth(200),
                 TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                TextSize = 15,
+                TextSize = 14,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextID = R.MyInternationalizationString.Cancel
             };
@@ -988,7 +1064,7 @@
                 Width = Application.GetRealWidth(400),
                 Gravity = Gravity.CenterHorizontal,
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextSize = 15,
+                TextSize = 16,
                 TextAlignment = TextAlignment.CenterLeft,
                 Text = device.CommonDevice.DeviceEpointName
             };
@@ -999,7 +1075,7 @@
                 X = Application.GetRealWidth(800),
                 Width = Application.GetRealWidth(200),
                 TextColor = ZigbeeColor.Current.GXCTextSelectedColor2,
-                TextSize = 15,
+                TextSize = 14,
                 TextAlignment = TextAlignment.CenterRight,
                 TextID = R.MyInternationalizationString.Complete
             };
@@ -1074,15 +1150,12 @@
                         }
                         if (tasklist.Data1 == 4 || tasklist.Data1 == 5)
                         {
-                            tempId = open.temperatureList.IndexOf(tasklist.Data2);
+                            tempId = open.temperatureList.IndexOf(tasklist.Data2/100);
                         }
                     }
-
                     open.pickerView.setCurrentItems(tempId, modelId, fanid);
                 }
             }
-
-
 
             comfrimBtn.MouseUpEventHandler = (sender, e) =>
             {
@@ -1134,7 +1207,7 @@
                         {
                             TaskType = taskType,
                             Data1 = 4,
-                            Data2 = open.temperatureList[tempId]
+                            Data2 = open.temperatureList[tempId]*100
                         };
                         taskList.Add(taskInfo3);
 
@@ -1146,7 +1219,7 @@
                         {
                             TaskType = taskType,
                             Data1 = 5,
-                            Data2 = open.temperatureList[tempId]
+                            Data2 = open.temperatureList[tempId]*100
                         };
                         taskList.Add(taskInfo3);
                     }

--
Gitblit v1.8.0