From 1c7e1305f637ef910ccc5cd691255c34296c846b Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期三, 11 十二月 2019 15:34:53 +0800
Subject: [PATCH] 2019-12-11-1

---
 ZigbeeApp/Shared/Phone/Device/Logic/Send.cs                        |   25 ++++++++++++++++++++++++-
 ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs                  |   15 +++++++--------
 ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs |    6 ++----
 ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs        |    2 +-
 .DS_Store                                                          |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs                |    2 +-
 6 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/.DS_Store b/.DS_Store
index 3d7ff1c..12f3c65 100644
--- a/.DS_Store
+++ b/.DS_Store
Binary files differ
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs b/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs
index 33f3ecc..3ad9a3d 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs
@@ -84,9 +84,9 @@
             middle.AddChidren(textBox);
             textBox.HideSoftInput();
 
-             var btnsave = new Button
+            var btnsave = new Button
             {
-                Y= middle.Height-Application.GetRealHeight(260),
+                Y = middle.Height - Application.GetRealHeight(260),
                 X = Application.GetRealWidth(85),
                 Height = Application.GetRealHeight(130),
                 Width = Application.GetRealWidth(910),
@@ -94,20 +94,19 @@
                 BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
                 TextID = MyInternationalizationString.confrim,
                 TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
-                 TextSize = 16,
-             };
+                TextSize = 16,
+            };
             middle.AddChidren(btnsave);
 
-                     
+
             middle.AddChidren(btnsave);
             btnsave.MouseUpEventHandler += (sender, e) =>
              {
+                 Common.Logic.CurrentLogic.LogicCustomPushText = textBox.Text.Trim();
                  if (Common.Logic.CurrentLogic.LogicId != 0)
                  {
+                     ///鍙敼鎺ㄩ�佸唴瀹癸紱
                      Send.LogicControlSwitch(Common.Logic.CurrentLogic);
-                 }
-                 else {
-                     Send.AddModifyLogic(Common.Logic.CurrentLogic);
                  }
                  RemoveFromParent();
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
index ccfe1f5..e2355c2 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
@@ -244,7 +244,6 @@
                         foolrname.Text = btnfoolrname.Text;
                         flMain.RemoveFromParent();
                         var list = Send.GetRoomList(btnfoolrname.Tag.ToString());
-
                         AllRoomView(list, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol);
                     };
                     foolrRowLayout.MouseUpEventHandler += foolrnameclick;
@@ -285,6 +284,7 @@
         /// </summary>
         void AllRoomView(List<Common.Room> roomlist, List<DeviceType> deviceTypeList, HorizontalScrolViewLayout roomhorizontalScrol, HorizontalScrolViewLayout devicetypehorizontalScrol)
         {
+            
             for (int i = 0; i < roomlist.Count; i++)
             {
                 var room = roomlist[i];
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs
index b5bd6bb..0185dc3 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs
@@ -697,6 +697,7 @@
             };
             flMain.AddChidren(devicefra);
             devicefra.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+
             #region  -------鍙栨秷   瀹屾垚
             var timetype = new RowLayout
             {
@@ -746,7 +747,6 @@
             };
             timetype.AddChidren(Btncomplete);
             #endregion
-
 
             string SelectedDeviceStatusaction = "no";
             actionsInfo.Add("LinkType", 0);
@@ -1141,7 +1141,7 @@
                         #endregion
 
                         int Progressvalue = 100;
-                      EventHandler<int> progressclick = (sender, e) =>
+                        EventHandler<int> progressclick = (sender, e) =>
                         {
                             SelectedDeviceStatusaction = "yes";
                             Progressvalue = horizontalSeekBarVol.Progress;
@@ -1745,7 +1745,6 @@
                         }
                     }
                     break;
-
                 case DeviceType.Thermostat:
                     {
 
@@ -2070,7 +2069,6 @@
 
 
             }
-
             Btncomplete.MouseUpEventHandler += (sender, e) =>
             {
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
index 15ca0f0..21c171d 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -711,8 +711,31 @@
         public static List<Common.Room> GetRoomList(string floorId)
         {
             return Common.Room.Lists.FindAll((obj) => obj.FloorId == floorId);
-
+            //var list1 = new List<Common.Room>();
+            /////鎵惧埌鏌愭ゼ灞傛埧闂村垪琛紱
+            //var list = Common.Room.Lists.FindAll((obj) => obj.FloorId == floorId);
+            //for (int i = 0; i < list.Count; i++)
+            //{
+            //    if (str == "device")
+            //    {
+            //        if (list[i].DeviceUIList.Count != 0)
+            //        {   ///杩囨护鎺夋病鏈夎澶囩殑鎴块棿
+            //            list1.Add(list[i]);
+            //        }
+            //    }
+            //    else
+            //    {
+            //        if (list[i].SceneUIList.Count != 0)
+            //        {   ///杩囨护鎺夋病鏈夊満鏅殑鎴块棿
+            //            list1.Add(list[i]);
+            //        }
+            //    }
+            //}
+            /////杩斿洖鎴块棿鍒楄〃锛�
+            //return list1;
         }
+
+       
         #endregion
 
         #region  ----鑾峰彇闂ㄩ攣
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
index b09b3cf..5ee0d16 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
@@ -139,7 +139,7 @@
             logicTextBox = new EditText
             {
                 Y = Application.GetRealHeight(35),
-                Width = Application.GetRealWidth(900),
+                Width = Application.GetRealWidth(1080 - 58 - 300),
                 Height = Application.GetRealHeight(60),
                 X = text.Right,
                 TextAlignment = TextAlignment.CenterLeft,

--
Gitblit v1.8.0