From 72e1b4e4626315ebd4b879a68c94e7738fd0473e Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期一, 28 十月 2019 11:00:28 +0800
Subject: [PATCH] 2019-10-28-1
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs | 309 +++++++++++++++++++++++++++++++++++++--------------
1 files changed, 223 insertions(+), 86 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
index 279e15a..fd35796 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -229,7 +229,7 @@
//鑾峰彇缃戝叧鐨勪俊鎭�
var result = await zbGateway.GetZbGwInfoAsync();
//妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
- string error = UserCenterLogic.CheckCommonErrorCode(result);
+ string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
if (error != null)
{
if (mode == ShowErrorMode.YES)
@@ -391,7 +391,7 @@
/// 閲嶆柊缁戝畾缃戝叧(1:姝e父 -1:寮傚父 0:褰撳墠鐨勭綉鍏崇粦瀹氬湪浜嗗綋鍓嶈处鍙蜂笅鐨勪笉鍚屼綇瀹呴噷闈�)
/// </summary>
/// <param name="zbGateway">缃戝叧</param>
- public async Task<int> ReBindNewGateway(ZbGateway zbGateway)
+ public async Task<int> ReBindNewGateway(ZbGateway zbGateway, NormalViewControl btnMsg = null)
{
if (zbGateway == null)
{
@@ -424,15 +424,25 @@
HdlGatewayLogic.Current.BackupGatewayIdOnNotNetwork(zbGateway);
}
- //缃戝叧鍐呴儴鏁版嵁鍙樻洿涓�,璇风◢鍚�
- ProgressBar.SetValue(Language.StringByID(R.MyInternationalizationString.uGatewayDataIsChangingPleaseWhait));
-
+ if (btnMsg == null)
+ {
+ //缃戝叧鍐呴儴鏁版嵁鍙樻洿涓�,璇风◢鍚�
+ ProgressBar.SetValue(Language.StringByID(R.MyInternationalizationString.uGatewayDataIsChangingPleaseWhait));
+ }
+ else
+ {
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ //缃戝叧鍐呴儴鏁版嵁鍙樻洿涓�,璇风◢鍚�
+ btnMsg.TextID = R.MyInternationalizationString.uGatewayDataIsChangingPleaseWhait;
+ });
+ }
await System.Threading.Tasks.Task.Delay(8000);
//鑾峰彇缃戝叧鐨勪俊鎭�
var result = await zbGateway.GetZbGwInfoAsync();
//妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
- string error = UserCenterLogic.CheckCommonErrorCode(result);
+ string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
if (error != null)
{
this.ShowTipMsg(error);
@@ -503,7 +513,7 @@
var result = await realWay.GwReNameAsync(gatewayName);
//妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
- string error = UserCenterLogic.CheckCommonErrorCode(result);
+ string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
if (error != null)
{
this.ShowErrorMsg(error);
@@ -538,8 +548,104 @@
HdlAutoBackupLogic.AddOrEditorFile(zbGateway.FilePath);
return true;
- }
-
+ }
+
+ #endregion
+
+ #region 鈻� 缃戝叧鍒囨崲___________________________
+
+ /// <summary>
+ /// 鎵ц鍒囨崲缃戝叧鎿嶄綔
+ /// </summary>
+ /// <param name="gatewayId"></param>
+ public async Task<bool> DoSwitchGateway(string gatewayId)
+ {
+ var zbGateway = this.GetLocalGateway(gatewayId);
+ if (this.CheckGatewayOnlineByFlag(zbGateway) == true)
+ {
+ //閲嶆柊鑾峰彇鍦ㄧ嚎缃戝叧鐨勪俊鎭�
+ var result = await this.GetOnlineGatewayInfo(gatewayId);
+ if (result == false)
+ {
+ return false;
+ }
+ }
+ //鍒囨崲缃戝叧,淇濆瓨缂撳瓨
+ this.SaveGatewayIdToLocation(gatewayId);
+ return true;
+ }
+
+ /// <summary>
+ /// 鑾峰彇鍦ㄧ嚎缃戝叧淇℃伅
+ /// </summary>
+ /// <param name="gatewayId"></param>
+ /// <returns></returns>
+ private async Task<bool> GetOnlineGatewayInfo(string gatewayId)
+ {
+ //鏄剧ず杩涘害鏉�
+ ProgressBar.Show();
+
+ //妫�娴嬪箍鎾埌鐨勮繖涓綉鍏虫槸鍚︽嫢鏈変綇瀹匢D
+ ZbGateway realWay = null;
+ bool getGatewayInfo = true;
+ if (this.GetRealGateway(ref realWay, gatewayId) == true)
+ {
+ //閲嶆柊璁剧疆浣忓畢ID(杩欎釜搴旇鏄笉缁忚繃APP,鐩存帴鎶婄綉鍏虫仮澶嶄簡鍑哄巶璁剧疆)
+ if (this.HomeIdIsEmpty(realWay.getGatewayBaseInfo.HomeId) == true)
+ {
+ int result2 = await this.ReBindNewGateway(realWay);
+ if (result2 == 0)
+ {
+ //鍑虹幇鏈煡閿欒,璇风◢鍚庡啀璇�
+ this.ShowTipMsg(Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndResetAgain));
+ //鍏抽棴杩涘害鏉�
+ ProgressBar.Close();
+ }
+ else if (result2 == -1)
+ {
+ //鍏抽棴杩涘害鏉�
+ ProgressBar.Close();
+ return false;
+ }
+ //閲嶆柊缁戝畾缃戝叧閲岄潰宸茬粡閲嶆柊鑾峰彇浜嗙綉鍏充俊鎭�
+ getGatewayInfo = false;
+ }
+ }
+
+ if (getGatewayInfo == true)
+ {
+ //鑾峰彇缃戝叧淇℃伅
+ var info = await this.GetGatewayNewInfoAsync(realWay);
+ if (info == null)
+ {
+ //鍏抽棴杩涘害鏉�
+ ProgressBar.Close();
+ return false;
+ }
+ }
+
+ //鑾峰彇鍏ㄩ儴璁惧
+ bool result = await LocalDevice.Current.SetDeviceToMemmoryByGateway(realWay);
+ //鍏抽棴杩涘害鏉�
+ ProgressBar.Close();
+ if (result == false)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /// <summary>
+ /// 淇濆瓨閫夋嫨鐨勭綉鍏矷D鍒版湰鍦�
+ /// </summary>
+ /// <param name="gatewayId"></param>
+ public void SaveGatewayIdToLocation(string gatewayId)
+ {
+ GatewayResourse.AppOldSelectGatewayId = gatewayId;
+ byte[] data = System.Text.Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(GatewayResourse.AppOldSelectGatewayId));
+ Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.AppOldSelectGatewayFile, data);
+ }
+
#endregion
#region 鈻� 鍒犻櫎缃戝叧___________________________
@@ -678,8 +784,8 @@
if (waitTime == true)
{
- //杩欐槸绗竴閬撳潕,寮哄埗妫�鏌IFI:绛夊緟3绉�(鍥犱负wifi鐨勬椂鍊欙紝瀹冧細鑷姩鍘诲埛鏂癴lage)
- System.Threading.Thread.Sleep(3000);
+ //杩欐槸绗竴閬撳潕,寮哄埗妫�鏌IFI:绛夊緟2绉�(鍥犱负wifi鐨勬椂鍊欙紝瀹冧細鑷姩鍘诲埛鏂癴lage)
+ System.Threading.Thread.Sleep(2000);
//妫�鏌ユ槸鍚︽嫢鏈夌綉鍏冲瓨鍦ㄤ簬WIFi涓�
if (this.CheckHadGatewayInWifi(listRealWay) == false)
{
@@ -1053,38 +1159,60 @@
}
/// <summary>
- /// 鑾峰彇缃戝叧闀滃儚绫诲瀷鐨勭炕璇戝悕瀛�
+ /// 璁剧疆缃戝叧闀滃儚绫诲瀷鐨勭炕璇戝悕瀛�
/// </summary>
+ /// <param name="button"></param>
/// <param name="zbGateway"></param>
/// <returns></returns>
- public string GetGatewayImageText(ZbGateway zbGateway)
+ public void SetGatewayImageText(Button button, ZbGateway zbGateway)
{
+ //鍒濆鍊�:鏃犳硶璇嗗埆鐨勭綉鍏宠澶�
+ button.TextID = R.MyInternationalizationString.uUnDistinguishTheGatewayDevice;
+
string gwId = this.GetGatewayId(zbGateway);
- int imageType = -1;
if (this.dicGateway.ContainsKey(gwId) == false || this.dicGateway[gwId].getGwInfo == null)
{
//濡傛灉杩欎釜缃戝叧娌℃湁淇℃伅锛屽垯浠庢柊鑾峰彇
- var result = this.GetGatewayNewInfo(zbGateway, ShowErrorMode.NO);
- if (result == null)
+ if (zbGateway.getGwInfo != null && zbGateway.getGwInfo.LinuxImageType != 0)
{
- //鏃犳硶璇嗗埆鐨勭綉鍏宠澶�
- return Language.StringByID(R.MyInternationalizationString.uUnDistinguishTheGatewayDevice);
+ string keyName = Common.LocalDevice.deviceModelIdName + zbGateway.getGwInfo.LinuxImageType;
+ if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true)
+ {
+ //浣跨敤R鏂囦欢閲岄潰璁剧疆鐨勪笢瑗�
+ button.TextID = LocalDevice.Current.dicDeviceDefultNameID[keyName];
+ }
}
- imageType = result.LinuxImageType;
+ else
+ {
+ //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
+ HdlThreadLogic.Current.RunThread(async () =>
+ {
+ var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
+ if (result != null)
+ {
+ zbGateway.getGwInfo = result;
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ string keyName = Common.LocalDevice.deviceModelIdName + zbGateway.getGwInfo.LinuxImageType;
+ if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true)
+ {
+ //浣跨敤R鏂囦欢閲岄潰璁剧疆鐨勪笢瑗�
+ button.TextID = LocalDevice.Current.dicDeviceDefultNameID[keyName];
+ }
+ });
+ }
+ });
+ }
}
else
{
- imageType = Convert.ToInt32(this.GetGwInfoAttribute(this.dicGateway[gwId], "LinuxImageType"));
+ string keyName = Common.LocalDevice.deviceModelIdName + this.dicGateway[gwId].getGwInfo.LinuxImageType;
+ if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true)
+ {
+ //浣跨敤R鏂囦欢閲岄潰璁剧疆鐨勪笢瑗�
+ button.TextID = Common.LocalDevice.Current.dicDeviceDefultNameID[keyName];
+ }
}
- string keyName = Common.LocalDevice.deviceModelIdName + imageType;
- if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true)
- {
- //浣跨敤R鏂囦欢閲岄潰璁剧疆鐨勪笢瑗�
- return Language.StringByID(Common.LocalDevice.Current.dicDeviceDefultNameID[keyName]);
- }
-
- //鏃犳硶璇嗗埆鐨勭綉鍏宠澶�
- return Language.StringByID(R.MyInternationalizationString.uUnDistinguishTheGatewayDevice);
}
#endregion
@@ -1112,7 +1240,7 @@
//鑾峰彇缃戝叧鐗堟湰淇℃伅
var imageTypeResult = await realWay.GetZbGwInfoAsync();
//妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
- string error = UserCenterLogic.CheckCommonErrorCode(imageTypeResult);
+ string error = HdlCheckLogic.Current.CheckCommonErrorCode(imageTypeResult);
if (error != null)
{
if (mode == ShowErrorMode.YES)
@@ -1160,12 +1288,11 @@
{
bool bolBreak = false;
ZbGatewayData.GetGwData result = null;
- new System.Threading.Thread(async () =>
+ HdlThreadLogic.Current.RunThread(async () =>
{
result = await this.GetGatewayNewInfoAsync(zbGateway, mode);
bolBreak = true;
- })
- { IsBackground = true }.Start();
+ });
while (bolBreak == false)
{
@@ -1292,7 +1419,7 @@
}
var result = await zbTemp.CheckVDDriveCodeAsync();
//妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
- string error = UserCenterLogic.CheckCommonErrorCode(result);
+ string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
if (error != null)
{
this.ShowTipMsg(error);
@@ -1315,7 +1442,7 @@
#region 鈻� 涓荤綉鍏冲垽瀹歘________________________
/// <summary>
- /// 鍒ゆ柇鏄惁涓荤綉鍏�(1:涓荤綉鍏� 0:涓嶅湪绾� -1:杩滅▼妯″紡,涓嶅瓨鍦ㄥ暐涓荤綉鍏崇殑璇存硶)
+ /// 鍒ゆ柇鏄惁涓荤綉鍏�(1:涓荤綉鍏� 0:涓嶅湪绾� 2:瀛愮綉鍏�)
/// </summary>
/// <param name="zbGateway">缃戝叧瀵硅薄</param>
/// <returns></returns>
@@ -1326,7 +1453,7 @@
}
/// <summary>
- /// 鍒ゆ柇鏄惁涓荤綉鍏�(1:涓荤綉鍏� 0:涓嶅湪绾� -1:杩滅▼妯″紡,涓嶅瓨鍦ㄥ暐涓荤綉鍏崇殑璇存硶)
+ /// 鍒ゆ柇鏄惁涓荤綉鍏�(1:涓荤綉鍏� 0:涓嶅湪绾� 2:瀛愮綉鍏�)
/// </summary>
/// <param name="waiID">缃戝叧id</param>
/// <returns></returns>
@@ -1337,7 +1464,7 @@
{
return 0;
}
- return zbGateway.IsMainGateWay == true ? 1 : 0;
+ return zbGateway.IsMainGateWay == true ? 1 : 2;
}
#endregion
@@ -1345,7 +1472,7 @@
#region 鈻� 璁剧疆缃戝叧鍥剧墖_______________________
/// <summary>
- /// 璁剧疆鐪熷疄缃戝叧鐨勫浘鐗囷紝瑙勬牸锛�915X492
+ /// 璁剧疆鐪熷疄缃戝叧鐨勫浘鐗�
/// </summary>
/// <param name="button"></param>
/// <param name="zbGateway"></param>
@@ -1355,31 +1482,35 @@
var localWay = this.GetLocalGateway(gwID);
if (localWay == null || localWay.getGwInfo == null)
{
- //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
- new System.Threading.Thread(async () =>
+ if (zbGateway.getGwInfo != null && zbGateway.getGwInfo.LinuxImageType != 0)
{
- var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
- if (result != null)
+ button.UnSelectedImagePath = "Gateway/RealGateway" + zbGateway.getGwInfo.LinuxImageType + ".png";
+ }
+ else
+ {
+ //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
+ HdlThreadLogic.Current.RunThread(async () =>
{
- Application.RunOnMainThread(() =>
+ var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
+ if (result != null)
{
- if (button != null)
+ zbGateway.getGwInfo = result;
+ HdlThreadLogic.Current.RunMain(() =>
{
button.UnSelectedImagePath = "Gateway/RealGateway" + result.LinuxImageType + ".png";
- }
- });
- }
- })
- { IsBackground = true }.Start();
+ });
+ }
+ });
+ }
}
else
{
- button.UnSelectedImagePath = "Gateway/RealGateway" + this.GetGwInfoAttribute(localWay, "LinuxImageType").ToString() + ".png";
+ button.UnSelectedImagePath = "Gateway/RealGateway" + localWay.getGwInfo.LinuxImageType + ".png";
}
}
/// <summary>
- /// 璁剧疆缃戝叧鍥炬爣锛岃鏍硷細110X110
+ /// 璁剧疆缃戝叧鍥炬爣
/// </summary>
/// <param name="button"></param>
/// <param name="zbGateway"></param>
@@ -1389,29 +1520,30 @@
var localWay = this.GetLocalGateway(gwID);
if (localWay == null || localWay.getGwInfo == null)
{
- //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
- new System.Threading.Thread(async () =>
+ if (zbGateway.getGwInfo != null && zbGateway.getGwInfo.LinuxImageType != 0)
{
- var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
- if (result != null)
+ button.UnSelectedImagePath = "Gateway/GatewayIcon" + zbGateway.getGwInfo.LinuxImageType + ".png";
+ }
+ else
+ {
+ //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
+ HdlThreadLogic.Current.RunThread(async () =>
{
- Application.RunOnMainThread(() =>
+ var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
+ if (result != null)
{
- if (button != null)
+ zbGateway.getGwInfo = result;
+ HdlThreadLogic.Current.RunMain(() =>
{
button.UnSelectedImagePath = "Gateway/GatewayIcon" + result.LinuxImageType + ".png";
- button.SelectedImagePath = "Gateway/GatewayIcon" + result.LinuxImageType + "Selected.png";
- }
- });
- }
- })
- { IsBackground = true }.Start();
+ });
+ }
+ });
+ }
}
else
{
- string linType = this.GetGwInfoAttribute(localWay, "LinuxImageType").ToString();
- button.UnSelectedImagePath = "Gateway/GatewayIcon" + linType + ".png";
- button.SelectedImagePath = "Gateway/GatewayIcon" + linType + "Selected.png";
+ button.UnSelectedImagePath = "Gateway/GatewayIcon" + localWay.getGwInfo.LinuxImageType + ".png";
}
}
@@ -1446,13 +1578,13 @@
#endregion
- #region 鈻� 娴嬭瘯缃戝叧___________________________
+ #region 鈻� 缃戝叧瀹氫綅___________________________
/// <summary>
- /// 鍙戦�佹祴璇曟寚浠ゅ埌璁惧(缃戝叧LED闂儊璇嗗埆)
+ /// 鍙戦�佹寚浠ゅ埌缃戝叧杩涜瀹氫綅(缃戝叧LED闂儊璇嗗埆)
/// </summary>
/// <param name="zbGateway"></param>
- public void SetTestCommand(ZbGateway zbGateway)
+ public void SetFixedPositionCommand(ZbGateway zbGateway)
{
ZbGateway realWay = null;
if (this.GetRealGateway(ref realWay, zbGateway) == false)
@@ -1575,7 +1707,7 @@
return;
}
- new System.Threading.Thread(() =>
+ HdlThreadLogic.Current.RunThread(() =>
{
var dicStatu = this.GetNowOnlineStatuBeforeCheck();
//绛変釜3绉掞紝鍑嗗涓�涓�
@@ -1604,8 +1736,7 @@
}
//灏嗗彉鍖栫殑缃戝叧鎺ㄩ�佸埌鐣岄潰涓�
this.PushGatewayOnlineStatuToForm(dicStatu);
- })
- { IsBackground = true }.Start();
+ });
}
#endregion
@@ -1623,7 +1754,7 @@
return;
}
- new System.Threading.Thread(() =>
+ HdlThreadLogic.Current.RunThread(() =>
{
//鍏堣幏鍙栫幇鍦ㄥ叏閮ㄧ殑缃戝叧锛屽垵鏈熷�よ缃负涓嶅湪绾�
var dicStatu = this.GetNowOnlineStatuBeforeCheck();
@@ -1665,8 +1796,7 @@
string msg = Language.StringByID(R.MyInternationalizationString.uRemoteTimeOutAndNotGatewaiOnline);
//this.ShowTipMsg(msg);
}
- })
- { IsBackground = true }.Start();
+ });
}
#endregion
@@ -1791,7 +1921,7 @@
}
bool canBreak = false;
- new System.Threading.Thread(async () =>
+ HdlThreadLogic.Current.RunThread(async () =>
{
List<string> list = new List<string>() { "NotSetAgain" };
@@ -1817,8 +1947,7 @@
}
dicDbGateway = dic;
canBreak = true;
- })
- { IsBackground = true }.Start();
+ });
int count = 0;
while (canBreak == false)
@@ -1887,7 +2016,7 @@
/// </summary>
public void ResetComandToBindBackupGateway()
{
- new System.Threading.Thread(async () =>
+ HdlThreadLogic.Current.RunThread(async () =>
{
var fileData = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile);
if (fileData == null)
@@ -1936,8 +2065,7 @@
var byteData = System.Text.Encoding.UTF8.GetBytes(strData);
Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile, byteData);
}
- })
- { IsBackground = true }.Start();
+ });
}
#endregion
@@ -2119,19 +2247,19 @@
else if (backType == GatewayBackupEnum.APir鐏厜閰嶇疆)
{
var recoverData = Newtonsoft.Json.JsonConvert.DeserializeObject<IASZone.ConfigureParamates>(System.Text.Encoding.UTF8.GetString(byteData));
- result = await HdlPirSensorLogic.Current.SetPirSensorLightSettion((IASZone)device, recoverData);
+ result = await HdlDevicePirSensorLogic.Current.SetPirSensorLightSettion((IASZone)device, recoverData);
}
else if (backType == GatewayBackupEnum.A骞叉帴鐐归鑹茶皟鑺�)
{
var recoverData = Newtonsoft.Json.JsonConvert.DeserializeObject<Panel.KeyColorData>(System.Text.Encoding.UTF8.GetString(byteData));
- result = await HdlPanelLogic.Current.SetPanelEpointColorInfo((Panel)device, recoverData);
+ result = await HdlDevicePanelLogic.Current.SetPanelEpointColorInfo((Panel)device, recoverData);
}
else if (backType == GatewayBackupEnum.A骞叉帴鐐逛寒搴﹁皟鑺�)
{
var recoverData = Newtonsoft.Json.JsonConvert.DeserializeObject<Newtonsoft.Json.Linq.JObject>(System.Text.Encoding.UTF8.GetString(byteData));
int directionsLevel = Convert.ToInt32(recoverData["directionsLevel"]);
int backlightLevel = Convert.ToInt32(recoverData["backlightLevel"]);
- result = await HdlPanelLogic.Current.SetDeviceLightSettion((Panel)device, directionsLevel, backlightLevel);
+ result = await HdlDevicePanelLogic.Current.SetDeviceLightSettion((Panel)device, directionsLevel, backlightLevel);
}
else if (backType == GatewayBackupEnum.A骞叉帴鐐硅妭鑳芥ā寮�)
{
@@ -2139,12 +2267,21 @@
bool modeEnable = Convert.ToBoolean(recoverData["modeEnable"]);
int modeTime = Convert.ToInt32(recoverData["modeTime"]);
int level = Convert.ToInt32(recoverData["level"]);
- result = await HdlPanelLogic.Current.SetDeviceEnergyConservationMode((Panel)device, modeEnable, modeTime, level);
+ result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode((Panel)device, modeEnable, modeTime, level);
}
else if (backType == GatewayBackupEnum.A骞叉帴鐐圭鏈夊睘鎬�)
{
var recoverData = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(System.Text.Encoding.UTF8.GetString(byteData));
- result = await HdlPanelLogic.Current.EditorDryContactFunction((Panel)device, recoverData);
+ result = await HdlDevicePanelLogic.Current.EditorDryContactFunction((Panel)device, recoverData);
+ }
+ else if (backType == GatewayBackupEnum.A绐楀笜鏂瑰悜)
+ {
+ }
+ else if (backType == GatewayBackupEnum.A绐楀笜鎵嬫媺鎺у埗)
+ {
+ }
+ else if (backType == GatewayBackupEnum.A绐楀笜涓婁笅闄愪綅)
+ {
}
return result == true ? 1 : -1;
}
--
Gitblit v1.8.0