From 0d9f64668fd7350d6a21fd157e32009a96d98134 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 16 十二月 2020 13:09:08 +0800
Subject: [PATCH] 新云端代码Ver1.2
---
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs | 48 ++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
index ead44e9..52239f1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
@@ -72,7 +72,7 @@
//璁剧疆鏍囬淇℃伅
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice));
- this.gatewayId = GatewayResourse.NowSelectGatewayId;
+ this.gatewayId = HdlGatewayResourse.NowSelectGatewayId;
HdlGatewayLogic.Current.GetRealGateway(ref this.realGateway, this.gatewayId);
//鍒濆鍖栦腑閮ㄦ帶浠�
@@ -163,7 +163,7 @@
return;
}
//鏍规嵁璁惧Type鍒涘缓瀵瑰簲鐨勮澶囧璞�
- var device = Common.LocalDevice.Current.NewDeviceObjectByDeviceId((DeviceType)jobject.Value<int>("Device_ID"), jobject.Value<int>("Epoint"));
+ var device = HdlDeviceCommonLogic.Current.NewDeviceObjectByDeviceId((DeviceType)jobject.Value<int>("Device_ID"), jobject.Value<int>("Epoint"));
if (device == null)
{
return;
@@ -171,14 +171,14 @@
device.DeviceInfo = info;
//缁欐柊璁惧璁剧疆涓婚敭灞炴��
- Common.LocalDevice.Current.SetNewDeviceMainKeys(device, jobject);
+ HdlDeviceCommonLogic.Current.SetNewDeviceMainKeys(device, jobject);
device.CurrentGateWayId = this.realGateway.GwId;
//灏咲eviceInfo鐨勫睘鎬ц缃埌涓诲睘鎬т腑
- Common.LocalDevice.Current.SetDeviceInfoToMain(device, device);
+ HdlDeviceCommonLogic.Current.SetDeviceInfoToMain(device, device);
//娣诲姞璁惧鐨勭紦瀛�
device.IsOnline = 1;
- Common.LocalDevice.Current.AddDeviceToMemory(ref device);
+ HdlDeviceCommonLogic.Current.AddDeviceToMemory(ref device);
//鍒锋柊瓒呮椂鏃堕棿
this.waitDeviceTimeOut = 20;
@@ -236,14 +236,17 @@
device.ReSave();
//璁剧疆璁惧鍔熻兘绫诲瀷 (涓嶈兘鍦ㄦ帴鏀跺洖璺殑鍦版柟鍐欏叆,涓嶇劧缃戝叧鍙兘浼氳秴璐熻嵎)
- Common.LocalDevice.Current.RefreshDeviceFunctionType(device, device, true);
+ HdlDeviceCommonLogic.Current.RefreshDeviceFunctionType(device, device, true);
System.Threading.Thread.Sleep(200);
//鑾峰彇璁惧鐨勫浐瀹氬睘鎬�
- if (HdlDeviceFixedAttributeLogic.Current.SetAllFixedAttributeToDevice(device) == true)
+ if (HdlDeviceAttributeLogic.Current.ReadDeviceAllFixedAttribute(device) == true)
{
System.Threading.Thread.Sleep(200);
}
}
+
+ //璇诲彇璁惧鐨勫叾浠栦俊鎭�
+ this.ReadDeviceOtherInfo(listDevice);
//鐩墠灏卞紕涓�涓�
HdlThreadLogic.Current.RunMain(() =>
@@ -269,7 +272,7 @@
if (this.targetFormId != string.Empty)
{
//鍐嶅叧闂澶囧叆缃戞寚瀵肩晫闈�
- this.CloseFormByFormName(this.targetFormId);
+ HdlFormLogic.Current.CloseFormByFormName(this.targetFormId);
}
//娣诲姞璁惧
@@ -546,6 +549,35 @@
#endregion
+ #region 鈻� 涓�鑸柟娉昣__________________________
+
+ /// <summary>
+ /// 璇诲彇璁惧鐨勫叾浠栦俊鎭�
+ /// </summary>
+ /// <param name="listDevice"></param>
+ private void ReadDeviceOtherInfo(List<CommonDevice> listDevice)
+ {
+ var myTypeInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(listDevice);
+ if (myTypeInfo.BeloneType == DeviceBeloneType.A绐楀笜 && listDevice[0] is Rollershade)
+ {
+ HdlThreadLogic.Current.RunThread(async () =>
+ {
+ for (int i = 1; i <= 3; i++)
+ {
+ //閲嶇疆绐楀笜
+ var result = await HdlDeviceCurtainLogic.Current.RestoreCurtain((Rollershade)listDevice[0], i != 3 ? ShowErrorMode.NO : ShowErrorMode.YES);
+ if (result == true)
+ {
+ return;
+ }
+ await System.Threading.Tasks.Task.Delay(1000);
+ }
+ });
+ }
+ }
+
+ #endregion
+
#region 鈻� 缁撴瀯浣揰____________________________
/// <summary>
--
Gitblit v1.8.0