| | |
| | | /// 动作信息 1 开关/ 3亮度调节
|
| | | /// </summary>
|
| | | private Dictionary<int, Safeguard.TaskListInfo> dicTaskinfo = new Dictionary<int, Safeguard.TaskListInfo>();
|
| | | /// <summary>
|
| | | /// 进度条最大值
|
| | | /// </summary>
|
| | | private int MaxValue = 254;
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | //头部信息
|
| | | var btnTitle = new NormalViewControl(frameTransparent.Width, Application.GetRealHeight(70), false);
|
| | | btnTitle.Y = Application.GetRealHeight(28);
|
| | | btnTitle.Text = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | btnTitle.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
|
| | | btnTitle.TextColor = UserCenterColor.Current.TextColor4;
|
| | | btnTitle.TextSize = 16;
|
| | | btnTitle.TextAlignment = TextAlignment.Center;
|
| | |
| | | rowRound.AddChidren(btnFinish);
|
| | |
|
| | | //线
|
| | | var btnLine1 = new NormalViewControl(frameTransparent.Width, ControlCommonResourse.BottomLineHeight, false);
|
| | | var btnLine1 = new NormalViewControl(frameTransparent.Width, HdlControlResourse.BottomLineHeight, false);
|
| | | btnLine1.Y = Application.GetRealHeight(138);
|
| | | btnLine1.BackgroundColor = UserCenterColor.Current.ButtomLine;
|
| | | frameTransparent.AddChidren(btnLine1);
|
| | |
| | | detailBackFrame.AddChidren(btnPersent);
|
| | | if (dicTaskinfo.ContainsKey(3) == true)
|
| | | {
|
| | | btnPersent.Text = dicTaskinfo[3].Data1 + "%";
|
| | | btnPersent.Text = ((int)(dicTaskinfo[3].Data1 * 1.0 / MaxValue * 100)) + "%";
|
| | | }
|
| | |
|
| | | //进度条
|
| | | var seekBar = new SeekBarControl(919);
|
| | | seekBar.Y = Application.GetRealHeight(268);
|
| | | seekBar.ProgressBarColor = 0xfffdb500;
|
| | | seekBar.MaxValue = this.MaxValue;
|
| | | seekBar.Enable = false;
|
| | | if (dicTaskinfo.ContainsKey(3) == true)
|
| | | {
|
| | |
| | | detailBackFrame.AddChidren(seekBar);
|
| | | seekBar.ProgressChangedEvent += (div, value) =>
|
| | | {
|
| | | btnPersent.Text = value + "%";
|
| | | btnPersent.Text = ((int)(value * 1.0 / MaxValue * 100)) + "%";
|
| | | };
|
| | |
|
| | | //线
|
| | | var btnLine2 = new NormalViewControl(Application.GetRealWidth(919), ControlCommonResourse.BottomLineHeight, false);
|
| | | var btnLine2 = new NormalViewControl(Application.GetRealWidth(919), HdlControlResourse.BottomLineHeight, false);
|
| | | btnLine2.Y = Application.GetRealHeight(417);
|
| | | btnLine2.Gravity = Gravity.CenterHorizontal;
|
| | | btnLine2.BackgroundColor = UserCenterColor.Current.ButtomLine;
|
| | |
| | | //开
|
| | | var rowOpen = new FrameRowControl();
|
| | | rowOpen.Y = Application.GetRealHeight(69);
|
| | | rowOpen.LeftOffset = Application.GetRealWidth(81) - ControlCommonResourse.XXLeft;
|
| | | rowOpen.RightOffset = ControlCommonResourse.XXLeft - Application.GetRealWidth(81);
|
| | | rowOpen.LeftOffset = Application.GetRealWidth(81) - HdlControlResourse.XXLeft;
|
| | | rowOpen.RightOffset = HdlControlResourse.XXLeft - Application.GetRealWidth(81);
|
| | | detailBackFrame.AddChidren(rowOpen);
|
| | | var btnOpen = rowOpen.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uSimpleOpen), 400);
|
| | | btnOpen.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | |
| | | //关
|
| | | var rowClose = new FrameRowControl();
|
| | | rowClose.Y = btnLine2.Bottom + Application.GetRealHeight(12);
|
| | | rowClose.LeftOffset = Application.GetRealWidth(81) - ControlCommonResourse.XXLeft;
|
| | | rowClose.RightOffset = ControlCommonResourse.XXLeft - Application.GetRealWidth(81);
|
| | | rowClose.LeftOffset = Application.GetRealWidth(81) - HdlControlResourse.XXLeft;
|
| | | rowClose.RightOffset = HdlControlResourse.XXLeft - Application.GetRealWidth(81);
|
| | | detailBackFrame.AddChidren(rowClose);
|
| | | var btnClose = rowClose.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uSimpleClose), 400);
|
| | | btnClose.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | |
| | | seekBar.Enable = true;
|
| | | if (seekBar.Progress == 0)
|
| | | {
|
| | | seekBar.Progress = 100;
|
| | | seekBar.Progress = MaxValue;
|
| | | btnPersent.Text = "100%";
|
| | | }
|
| | |
|
| | |
| | | dicTaskinfo = null;
|
| | |
|
| | | //获取状态的显示文本
|
| | | string statuText = HdlSafeguardLogic.Current.GetLightAlarmStatuText(listData);
|
| | | string statuText = HdlSafeguardLogic.Current.GetAdjustTargetStatuText(listData);
|
| | | this.FinishSelectEvent?.Invoke(statuText, listData);
|
| | |
|
| | | this.CloseForm();
|