HDL Home App 第二版本 旧平台金堂用 正在使用
hxb
2022-08-30 25429f085093d89d543a0b90e30d0d62d1b7dac9
ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetStatuSelectLightForm.cs
@@ -131,27 +131,22 @@
            detailBackFrame.AddChidren(btnPersent);
            if (dicTaskinfo.ContainsKey(3) == true)
            {
                btnPersent.Text = dicTaskinfo[3].Data1 + "%";
                btnPersent.Text = HdlDeviceCommonLogic.Current.CalculateLightLevelPersent(dicTaskinfo[3].Data1) + "%";
            }
            //进度条
            var seekBar = new HorizontalSeekBar();
            seekBar.Enable = false;
            var seekBar = new SeekBarControl(919);
            seekBar.Y = Application.GetRealHeight(268);
            seekBar.Gravity = Gravity.CenterHorizontal;
            seekBar.Width = Application.GetRealWidth(919);
            seekBar.Height = Application.GetRealHeight(89);
            seekBar.Max = 100;
            seekBar.BackgroundColor = 0xfff5f5f5;
            seekBar.ThumbColor = Common.ZigbeeColor.Current.GXCButtonBlueColor;
            seekBar.ProgressColor = 0xfffdb500;
            seekBar.ProgressBarColor = 0xfffdb500;
            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.ProgressChanged += (sender, value) =>
            seekBar.ProgressChangedEvent += (div, value) =>
            {
                btnPersent.Text = value + "%";
            };
@@ -196,7 +191,6 @@
                    btnOpenSelect.Visible = false;
                    btnOpen.TextColor = UserCenterColor.Current.TextGrayColor3;
                    seekBar.Enable = false;
                    seekBar.ProgressColor = 0xffe8e8e8;
                    dicTaskinfo.Remove(1);
                }
@@ -209,7 +203,6 @@
                    //开 可用
                    btnOpen.TextColor = UserCenterColor.Current.TextColor1;
                    seekBar.Enable = true;
                    seekBar.ProgressColor = 0xfffdb500;
                    if (seekBar.Progress == 0)
                    {
                        seekBar.Progress = 100;
@@ -247,7 +240,6 @@
                    //开 不可用
                    btnOpen.TextColor = UserCenterColor.Current.TextGrayColor3;
                    seekBar.Enable = false;
                    seekBar.ProgressColor = 0xffe8e8e8;
                    dicTaskinfo[1] = new Safeguard.TaskListInfo();
                    dicTaskinfo[1].TaskType = 1;
@@ -279,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>();
@@ -290,13 +282,11 @@
                dicTaskinfo = null;
                //获取状态的显示文本
                string statuText = HdlSafeguardLogic.Current.GetLightAlarmStatuText(listData);
                string statuText = HdlSafeguardLogic.Current.GetAdjustTargetStatuText(listData);
                this.FinishSelectEvent?.Invoke(statuText, listData);
                this.CloseForm();
            };
            //动画效果
            frameTransparent.Animate = Animate.DownToUp;
        }
        #endregion
@@ -306,10 +296,10 @@
        /// <summary>
        /// 界面关闭
        /// </summary>
        public override void CloseForm()
        public override void CloseFormBefore()
        {
            this.FinishSelectEvent = null;
            base.CloseForm();
            base.CloseFormBefore();
        }
        #endregion