From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28

---
 ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs |   40 +++++++++++++++++++++++++++-------------
 1 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs
old mode 100755
new mode 100644
index 4f9dd8f..c6c8597
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs
@@ -27,7 +27,7 @@
         /// <summary>
         /// SeekBar
         /// </summary>
-        public HorizontalSeekBar SeekBar;
+        public DiyImageSeekBar SeekBar;
         /// <summary>
         /// SeekBarTitle
         /// </summary>
@@ -84,6 +84,7 @@
                 Height = Application.GetRealHeight(80),
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                 TextAlignment = TextAlignment.CenterLeft,
+                TextSize=14
             };
             AddChidren(NameBtn);
 
@@ -103,17 +104,20 @@
             };
             AddChidren(ClickButton);
 
-            SeekBar = new HorizontalSeekBar()
+            SeekBar = new DiyImageSeekBar()
             {
                 X = Application.GetRealWidth(81),
                 Y = Application.GetRealHeight(200),
                 Width = Application.GetRealWidth(919),
                 Height = Application.GetRealHeight(127),
-                BackgroundColor = ZigbeeColor.Current.GXCSeekBarBackground,
-                ProgressColor = ZigbeeColor.Current.GXCProgressColor,
-                ThumbColor = ZigbeeColor.Current.GXCBackgroundColor,
-                Max = MaxLevel,
-                Progress = max
+                ProgressBarColor = ZigbeeColor.Current.GXCProgressColor,
+                MaxValue = MaxLevel,
+                Progress = MaxLevel,
+                IsProgressTextShow = false,
+                IsClickable = true,
+                ThumbImageHeight=Application.GetMinRealAverage(80),
+                SeekBarViewHeight=Application.GetRealHeight(6),
+                ThumbImagePath="Item/SeekBarIcon.png"
             };
             AddChidren(SeekBar);
 
@@ -123,18 +127,20 @@
                 Height = Application.GetRealHeight(50),
                 Width = Application.GetRealWidth(200),
                 Gravity = Gravity.CenterHorizontal,
-                Text = $"{SeekBar.Progress} %",
-                TextColor = ZigbeeColor.Current.GXCTextGrayColor
+                Text = $"{(int)(SeekBar.Progress * 1.0 / MaxLevel * 100)} %",
+                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+                TextSize = 12,
+                IsBold = true
             };
             AddChidren(SeekBarTitle);
 
             line = new Button()
             {
                 X = Application.GetRealWidth(81),
-                Y = this.Height - 2,
+                Y = this.Height - 1,
                 Width = Application.GetRealWidth(919),
-                Height = 2,
-                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor,
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2,
             };
             AddChidren(line);
 
@@ -162,6 +168,14 @@
         public void SetStatu(bool statu)
         {
             SelectBtn.Visible = statu;
+            if(statu)
+            {
+                SetSeekBarProgress(SeekBar.Progress == 0 ? MaxLevel : SeekBar.Progress);
+            }
+            else
+            {
+                SetSeekBarProgress(0);
+            }
         }
 
         /// <summary>
@@ -185,7 +199,7 @@
         /// SetProgress
         /// </summary>
         /// <param name="progress"></param>
-        public void SetProgress(int progress)
+        public void SetSeekBarProgress(int progress)
         {
             SeekBar.Progress = progress;
             SetSeekBarTitle();

--
Gitblit v1.8.0