| | |
| | | #region ■ 背光颜色_________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加背光灯亮度控件
|
| | | /// 添加背光颜色控件
|
| | | /// </summary>
|
| | | private void AddBackLightControl()
|
| | | {
|
| | |
| | | //背景
|
| | | var frameBack = new FrameLayout();
|
| | | frameBack.Y = Application.GetRealHeight(490);
|
| | | frameBack.Height = Application.GetRealHeight(429);
|
| | | frameBack.Height = Application.GetRealHeight(170);
|
| | | frameBack.BackgroundColor = UserCenterColor.Current.White;
|
| | | listview.AddChidren(frameBack);
|
| | |
|
| | |
| | | var btnLevelView = new NormalViewControl(400, 60, true);
|
| | | btnLevelView.X = ControlCommonResourse.XXLeft;
|
| | | btnLevelView.Y = Application.GetRealHeight(54);
|
| | | btnLevelView.Gravity = Gravity.CenterVertical;
|
| | | btnLevelView.TextID = R.MyInternationalizationString.BackgroundLightColor;
|
| | | frameBack.AddChidren(btnLevelView);
|
| | |
|
| | | //当前亮度
|
| | | var btnProgressView1 = new NormalViewControl(200, 50, true);
|
| | | btnProgressView1.X = ControlCommonResourse.XXLeft;
|
| | | btnProgressView1.Y = Application.GetRealHeight(157);
|
| | | btnProgressView1.TextSize = 12;
|
| | | btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnProgressView1.TextID = R.MyInternationalizationString.uNowLuminance;
|
| | | frameBack.AddChidren(btnProgressView1);
|
| | | var btnProgress1 = new NormalViewControl(200, 50, true);
|
| | | btnProgress1.X = Application.GetRealWidth(222);
|
| | | btnProgress1.Y = Application.GetRealHeight(157);
|
| | | btnProgress1.TextSize = 12;
|
| | | btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnProgress1.Text = "70%";
|
| | | frameBack.AddChidren(btnProgress1);
|
| | |
|
| | | //进度条
|
| | | var seekBar1 = new SeekBarControl();
|
| | | seekBar1.Y = Application.GetRealHeight(253);
|
| | | frameBack.AddChidren(seekBar1);
|
| | | seekBar1.ProgressChangedEvent += (div, value) =>
|
| | | {
|
| | | btnProgress1.Text = value + "%";
|
| | | };
|
| | | //seekBar1.Progress = linghtLevelInfo.panelBacklightLevel;
|
| | |
|
| | | var btnTemp1 = new NormalViewControl(200, 50, true);
|
| | | btnTemp1.X = ControlCommonResourse.XXLeft;
|
| | | btnTemp1.Y = Application.GetRealHeight(322);
|
| | | btnTemp1.TextSize = 12;
|
| | | btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnTemp1.Text = "0%";
|
| | | frameBack.AddChidren(btnTemp1);
|
| | |
|
| | | var btnTemp2 = new NormalViewControl(200, 50, true);
|
| | | btnTemp2.X = frameBack.Width - ControlCommonResourse.XXLeft - Application.GetRealWidth(200);
|
| | | btnTemp2.Y = Application.GetRealHeight(322);
|
| | | btnTemp2.TextAlignment = TextAlignment.CenterRight;
|
| | | btnTemp2.TextSize = 12;
|
| | | btnTemp2.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnTemp2.Text = "100%";
|
| | | frameBack.AddChidren(btnTemp2);
|
| | |
|
| | | frameBack.AddChidren(btnLevelView); |
| | | |
| | | var frameColor = new FrameLayoutStatuControl();
|
| | | frameColor.UseClickStatu = false;
|
| | | frameColor.Width = Application.GetRealHeight(262);
|
| | | frameColor.Height = this.GetPictrueRealSize(79);
|
| | | frameColor.Y = Application.GetRealHeight(26);
|
| | | frameColor.Gravity = Gravity.CenterVertical;
|
| | | frameColor.X = frameBack.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
|
| | | frameBack.AddChidren(frameColor);
|
| | | //颜色
|
| | | var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(50), false);
|
| | | frameBack.AddChidren(frameColor); |
| | | |
| | | //颜色 |
| | | var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(49), false);
|
| | | btnColorView.Gravity = Gravity.CenterVertical;
|
| | | btnColorView.TextAlignment = TextAlignment.CenterRight;
|
| | | btnColorView.TextSize = 12;
|
| | | btnColorView.Y = Application.GetRealHeight(5);
|
| | | btnColorView.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnColorView.TextID = R.MyInternationalizationString.uColor;
|
| | | frameColor.AddChidren(btnColorView, ChidrenBindMode.BindEventOnly);
|
| | |
|
| | | int R1 = Convert.ToInt32("d8", 16);
|
| | | int G1 = Convert.ToInt32("95", 16);
|
| | | int B1 = Convert.ToInt32("e3", 16);
|
| | | frameColor.AddChidren(btnColorView, ChidrenBindMode.BindEventOnly); |
| | | |
| | | int R1 = Convert.ToInt32(this.keyColorData.OpenColorR, 16);
|
| | | int G1 = Convert.ToInt32(this.keyColorData.OpenColorG, 16);
|
| | | int B1 = Convert.ToInt32(this.keyColorData.OpenColorB, 16);
|
| | | uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
|
| | |
|
| | | //颜色外框
|
| | | var btnColorLine = new NormalViewControl(this.GetPictrueRealSize(79), this.GetPictrueRealSize(79), false);
|
| | | //颜色外框 |
| | | var btnColorLine = new FrameLayoutStatuControl();
|
| | | btnColorLine.Width = Application.GetRealHeight(79);
|
| | | btnColorLine.Height = this.GetPictrueRealSize(79);
|
| | | btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
|
| | | btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
|
| | | btnColorLine.BorderWidth = 1;
|
| | | btnColorLine.BorderColor = 0xff666666;
|
| | | frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEventOnly);
|
| | |
|
| | | btnColorLine.BorderColor = 0xffcccccc;
|
| | | frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEventOnly); |
| | | |
| | | var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
|
| | | btnColor.Y = Application.GetRealHeight(5);
|
| | | btnColor.X = btnColorView.Right + Application.GetRealHeight(23);
|
| | | btnColor.Gravity = Gravity.Center;
|
| | | btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
|
| | | btnColor.BackgroundColor = UserCenterColor.Current.ErrorColor;
|
| | | frameColor.AddChidren(btnColor, ChidrenBindMode.BindEventOnly);
|
| | |
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = backColor;
|
| | |
|
| | | btnColor.BackgroundColor = backColor;
|
| | | btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEventOnly); |
| | | |
| | | var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false);
|
| | | btnRight.UnSelectedImagePath = "Item/RightNext.png";
|
| | | btnRight.Y = Application.GetRealHeight(5);
|
| | |
| | | btnRight.Y += this.GetPictrueRealSize(8);
|
| | |
|
| | | frameColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | { |
| | | var form = new PanelColorSelectForm();
|
| | | form.AddForm(R1, G1, B1);
|
| | | form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
|
| | |
| | | G1 = Gcolor;
|
| | | B1 = Bcolor;
|
| | |
|
| | | //this.keyColorData.CloseColorR = Convert.ToString(Rcolor, 16);
|
| | | //this.keyColorData.CloseColorG = Convert.ToString(Gcolor, 16);
|
| | | //this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16);
|
| | | this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16);
|
| | | this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16);
|
| | | this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16);
|
| | |
|
| | | btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = btnColor.BackgroundColor;
|
| | | };
|
| | | };
|
| | | }
|
| | |
| | | //关闭进度条
|
| | | this.CloseProgressBar(ShowReLoadMode.YES);
|
| | | return false;
|
| | | }
|
| | | } |
| | | keyColorData = await HdlDevicePanelLogic.Current.GetPanelEpointColorInfo(panelDevice);
|
| | | if (this.keyColorData == null)
|
| | | {
|
| | | //关闭进度条
|
| | | this.CloseProgressBar(ShowReLoadMode.YES);
|
| | | return false;
|
| | | }
|
| | | //关闭进度条
|
| | | } |
| | | //关闭进度条 |
| | | this.CloseProgressBar();
|
| | |
|
| | | return true;
|
| | | return true; |
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | {
|
| | | this.CloseProgressBar();
|
| | | return;
|
| | | } |
| | | |
| | | //设置按键面板颜色的信息 |
| | | result = await HdlDevicePanelLogic.Current.SetPanelColorInfo(panelDevice, this.keyColorData);
|
| | | this.CloseProgressBar();
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | //设置按键面板指定端点的【指示灯开关颜色】的信息
|
| | | //result = await HdlDevicePanelLogic.Current.SetPanelEpointColorInfo(panelDevice, this.keyColorData);
|
| | | //this.CloseProgressBar();
|
| | | //if (result == false)
|
| | | //{
|
| | | // return;
|
| | | //}
|
| | | //关闭自身
|
| | | this.CloseForm();
|
| | | }
|
| | |
|
| | | } |
| | | #endregion
|
| | |
|
| | | |
| | | #region ■ 补充容器___________________________
|
| | | /// <summary>
|
| | | /// 行数超过容器时,补一个空白FrameLayout,使之能滑动
|