| | |
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary> |
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建) |
| | | /// </summary> |
| | | public void ShowForm(string i_deviceMac) |
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary>
|
| | | public void ShowForm(string i_deviceMac)
|
| | | {
|
| | | UserView.HomePage.Instance.ScrollEnabled = false;
|
| | |
|
| | | this.deviceMac = i_deviceMac; |
| | | this.listDevice = Common.LocalDevice.Current.GetDevicesByMac(i_deviceMac); |
| | | |
| | | //设置头部信息 |
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uBackLight)); |
| | | |
| | | //初始化中部信息 |
| | | this.InitMiddleFrame(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化中部信息 |
| | | /// </summary> |
| | | private async void InitMiddleFrame() |
| | | this.deviceMac = i_deviceMac;
|
| | | this.listDevice = Common.LocalDevice.Current.GetDevicesByMac(i_deviceMac);
|
| | |
|
| | | //设置头部信息
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uBackLight));
|
| | |
|
| | | //初始化中部信息
|
| | | this.InitMiddleFrame();
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化中部信息
|
| | | /// </summary>
|
| | | private async void InitMiddleFrame()
|
| | | {
|
| | | //获取设备初始数据
|
| | | var result = await this.GetDeviceDefultData();
|
| | |
| | | return;
|
| | | }
|
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame(); |
| | | |
| | | //点击状态 |
| | | var btnClickStatu = new NormalViewControl(600, 49, true); |
| | | btnClickStatu.X = ControlCommonResourse.XXLeft; |
| | | btnClickStatu.Y = Application.GetRealHeight(207); |
| | | btnClickStatu.TextSize = 12; |
| | | btnClickStatu.TextColor = UserCenterColor.Current.TextGrayColor3; |
| | | btnClickStatu.TextID = R.MyInternationalizationString.uClickStatu; |
| | | bodyFrameLayout.AddChidren(btnClickStatu); |
| | | |
| | | this.ClearBodyFrame();
|
| | |
|
| | | //点击状态
|
| | | var btnClickStatu = new NormalViewControl(600, 49, true);
|
| | | btnClickStatu.X = ControlCommonResourse.XXLeft;
|
| | | btnClickStatu.Y = Application.GetRealHeight(207);
|
| | | btnClickStatu.TextSize = 12;
|
| | | btnClickStatu.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnClickStatu.TextID = R.MyInternationalizationString.uClickStatu;
|
| | | bodyFrameLayout.AddChidren(btnClickStatu);
|
| | |
|
| | | //各种背光灯的容器
|
| | | var frameLinght = new FrameLayout(); |
| | | frameLinght.Height = Application.GetRealHeight(818); |
| | | frameLinght.Y = Application.GetRealHeight(279); |
| | | frameLinght.BackgroundColor = UserCenterColor.Current.White; |
| | | var frameLinght = new FrameLayout();
|
| | | frameLinght.Height = Application.GetRealHeight(818);
|
| | | frameLinght.Y = Application.GetRealHeight(279);
|
| | | frameLinght.BackgroundColor = UserCenterColor.Current.White;
|
| | | bodyFrameLayout.AddChidren(frameLinght);
|
| | |
|
| | | //添加1-6干接点的背光灯进度条
|
| | |
| | |
|
| | | //当前亮度
|
| | | var btnProgressView1 = new NormalViewControl(200, 49, true);
|
| | | btnProgressView1.X = ControlCommonResourse.XXLeft; |
| | | btnProgressView1.X = ControlCommonResourse.XXLeft;
|
| | | btnProgressView1.Y = Application.GetRealHeight(161);
|
| | | btnProgressView1.TextSize = 12; |
| | | btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1; |
| | | btnProgressView1.TextID = R.MyInternationalizationString.uNowLuminance; |
| | | btnProgressView1.TextSize = 12;
|
| | | btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnProgressView1.TextID = R.MyInternationalizationString.uNowLuminance;
|
| | | frameBack.AddChidren(btnProgressView1);
|
| | | var btnProgress1 = new NormalViewControl(200, 49, true);
|
| | | btnProgress1.X = Application.GetRealWidth(222); |
| | | btnProgress1.X = Application.GetRealWidth(222);
|
| | | btnProgress1.Y = Application.GetRealHeight(158);
|
| | | btnProgress1.TextSize = 12; |
| | | btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1; |
| | | btnProgress1.Text = energyModeInfo.level + "%"; |
| | | btnProgress1.TextSize = 12;
|
| | | btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnProgress1.Text = energyModeInfo.level + "%";
|
| | | frameBack.AddChidren(btnProgress1);
|
| | |
|
| | | //进度条
|
| | |
| | | };
|
| | |
|
| | | var btnTemp1 = new NormalViewControl(200, 49, true);
|
| | | btnTemp1.X = ControlCommonResourse.XXLeft; |
| | | btnTemp1.X = ControlCommonResourse.XXLeft;
|
| | | btnTemp1.Y = Application.GetRealHeight(325);
|
| | | btnTemp1.TextSize = 12; |
| | | btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3; |
| | | btnTemp1.Text = "0%"; |
| | | btnTemp1.TextSize = 12;
|
| | | btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnTemp1.Text = "0%";
|
| | | frameBack.AddChidren(btnTemp1);
|
| | |
|
| | | var btnTemp2 = new NormalViewControl(200, 49, true);
|
| | | btnTemp2.X = frameLinght.Width - Application.GetRealWidth(200 + 49); |
| | | btnTemp2.X = frameLinght.Width - Application.GetRealWidth(200 + 49);
|
| | | btnTemp2.Y = Application.GetRealHeight(325);
|
| | | btnTemp2.TextAlignment = TextAlignment.CenterRight;
|
| | | btnTemp2.TextSize = 12; |
| | | btnTemp2.TextColor = UserCenterColor.Current.TextGrayColor3; |
| | | btnTemp2.Text = "100%"; |
| | | btnTemp2.TextSize = 12;
|
| | | btnTemp2.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnTemp2.Text = "100%";
|
| | | frameBack.AddChidren(btnTemp2);
|
| | |
|
| | | if (energyModeInfo.enable == true)
|
| | |
| | | private void AddSixDryContactProgress(FrameLayout frameLinght)
|
| | | {
|
| | | var btnProgressView1 = new NormalViewControl(200, 49, true);
|
| | | btnProgressView1.X = ControlCommonResourse.XXLeft; |
| | | btnProgressView1.X = ControlCommonResourse.XXLeft;
|
| | | btnProgressView1.Y = Application.GetRealHeight(29);
|
| | | btnProgressView1.TextSize = 12; |
| | | btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1; |
| | | btnProgressView1.Text = "Dry1-6"; |
| | | btnProgressView1.TextSize = 12;
|
| | | btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnProgressView1.Text = "Dry1-6";
|
| | | frameLinght.AddChidren(btnProgressView1);
|
| | | var btnProgress1 = new NormalViewControl(200, 49, true);
|
| | | btnProgress1.X = Application.GetRealWidth(204); |
| | | btnProgress1.X = Application.GetRealWidth(204);
|
| | | btnProgress1.Y = Application.GetRealHeight(29);
|
| | | btnProgress1.TextSize = 12; |
| | | btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1; |
| | | btnProgress1.Text = linghtLevelInfo.panelDirectionsLevel + "%"; |
| | | btnProgress1.TextSize = 12;
|
| | | btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnProgress1.Text = linghtLevelInfo.panelDirectionsLevel + "%";
|
| | | frameLinght.AddChidren(btnProgress1);
|
| | |
|
| | | //进度条
|
| | |
| | | };
|
| | |
|
| | | var btnTemp1 = new NormalViewControl(200, 49, true);
|
| | | btnTemp1.X = ControlCommonResourse.XXLeft; |
| | | btnTemp1.X = ControlCommonResourse.XXLeft;
|
| | | btnTemp1.Y = Application.GetRealHeight(193);
|
| | | btnTemp1.TextSize = 12; |
| | | btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3; |
| | | btnTemp1.Text = "0%"; |
| | | btnTemp1.TextSize = 12;
|
| | | btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnTemp1.Text = "0%";
|
| | | frameLinght.AddChidren(btnTemp1);
|
| | |
|
| | | var btnTemp2 = new NormalViewControl(200, 49, true);
|
| | | btnTemp2.X = frameLinght.Width - Application.GetRealWidth(200 + 49); |
| | | btnTemp2.X = frameLinght.Width - Application.GetRealWidth(200 + 49);
|
| | | btnTemp2.Y = Application.GetRealHeight(193);
|
| | | btnTemp2.TextAlignment = TextAlignment.CenterRight;
|
| | | btnTemp2.TextSize = 12; |
| | | btnTemp2.TextColor = UserCenterColor.Current.TextGrayColor3; |
| | | btnTemp2.Text = "100%"; |
| | | btnTemp2.TextSize = 12;
|
| | | btnTemp2.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnTemp2.Text = "100%";
|
| | | frameLinght.AddChidren(btnTemp2);
|
| | |
|
| | | //线
|
| | | var btnLine = new NormalViewControl(Application.GetRealWidth(965), ControlCommonResourse.BottomLineHeight, false);
|
| | | btnLine.Y = Application.GetRealHeight(311);
|
| | | btnLine.Gravity = Gravity.CenterHorizontal;
|
| | | btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine; |
| | | btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
|
| | | frameLinght.AddChidren(btnLine);
|
| | | }
|
| | |
|
| | |
| | | private void AddSevenDryContactProgress(FrameLayout frameLinght)
|
| | | {
|
| | | var btnProgressView1 = new NormalViewControl(200, 49, true);
|
| | | btnProgressView1.X = ControlCommonResourse.XXLeft; |
| | | btnProgressView1.X = ControlCommonResourse.XXLeft;
|
| | | btnProgressView1.Y = Application.GetRealHeight(369);
|
| | | btnProgressView1.TextSize = 12; |
| | | btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1; |
| | | btnProgressView1.Text = "Dry7"; |
| | | btnProgressView1.TextSize = 12;
|
| | | btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnProgressView1.Text = "Dry7";
|
| | | frameLinght.AddChidren(btnProgressView1);
|
| | | var btnProgress1 = new NormalViewControl(200, 49, true);
|
| | | btnProgress1.X = Application.GetRealWidth(161); |
| | | btnProgress1.X = Application.GetRealWidth(161);
|
| | | btnProgress1.Y = Application.GetRealHeight(369);
|
| | | btnProgress1.TextSize = 12; |
| | | btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1; |
| | | btnProgress1.Text = linghtLevelInfo.panelBacklightLevel + "%"; |
| | | btnProgress1.TextSize = 12;
|
| | | btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnProgress1.Text = linghtLevelInfo.panelBacklightLevel + "%";
|
| | | frameLinght.AddChidren(btnProgress1);
|
| | |
|
| | | //进度条
|
| | |
| | | };
|
| | |
|
| | | var btnTemp1 = new NormalViewControl(200, 49, true);
|
| | | btnTemp1.X = ControlCommonResourse.XXLeft; |
| | | btnTemp1.X = ControlCommonResourse.XXLeft;
|
| | | btnTemp1.Y = Application.GetRealHeight(533);
|
| | | btnTemp1.TextSize = 12; |
| | | btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3; |
| | | btnTemp1.Text = "0%"; |
| | | btnTemp1.TextSize = 12;
|
| | | btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnTemp1.Text = "0%";
|
| | | frameLinght.AddChidren(btnTemp1);
|
| | |
|
| | | var btnTemp2 = new NormalViewControl(200, 49, true);
|
| | | btnTemp2.X = frameLinght.Width - Application.GetRealWidth(200 + 49); |
| | | btnTemp2.X = frameLinght.Width - Application.GetRealWidth(200 + 49);
|
| | | btnTemp2.Y = Application.GetRealHeight(533);
|
| | | btnTemp2.TextAlignment = TextAlignment.CenterRight;
|
| | | btnTemp2.TextSize = 12; |
| | | btnTemp2.TextColor = UserCenterColor.Current.TextGrayColor3; |
| | | btnTemp2.Text = "100%"; |
| | | btnTemp2.TextSize = 12;
|
| | | btnTemp2.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnTemp2.Text = "100%";
|
| | | frameLinght.AddChidren(btnTemp2);
|
| | |
|
| | | //线
|
| | | var btnLine = new NormalViewControl(Application.GetRealWidth(965), ControlCommonResourse.BottomLineHeight, false);
|
| | | btnLine.Gravity = Gravity.CenterHorizontal;
|
| | | btnLine.Y = Application.GetRealHeight(651);
|
| | | btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine; |
| | | btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
|
| | | frameLinght.AddChidren(btnLine);
|
| | | }
|
| | |
|
| | |
| | | /// <summary>
|
| | | /// 界面关闭
|
| | | /// </summary>
|
| | | public override void CloseForm()
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | UserView.HomePage.Instance.ScrollEnabled = true;
|
| | |
|
| | | base.CloseForm();
|
| | | base.CloseFormBefore();
|
| | | }
|
| | |
|
| | | #endregion
|