| | |
| | | btnLevel.Y = Application.GetRealHeight(54);
|
| | | btnLevel.TextAlignment = TextAlignment.CenterRight;
|
| | | btnLevel.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnLevel.Text = "3" + strRank;
|
| | | frameBack.AddChidren(btnLevel);
|
| | |
|
| | | //当前亮度
|
| | |
| | | btnProgress1.Y = Application.GetRealHeight(157);
|
| | | btnProgress1.TextSize = 12;
|
| | | btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnProgress1.Text = "4";
|
| | | frameBack.AddChidren(btnProgress1);
|
| | |
|
| | | //进度条
|
| | |
| | | seekBar1.ProgressChangedEvent += (div, value) =>
|
| | | {
|
| | | btnProgress1.Text = value.ToString();
|
| | | switch (value) |
| | | { |
| | | case 1: |
| | | linghtLevelInfo.panelDirectionsLevel = 20; |
| | | btnLevel.Text = "1" + strRank; |
| | | break; |
| | | case 2: |
| | | linghtLevelInfo.panelDirectionsLevel = 40; |
| | | btnLevel.Text = "2" + strRank; |
| | | break; |
| | | case 3: |
| | | linghtLevelInfo.panelDirectionsLevel = 60; |
| | | btnLevel.Text = "3" + strRank; |
| | | break; |
| | | case 4: |
| | | linghtLevelInfo.panelDirectionsLevel = 80; |
| | | btnLevel.Text = "4" + strRank; |
| | | break; |
| | | case 5: |
| | | linghtLevelInfo.panelDirectionsLevel = 100; |
| | | btnLevel.Text = "5" + strRank; |
| | | break; |
| | | default: |
| | | linghtLevelInfo.panelDirectionsLevel = 0; |
| | | btnLevel.Text = "0" + strRank; |
| | | break; |
| | | } |
| | | };
|
| | | //seekBar1.Progress = linghtLevelInfo.panelBacklightLevel;
|
| | |
|
| | | if (linghtLevelInfo.panelDirectionsLevel <= 20 && linghtLevelInfo.panelDirectionsLevel > 0) |
| | | { |
| | | btnLevel.Text = "1" + strRank; |
| | | btnProgress1.Text = "1"; |
| | | seekBar1.Progress = 1; |
| | | } |
| | | else if (linghtLevelInfo.panelDirectionsLevel <= 40 && linghtLevelInfo.panelDirectionsLevel > 20) |
| | | { |
| | | btnLevel.Text = "2" + strRank; |
| | | btnProgress1.Text = "2"; |
| | | seekBar1.Progress = 2; |
| | | } |
| | | else if (linghtLevelInfo.panelDirectionsLevel <= 60 && linghtLevelInfo.panelDirectionsLevel > 40) |
| | | { |
| | | btnLevel.Text = "3" + strRank; |
| | | btnProgress1.Text = "3"; |
| | | seekBar1.Progress = 3; |
| | | } |
| | | else if (linghtLevelInfo.panelDirectionsLevel <= 80 && linghtLevelInfo.panelDirectionsLevel > 60) |
| | | { |
| | | btnLevel.Text = "4" + strRank; |
| | | btnProgress1.Text = "4"; |
| | | seekBar1.Progress = 4; |
| | | } |
| | | else if (linghtLevelInfo.panelDirectionsLevel <= 100 && linghtLevelInfo.panelDirectionsLevel > 80) |
| | | { |
| | | btnLevel.Text = "5" + strRank; |
| | | btnProgress1.Text = "5"; |
| | | seekBar1.Progress = 5; |
| | | } |
| | | else |
| | | { |
| | | btnLevel.Text = "0" + strRank; |
| | | btnProgress1.Text = "0"; |
| | | seekBar1.Progress = 0; |
| | | } |
| | |
|
| | | var btnTemp1 = new NormalViewControl(200, 50, true);
|
| | | btnTemp1.X = ControlCommonResourse.XXLeft;
|
| | |
| | | seekBar1.ProgressChangedEvent += (div, value) =>
|
| | | {
|
| | | btnProgress1.Text = value + "%";
|
| | | //数据变更
|
| | | };
|
| | | //seekBar1.Progress = linghtLevelInfo.panelBacklightLevel;
|
| | |
|
| | |
| | | this.ShowProgressBar();
|
| | |
|
| | | //节能模式修改(他们说随便一个回路就行)
|
| | | //设备同事说默认去秒时间,这样接近感应功能才合理
|
| | | //设备同事说默认去1秒时间,这样接近感应功能才合理
|
| | | energyModeInfo.time = 1;
|
| | | var result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
|
| | | if (result == false)
|
| | |
| | | // return;
|
| | | //}
|
| | | //关闭自身
|
| | | this.CloseForm();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 保存配置___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 保存配置
|
| | | /// </summary>
|
| | | private void SaveSettionData()
|
| | | {
|
| | | this.CloseForm();
|
| | | }
|
| | |
|