From dee21bf452a8979d0515d13e534fbb69ed9715dd Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期二, 01 九月 2020 15:33:13 +0800
Subject: [PATCH] 上传一个版本

---
 ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs |   51 +++++++++++++++++++++++++--------------------------
 1 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs
index 5ce1f29..1292f36 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs
@@ -318,44 +318,39 @@
                         Send.dictionary(brightnessDictionary, "Data2", "0");
                         Button seekIconBtn = new Button
                         {
-                            Y = Application.GetRealHeight(140 + 154),
+                            Y = Application.GetRealHeight(140 + 160),
                             X = Application.GetRealWidth(78),
                             Height = Application.GetRealHeight(12),
-                            Width = Application.GetRealWidth(918),
+                            Width = Application.GetRealWidth(918 - 120),
                             UnSelectedImagePath = "ZigeeLogic/seek.png",
+                            Gravity = Gravity.CenterHorizontal
                         };
-                        completeView.Show(2).AddChidren(seekIconBtn);
-                        var horizontalSeekBarVol = new DiyImageSeekBar
-                        {
-                            Y = Application.GetRealHeight(140),
-                            X = Application.GetRealWidth(78),
-                            Width = Application.GetRealWidth(918),
-                            Height = Application.GetRealHeight(320),//婊戝姩鏉$埗鎺т欢楂樺害
-                            IsProgressTextShow = true,//鏄剧ず鐧惧垎姣�
-                            IsClickable = true,//杩涘害鏉℃槸鍚︽粦鍔�
-                            ProgressBarColor = 0x00000000,// ZigbeeColor.Current.LogicProgressColorSelected,//閫変腑杩涘害鏉¢鑹�
-                            SeekBarBackgroundColor = 0x00000000,
-                            ThumbImagePath = "ZigeeLogic/progressbtn2.png",//杩涘害鏉℃寜閽浘鏍�
-                            ThumbImageHeight = Application.GetRealHeight(89),//杩涘害鏉℃寜閽浘鏍囩殑楂樺害锛堥粯璁ゆ鏂瑰舰锛氬鍜岄珮涓�鏍凤級
-                            ProgressTextColor = ZigbeeColor.Current.LogicBtnCancelColor,
-                            ProgressTextSize = 9,//鏄剧ず鐧惧垎姣斿瓧浣撳ぇ灏�12
-                            SeekBarViewHeight = Application.GetRealHeight(12),//杩涘害鏉$殑楂樺害10
-                            MinValue = 30,
-                            MaxValue = 60,
-                            ProgressBarUnitSring = "K",//鍒囨崲鍗曚綅
-                        };
+                        completeView.Show(2).AddChidren(seekIconBtn);
+                       
+                        var horizontalSeekBarVol = new UserCenter.SeekBarControl(918)
+                        {
+                            ProgressBarColor = 0x00000000,// ZigbeeColor.Current.LogicProgressColorSelected,//閫変腑杩涘害鏉¢鑹�
+                            SeekBarBackgroundColor = 0x00000000,
+                            SeekBarViewHeight = Application.GetRealHeight(20),
+                            SeekBarPadding = Application.GetRealWidth(60),
+                            MinValue = 30,
+                            MaxValue = 60,
+                            ProgressChangeDelayTime = 0,
+                        };
                         completeView.Show(2).AddChidren(horizontalSeekBarVol);
+                        horizontalSeekBarVol.Y = seekIconBtn.Y - (horizontalSeekBarVol.Height - seekIconBtn.Height) / 2;
+                        horizontalSeekBarVol.ShowCustomTextView(Application.GetRealWidth(200), 12, ZigbeeColor.Current.LogicBtnCancelColor);
                         EventHandler<int> progressclick = (sender, e) =>
                         {
+                            horizontalSeekBarVol.SetCustomText(e * 100 + "K");
                             selectedDeviceStatus = "8";
                             var lightbrightnessvalue = 1000000 / (100 * horizontalSeekBarVol.Progress);
                             Send.dictionary(brightnessDictionary, "Data1", lightbrightnessvalue.ToString());
                             DicValue("8", brightnessDictionary);
-                            status = horizontalSeekBarVol.Progress.ToString() + "K";
+                            status =horizontalSeekBarVol.Progress.ToString() + "K";
                         };
                         horizontalSeekBarVol.OnProgressChangedEvent += progressclick;
                         horizontalSeekBarVol.OnStopTrackingTouchEvent += progressclick;
-
 
                         if (TaskList != null && TaskList.Count != 0)
                         {
@@ -365,12 +360,16 @@
                                 {
                                     var intvalue = int.Parse(value["Data1"]);
                                     var lightbrightnessvalue = 1000000 / (intvalue * 100);
-                                    horizontalSeekBarVol.Progress = lightbrightnessvalue;
+                                    horizontalSeekBarVol.Progress = lightbrightnessvalue;
+
                                     break;
                                 }
 
                             }
-                        }
+                        }
+                        var intValue = horizontalSeekBarVol.Progress;
+                        if (intValue == 0) { intValue = 30; }
+                        horizontalSeekBarVol.SetCustomText(intValue * 100 + "K");
                     }
                     break;
                 case "铚傞福鍣�":

--
Gitblit v1.8.0