HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2021-01-06 b2f2494386c4629cf0e0f0a3740e7672919d53a2
ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetStatuSelectLightForm.cs
@@ -20,10 +20,6 @@
        /// 动作信息  1 开关/ 3亮度调节
        /// </summary>
        private Dictionary<int, Safeguard.TaskListInfo> dicTaskinfo = new Dictionary<int, Safeguard.TaskListInfo>();
        /// <summary>
        /// 进度条最大值
        /// </summary>
        private int MaxValue = 254;
        #endregion
@@ -135,24 +131,24 @@
            detailBackFrame.AddChidren(btnPersent);
            if (dicTaskinfo.ContainsKey(3) == true)
            {
                btnPersent.Text = ((int)(dicTaskinfo[3].Data1 * 1.0 / MaxValue * 100)) + "%";
                btnPersent.Text = HdlDeviceCommonLogic.Current.CalculateLightLevelPersent(dicTaskinfo[3].Data1) + "%";
            }
            //进度条
            var seekBar = new SeekBarControl(919);
            seekBar.Y = Application.GetRealHeight(268);
            seekBar.ProgressBarColor = 0xfffdb500;
            seekBar.MaxValue = this.MaxValue;
            seekBar.MaxValue = 100;
            seekBar.Enable = false;
            if (dicTaskinfo.ContainsKey(3) == true)
            {
                //3:亮度调节
                seekBar.Progress = dicTaskinfo[3].Data1;
                seekBar.Progress = HdlDeviceCommonLogic.Current.CalculateLightLevelPersent(dicTaskinfo[3].Data1);
            }
            detailBackFrame.AddChidren(seekBar);
            seekBar.ProgressChangedEvent += (div, value) =>
            {
                btnPersent.Text = ((int)(value * 1.0 / MaxValue * 100)) + "%";
                btnPersent.Text = value + "%";
            };
            //线
@@ -209,7 +205,7 @@
                    seekBar.Enable = true;
                    if (seekBar.Progress == 0)
                    {
                        seekBar.Progress = MaxValue;
                        seekBar.Progress = 100;
                        btnPersent.Text = "100%";
                    }
@@ -275,7 +271,7 @@
                    //百分比调节
                    dicTaskinfo[3] = new Safeguard.TaskListInfo();
                    dicTaskinfo[3].TaskType = 3;
                    dicTaskinfo[3].Data1 = seekBar.Progress;
                    dicTaskinfo[3].Data1 = HdlDeviceCommonLogic.Current.CalculateLightLevel(seekBar.Progress);
                }
                var listData = new List<Safeguard.TaskListInfo>();