From 882155f064c6cfa8ccd092ec083c4264eb7b3020 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期二, 10 十二月 2019 17:55:55 +0800 Subject: [PATCH] 2019-12-10-02 --- ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs | 39 ++++++++++++++++++++++----------------- 1 files changed, 22 insertions(+), 17 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs index 6f5d2f0..c40ca3b 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs @@ -1138,24 +1138,26 @@ #endregion int Progressvalue = 100; - horizontalSeekBarVol.OnProgressChangedEvent += (sender, e) => - { - SelectedDeviceStatusaction = "yes"; - Progressvalue = horizontalSeekBarVol.Progress; - if (switchdictionary.ContainsKey("TaskType")) - { - switchdictionary.Remove("TaskType"); - } - if (switchdictionary.ContainsKey("Data1")) - { - switchdictionary.Remove("Data1"); - } - switchdictionary.Add("TaskType", "3"); + EventHandler<int> progressclick = (sender, e) => + { + SelectedDeviceStatusaction = "yes"; + Progressvalue = horizontalSeekBarVol.Progress; + if (switchdictionary.ContainsKey("TaskType")) + { + switchdictionary.Remove("TaskType"); + } + if (switchdictionary.ContainsKey("Data1")) + { + switchdictionary.Remove("Data1"); + } + switchdictionary.Add("TaskType", "3"); //鏈�澶т寒搴﹀�兼槸254闇�瑕佽浆鎹紱 var lightbrightnessvalue = (254 * horizontalSeekBarVol.Progress) / 100; - switchdictionary.Add("Data1", lightbrightnessvalue.ToString()); + switchdictionary.Add("Data1", lightbrightnessvalue.ToString()); - }; + }; + horizontalSeekBarVol.OnProgressChangedEvent += progressclick; + horizontalSeekBarVol.OnStopTrackingTouchEvent += progressclick; ///纭浜嬩欢 EventHandler<MouseEventArgs> openclick = (sender, e) => { @@ -1403,7 +1405,8 @@ #endregion int Progressvalue = 100; - horizontalSeekBarVol.OnProgressChangedEvent += (sender, e) => + + EventHandler<int> progressclick = (sender, e) => { SelectedDeviceStatusaction = "yes"; Progressvalue = horizontalSeekBarVol.Progress; @@ -1419,8 +1422,10 @@ switchdictionary.Add("Data2", horizontalSeekBarVol.Progress.ToString()); }; + horizontalSeekBarVol.OnProgressChangedEvent += progressclick; + horizontalSeekBarVol.OnStopTrackingTouchEvent += progressclick; ///纭浜嬩欢 - EventHandler<MouseEventArgs> openclick = (sender, e) => + EventHandler <MouseEventArgs> openclick = (sender, e) => { SelectedDeviceStatusaction = "yes"; horizontalSeekBarVol.IsClickable = true; -- Gitblit v1.8.0