From 48ba446936b51fffafa7c3600c0dadc6ac0e8c20 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 10 七月 2020 10:52:13 +0800
Subject: [PATCH] 2020-07-10-01

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs
index 225a2aa..1c7e010 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs
@@ -87,7 +87,7 @@
             var btnFinish = new BottomClickButton();
             btnFinish.TextID = R.MyInternationalizationString.uSave;
             bodyFrameLayout.AddChidren(btnFinish);
-            btnFinish.ButtonClickEvent += async (sender, e) =>
+            btnFinish.ButtonClickEvent += (sender, e) =>
             {
                 //璁板綍璧峰綋鍓嶆鍦ㄦ搷浣滅殑鍥炶矾鍚嶅瓧
                 dicDeviceSaveName[nowSelectDevice.DeviceEpoint] = btnDeviceName.Text.Trim();
@@ -106,7 +106,7 @@
                     if (oldName != newName)
                     {
                         //璁惧鍚嶇О淇敼
-                        var result = await Common.LocalDevice.Current.ReName(device, newName);
+                        var result = Common.LocalDevice.Current.ReName(device, newName);
                         if (result == false)
                         {
                             //鍏抽棴
@@ -140,7 +140,7 @@
             listview.AddChidren(btnDeviceName);
             btnDeviceName.InitControl();
             btnDeviceName.AddBottomLine();
-            btnDeviceName.txtInput.FinishInputEvent += async () =>
+            btnDeviceName.txtInput.FinishInputEvent += () =>
             {
                 string oldName = Common.LocalDevice.Current.GetDeviceEpointName(nowSelectDevice);
                 if (btnDeviceName.Text.Trim() == string.Empty)
@@ -151,7 +151,7 @@
                 if (oldName != btnDeviceName.Text.Trim())
                 {
                     //璁惧鍚嶇О淇敼
-                    var result = await Common.LocalDevice.Current.ReName(nowSelectDevice, btnDeviceName.Text.Trim());
+                    var result = Common.LocalDevice.Current.ReName(nowSelectDevice, btnDeviceName.Text.Trim());
                     if (result == false)
                     {
                         return;
@@ -377,12 +377,13 @@
         private NormalViewControl InitDeviceButtonControl(FrameLayout frame, CommonDevice device)
         {
             var btnIcon = new NormalViewControl(this.GetPictrueRealSize(52), this.GetPictrueRealSize(52), false);
-            btnIcon.Text = "Button" + device.DeviceEpoint;
+            btnIcon.Text = "BUTTON" + device.DeviceEpoint;
             btnIcon.TextAlignment = TextAlignment.Center;
             btnIcon.TextColor = UserCenterColor.Current.TextGrayColor1;
+            btnIcon.IsBold = true;
             if (frame is FrameLayoutStatuControl)
             {
-                ((FrameLayoutStatuControl)frame).AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
+                ((FrameLayoutStatuControl)frame).AddChidren(btnIcon, ChidrenBindMode.BindEvent);
                 ((FrameLayoutStatuControl)frame).ButtonClickEvent += (sender, e) =>
                 {
                     //鎸夐敭鐐瑰嚮
@@ -447,7 +448,7 @@
         {
             //鎸夐敭1
             var btnButton1 = this.InitDeviceButtonControl(frameBack, listDevice[0]);
-            btnButton1.TextSize = 12;
+            btnButton1.TextSize = 10;
             btnButton1.Height = this.GetPictrueRealSize(175);
             btnButton1.Width = this.GetPictrueRealSize(183);
             btnButton1.X = this.GetPictrueRealSize(34);
@@ -455,7 +456,7 @@
 
             //鎸夐敭2
             var btnButton2 = this.InitDeviceButtonControl(frameBack, listDevice[1]);
-            btnButton2.TextSize = 12;
+            btnButton2.TextSize = 10;
             btnButton2.Height = this.GetPictrueRealSize(175);
             btnButton2.Width = this.GetPictrueRealSize(183);
             btnButton2.X = btnButton1.Right;
@@ -463,7 +464,7 @@
 
             //鎸夐敭3
             var btnButton3 = this.InitDeviceButtonControl(frameBack, listDevice[2]);
-            btnButton3.TextSize = 12;
+            btnButton3.TextSize = 10;
             btnButton3.Height = this.GetPictrueRealSize(175);
             btnButton3.Width = this.GetPictrueRealSize(183);
             btnButton3.X = btnButton1.X;
@@ -471,7 +472,7 @@
 
             //鎸夐敭4
             var btnButton4 = this.InitDeviceButtonControl(frameBack, listDevice[3]);
-            btnButton4.TextSize = 12;
+            btnButton4.TextSize = 10;
             btnButton4.Height = this.GetPictrueRealSize(175);
             btnButton4.Width = this.GetPictrueRealSize(183);
             btnButton4.X = btnButton2.X;
@@ -541,7 +542,7 @@
             frameButton1.Width = this.GetPictrueRealSize(183);
             frameBack.AddChidren(frameButton1);
             var btnButton1 = this.InitDeviceButtonControl(frameButton1, device1);
-            btnButton1.TextSize = 10;
+            btnButton1.TextSize = 8;
             btnButton1.Height = this.GetPictrueRealSize(35);
             btnButton1.Width = this.GetPictrueRealSize(183);
             btnButton1.Y = this.GetPictrueRealSize(37);
@@ -554,7 +555,7 @@
             frameButton2.Y = frameButton1.Bottom;
             frameBack.AddChidren(frameButton2);
             var btnButton2 = this.InitDeviceButtonControl(frameButton2, device2);
-            btnButton2.TextSize = 10;
+            btnButton2.TextSize = 8;
             btnButton2.Height = btnButton1.Height;
             btnButton2.Width = btnButton1.Width;
             btnButton2.Y = this.GetPictrueRealSize(20);
@@ -588,7 +589,7 @@
             nowContr.TextColor = 0xfffb744a;
 
             nowSelectControl = nowContr;
-            nowSelectDevice = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, Convert.ToInt32(nowContr.Text.Replace("Button", string.Empty)));
+            nowSelectDevice = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, Convert.ToInt32(nowContr.Text.Replace("BUTTON", string.Empty)));
 
             //閲嶆柊鍒濆鍖栬彍鍗曡
             this.InitMenuRow();

--
Gitblit v1.8.0