| | |
| | | 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 + "%";
|
| | | };
|
| | |
| | | btnOpenSelect.Visible = false;
|
| | | btnOpen.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | seekBar.Enable = false;
|
| | | seekBar.ProgressColor = 0xffe8e8e8;
|
| | |
|
| | | dicTaskinfo.Remove(1);
|
| | | }
|
| | |
| | | //开 可用
|
| | | btnOpen.TextColor = UserCenterColor.Current.TextColor1;
|
| | | seekBar.Enable = true;
|
| | | seekBar.ProgressColor = 0xfffdb500;
|
| | | if (seekBar.Progress == 0)
|
| | | {
|
| | | seekBar.Progress = 100;
|
| | |
| | | //开 不可用
|
| | | btnOpen.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | seekBar.Enable = false;
|
| | | seekBar.ProgressColor = 0xffe8e8e8;
|
| | |
|
| | | dicTaskinfo[1] = new Safeguard.TaskListInfo();
|
| | | dicTaskinfo[1].TaskType = 1;
|
| | |
| | | //百分比调节
|
| | | 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>();
|
| | |
| | | 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
|
| | |
| | | /// <summary>
|
| | | /// 界面关闭
|
| | | /// </summary>
|
| | | public override void CloseForm()
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | this.FinishSelectEvent = null;
|
| | | base.CloseForm();
|
| | | base.CloseFormBefore();
|
| | | }
|
| | |
|
| | | #endregion
|