From 4f0ab0ad21ce450b7856d50f98322a7899361386 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期二, 22 九月 2020 10:30:01 +0800
Subject: [PATCH] 不要下载这个备份
---
ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayThreeLoadBackLightSettionForm.cs | 70 ++++++++++++++++++++---------------
1 files changed, 40 insertions(+), 30 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayThreeLoadBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayThreeLoadBackLightSettionForm.cs
index 8f382b3..3c650d2 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayThreeLoadBackLightSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayThreeLoadBackLightSettionForm.cs
@@ -14,10 +14,6 @@
#region 鈻� 鍙橀噺澹版槑___________________________
/// <summary>
- /// 璁惧Mac鍦板潃
- /// </summary>
- private string deviceMac = string.Empty;
- /// <summary>
/// 浜害璋冭妭鐨勪俊鎭�
/// </summary>
private Panel.PanelSwitchLevelInfo linghtLevelInfo = null;
@@ -43,9 +39,8 @@
/// </summary>
public void ShowForm(string i_deviceMac)
{
- UserView.HomePage.Instance.ScrollEnabled = false;
+ this.ScrollEnabled = false;
- this.deviceMac = i_deviceMac;
this.listDevice = Common.LocalDevice.Current.GetDevicesByMac(i_deviceMac);
//璁剧疆澶撮儴淇℃伅
@@ -58,10 +53,10 @@
/// <summary>
/// 鍒濆鍖栦腑閮ㄤ俊鎭�
/// </summary>
- private async void InitMiddleFrame()
+ private void InitMiddleFrame()
{
//鑾峰彇璁惧鍒濆鏁版嵁
- var result = await this.GetDeviceDefultData();
+ var result = this.GetDeviceDefultData();
if (result == false)
{
return;
@@ -96,20 +91,20 @@
var btnSave = new BottomClickButton();
btnSave.TextID = R.MyInternationalizationString.uSave;
bodyFrameLayout.AddChidren(btnSave);
- btnSave.ButtonClickEvent += async (sender, e) =>
+ btnSave.ButtonClickEvent += (sender, e) =>
{
if (valueChanged == true)
{
this.ShowProgressBar();
//浜害璋冭妭鏇存敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
- result = await HdlDevicePanelLogic.Current.SetDeviceLightSettion(listDevice[0], linghtLevelInfo.panelDirectionsLevel, linghtLevelInfo.panelBacklightLevel);
+ result = HdlDevicePanelLogic.Current.SetDeviceLightSettion(listDevice[0], linghtLevelInfo.panelDirectionsLevel, linghtLevelInfo.panelBacklightLevel);
if (result == false)
{
this.CloseProgressBar();
return;
}
//鑺傝兘妯″紡淇敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
- result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(listDevice[0], energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
+ result = HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(listDevice[0], energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
this.CloseProgressBar();
if (result == false)
{
@@ -139,6 +134,10 @@
frameBack.Height = Application.GetRealHeight(170);
bodyFrameLayout.AddChidren(frameBack);
+ //褰撳墠浜害(鍏堝0鏄�,涓轰簡瀵瑰簲IOS鐨勬姌鍙犲悗,娌℃湁瀹屽叏閬尅鐨勯棶棰�)
+ var btnProgressView1 = new NormalViewControl(200, 49, true);
+ var btnProgress1 = new NormalViewControl(200, 49, true);
+
//鑺傝兘妯″紡
frameBack.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uEnergyConservationMode), 400);
//寮�鍏虫帶浠�
@@ -154,12 +153,16 @@
frameBack.Height += value;
btnClickStatu.Y += value;
frameLinght.Y += value;
+ btnProgressView1.Visible = true;
+ btnProgress1.Visible = true;
}
else
{
frameBack.Height -= value;
btnClickStatu.Y -= value;
frameLinght.Y -= value;
+ btnProgressView1.Visible = false;
+ btnProgress1.Visible = false;
}
//鏁版嵁鍙樻洿
valueChanged = true;
@@ -170,20 +173,20 @@
}
//褰撳墠浜害
- var btnProgressView1 = new NormalViewControl(200, 49, true);
btnProgressView1.X = ControlCommonResourse.XXLeft;
btnProgressView1.Y = Application.GetRealHeight(161);
btnProgressView1.TextSize = 12;
btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1;
btnProgressView1.TextID = R.MyInternationalizationString.uNowLuminance;
frameBack.AddChidren(btnProgressView1);
- var btnProgress1 = new NormalViewControl(200, 49, true);
+ btnProgressView1.Visible = false;
btnProgress1.X = Application.GetRealWidth(222);
btnProgress1.Y = Application.GetRealHeight(158);
btnProgress1.TextSize = 12;
btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1;
btnProgress1.Text = energyModeInfo.level + "%";
frameBack.AddChidren(btnProgress1);
+ btnProgress1.Visible = false;
//杩涘害鏉�
var seekBar1 = new SeekBarControl();
@@ -223,6 +226,15 @@
frameBack.Height += value;
btnClickStatu.Y += value;
frameLinght.Y += value;
+
+ btnProgressView1.Visible = true;
+ btnProgress1.Visible = true;
+ }
+ //濡傛灉褰撳墠鏄睍绀烘ā鏉�
+ if (Common.Config.Instance.Home.IsShowTemplate == true)
+ {
+ seekBar1.Enable = false;
+ btnSwitch.CanClick = false;
}
}
@@ -288,6 +300,12 @@
btnLine.Gravity = Gravity.CenterHorizontal;
btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
frameLinght.AddChidren(btnLine);
+
+ //濡傛灉褰撳墠鏄睍绀烘ā鏉�
+ if (Common.Config.Instance.Home.IsShowTemplate == true)
+ {
+ seekBar1.Enable = false;
+ }
}
#endregion
@@ -352,6 +370,12 @@
btnLine.Y = Application.GetRealHeight(651);
btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
frameLinght.AddChidren(btnLine);
+
+ //濡傛灉褰撳墠鏄睍绀烘ā鏉�
+ if (Common.Config.Instance.Home.IsShowTemplate == true)
+ {
+ seekBar1.Enable = false;
+ }
}
#endregion
@@ -362,12 +386,12 @@
/// 鑾峰彇璁惧鍒濆鏁版嵁
/// </summary>
/// <returns></returns>
- private async Task<bool> GetDeviceDefultData()
+ private bool GetDeviceDefultData()
{
//寮�鍚繘搴︽潯
this.ShowProgressBar();
//浜害璋冭妭(浠栦滑璇撮殢渚挎嬁涓�璺洖璺氨琛屼簡)
- linghtLevelInfo = await HdlDevicePanelLogic.Current.GetDeviceLightSettion(listDevice[0]);
+ linghtLevelInfo = HdlDevicePanelLogic.Current.GetDeviceLightSettion(listDevice[0]);
if (linghtLevelInfo == null)
{
//鍏抽棴杩涘害鏉�
@@ -375,7 +399,7 @@
return false;
}
//鑺傝兘妯″紡(浠栦滑璇撮殢渚挎嬁涓�璺洖璺氨琛屼簡)
- energyModeInfo = await HdlDevicePanelLogic.Current.GetDeviceEnergyConservationMode(listDevice[0]);
+ energyModeInfo = HdlDevicePanelLogic.Current.GetDeviceEnergyConservationMode(listDevice[0]);
if (energyModeInfo == null)
{
//鍏抽棴杩涘害鏉�
@@ -386,20 +410,6 @@
this.CloseProgressBar();
return true;
- }
-
- #endregion
-
- #region 鈻� 鐣岄潰鍏抽棴___________________________
-
- /// <summary>
- /// 鐣岄潰鍏抽棴
- /// </summary>
- public override void CloseFormBefore()
- {
- UserView.HomePage.Instance.ScrollEnabled = true;
-
- base.CloseFormBefore();
}
#endregion
--
Gitblit v1.8.0