From ecba45c93391066bc30c7bd602c3a7683fbb99a7 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 31 七月 2020 10:56:12 +0800
Subject: [PATCH] 临时备份

---
 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceMiniLightDetailCardForm.cs |   53 +++++++++++++----------------------------------------
 1 files changed, 13 insertions(+), 40 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceMiniLightDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceMiniLightDetailCardForm.cs
index 3634885..a4001f1 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceMiniLightDetailCardForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceMiniLightDetailCardForm.cs
@@ -132,7 +132,6 @@
             seekBarColor.SeekBarPadding = Application.GetRealWidth(60);
             seekBarColor.IsProgressTextShow = true;
             seekBarColor.ProgressBarColor = UserCenterColor.Current.Transparent;
-            seekBarColor.ProgressBarUnEnableColor = UserCenterColor.Current.Transparent;
             seekBarColor.SeekBarBackgroundColor = UserCenterColor.Current.Transparent;
             seekBarColor.ProgressTextSize = 14;
             seekBarColor.ProgressTextColor = UserCenterColor.Current.TextGrayColor2;
@@ -162,7 +161,6 @@
             this.btnBuzzerSwitch = new IconBigViewControl(81, 81);
             btnBuzzerSwitch.UnSelectedImagePath = "Item/Switch.png";
             btnBuzzerSwitch.SelectedImagePath = "Item/SwitchSelected.png";
-            btnBuzzerSwitch.IsSelected = ((ColorTemperatureLight)this.device).IsBuzzerRing;
             frameWhiteBack.AddChidren(btnBuzzerSwitch);
             btnBuzzerSwitch.InitControl();
             btnBuzzerSwitch.UseClickStatu = false;
@@ -202,12 +200,6 @@
             };
             btnMiniSwitch.IsSelected = ((LightBase)this.device).OnOffStatus == 1;
             this.canSetProgressValue = btnMiniSwitch.IsSelected;
-            if (btnMiniSwitch.IsSelected == false)
-            {
-                //鍦ㄦ病鏈夋墦寮�澶滅伅寮�鍏充箣鍓�,涓嶅厑璁告粦鍔�
-                seekBarLight.Enable = false;
-                seekBarColor.Enable = false;
-            }
 
             //浜害寮�濮嬫粦鍔ㄧ殑浜嬩欢
             seekBarLight.OnStartTrackingTouchEvent += (sender, e) =>
@@ -355,13 +347,7 @@
                          {
                              //褰撴槸鎵撳紑鐘舵�佹椂,缃戝叧璇村畠浼氶粯璁ゆ妸浜害鍙樻垚100%
                              //浠ラ槻涓囦竴,杩欓噷鍐嶆璇诲彇涓�涓�
-                             HdlThreadLogic.Current.RunThread(() =>
-                             {
-                                 ((ColorTemperatureLight)device).ReadLevel();
-                                 System.Threading.Thread.Sleep(300);
-                                 ((ColorTemperatureLight)device).ReadColorTemperature();
-                             });
-
+                             ((ColorTemperatureLight)device).ReadLevel();
                          }
                      }
                  });
@@ -393,23 +379,24 @@
             //濡傛灉浣忓畢鏄櫄鎷熶綇瀹�
             if (Common.Config.Instance.Home.IsVirtually == true)
             {
-                ((ColorTemperatureLight)this.device).IsBuzzerRing = isOpen;
-                //鍒锋柊寮�鍏崇姸鎬�
-                this.RefreshSwitchStatu(isOpen);
+                //((LightBase)this.device).OnOffStatus = isOpen == true ? 1 : 0;
+                ////鍒锋柊寮�鍏崇姸鎬�
+                //this.RefreshSwitchStatu(isOpen);
                 return;
             }
 
             //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅
-            this.btnBuzzerSwitch.CanClick = false;
-            this.StartCheckResponeResult(new List<ButtonBase>(), (result) =>
+            this.StartCheckResponeResult(new List<ButtonBase> { this.btnBuzzerSwitch.btnIcon }, (result) =>
             {
                 HdlThreadLogic.Current.RunMain(() =>
                 {
                     //鎺ユ敹鍒扮綉鍏冲洖澶�
-                    this.btnBuzzerSwitch.CanClick = true;
                     if (result == true)
                     {
                         this.btnBuzzerSwitch.IsSelected = isOpen;
+                        //bool statu = ((LightBase)this.device).OnOffStatus == 1;
+                        ////鍒锋柊寮�鍏崇姸鎬�
+                        //this.RefreshSwitchStatu(statu);
                     }
                 });
             });
@@ -476,13 +463,11 @@
         /// <param name="isOpen">鎵撳紑鐘舵��</param>
         private void RefreshSwitchStatu(bool isOpen)
         {
-            //鍒锋柊铚傞福鍣ㄥ紑鍏崇姸鎬�
-            bool isBuzzerRing = ((ColorTemperatureLight)this.device).IsBuzzerRing;
-            if (this.btnBuzzerSwitch.IsSelected != isBuzzerRing)
+            if (this.isColorProgressing == true)
             {
-                this.btnBuzzerSwitch.IsSelected = isBuzzerRing;
+                //濡傛灉鏄壊娓╂粦鍔ㄧ殑璇�,涓嶉渶瑕佸埛鏂扮晫闈�
+                return;
             }
-
             if (isOpen == true)
             {
                 //浜害鏄繀椤昏鍒锋柊鐨�  浜害 XX
@@ -497,25 +482,13 @@
                     //褰撹繘搴﹀�煎湪鎵嬪姩鍙樻洿涓椂,涓嶆帴鏀舵帹閫�
                     seekBarColor.Progress = (int)(((ColorTemperatureLight)this.device).ColorTemperature / 100);
                 }
-                if (this.btnMiniSwitch.IsSelected == false)
-                {
-                    this.btnMiniSwitch.IsSelected = true;
-                }
-                //婊戝姩鏉″彲浠ユ粦鍔�
-                seekBarLight.Enable = true;
-                seekBarColor.Enable = true;
+                this.btnMiniSwitch.IsSelected = true;
             }
             else
             {
                 //鍙樻洿瀛楁牱:鍏抽棴
                 this.SetStatuText(Language.StringByID(R.MyInternationalizationString.Close));
-                if (this.btnMiniSwitch.IsSelected == true)
-                {
-                    this.btnMiniSwitch.IsSelected = false;
-                }
-                //婊戝姩鏉′笉鍙互婊戝姩
-                seekBarLight.Enable = false;
-                seekBarColor.Enable = false;
+                this.btnMiniSwitch.IsSelected = false;
             }
 
             //鍥炲鐨勭粨鏋滆,澶勪簬鎵撳紑鐘舵�佹墠鑳藉彂閫�

--
Gitblit v1.8.0