From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 17 十二月 2020 09:07:13 +0800
Subject: [PATCH] 新云端Ver1.3
---
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs | 64 ++++++++++++++++++++-----------
1 files changed, 41 insertions(+), 23 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
index 2fc9508..22b08b0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -91,28 +91,44 @@
//璁剧疆鏍囬淇℃伅
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uDeviceSettion));
- //鍒濆鍖栧彸涓婅鑿滃崟
- this.InitTopRightMenu();
+ //閲嶆柊鑾峰彇纭欢淇℃伅(false:涓嶉渶瑕佽幏鍙�,true:闇�瑕佽幏鍙�)
+ var result = this.RefreshHardFirmwareInfo();
- //鍒濆鍖栦腑閮ㄦ帶浠�
- this.InitMiddleFrame();
-
- //閲嶆柊鑾峰彇纭欢淇℃伅
- this.RefreshHardFirmwareInfo();
-
- //绠�绾﹀鍔熻兘闈㈡澘鑾峰彇缁戝畾鐩爣鐨勬樉绀�
- if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
+ HdlThreadLogic.Current.RunThread(() =>
{
- //绠�绾﹂潰鏉块殢渚夸竴涓洖璺潵鑾峰彇璁惧淇℃伅
- var dev = HdlDeviceCommonLogic.Current.GetDevice(deviceMac, 62);
- if (dev != null)
+ if (result == true)
{
- var key = new ZigBee.Device.Panel();
- key.DeviceAddr = deviceMac;
- key.CurrentGateWayId = dev.CurrentGateWayId;
- InitBindInfo(key);
+ //濡傛灉闇�瑕侀噸鏂板幓璇诲彇璁惧鐨勪俊鎭墠鑳芥樉绀虹晫闈㈢殑璇�,绛夊緟涓�娈垫椂闂�
+ this.ShowProgressBar();
+ System.Threading.Thread.Sleep(1500);
}
- }
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ //鍒濆鍖栧彸涓婅鑿滃崟
+ this.InitTopRightMenu();
+
+ //鍒濆鍖栦腑閮ㄦ帶浠�
+ this.InitMiddleFrame();
+
+ //绠�绾﹀鍔熻兘闈㈡澘鑾峰彇缁戝畾鐩爣鐨勬樉绀�
+ if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
+ {
+ //绠�绾﹂潰鏉块殢渚夸竴涓洖璺潵鑾峰彇璁惧淇℃伅
+ var dev = HdlDeviceCommonLogic.Current.GetDevice(deviceMac, 62);
+ if (dev != null)
+ {
+ var key = new ZigBee.Device.Panel();
+ key.DeviceAddr = deviceMac;
+ key.CurrentGateWayId = dev.CurrentGateWayId;
+ InitBindInfo(key);
+ }
+ }
+ if (result == true)
+ {
+ this.CloseProgressBar();
+ }
+ });
+ });
}
/// <summary>
@@ -968,13 +984,13 @@
if (Common.Config.Instance.Home.IsShowTemplate == true)
{
btnSwitch.CanClick = false;
- btnSwitch.IsSelected = TemplateData.TemplateDeviceDataLogic.Current.GetCurtainHandPullControl(deviceCurtain);
+ btnSwitch.IsSelected = HdlTemplateDeviceDataLogic.Current.GetCurtainHandPullControl(deviceCurtain);
return;
}
//濡傛灉鏄櫄鎷熶綇瀹�
if (Common.Config.Instance.Home.IsVirtually == true)
{
- btnSwitch.IsSelected = TemplateData.TemplateDeviceDataLogic.Current.GetCurtainHandPullControl(deviceCurtain);
+ btnSwitch.IsSelected = HdlTemplateDeviceDataLogic.Current.GetCurtainHandPullControl(deviceCurtain);
return;
}
@@ -1779,17 +1795,19 @@
#region 鈻� 纭欢淇℃伅___________________________
/// <summary>
- /// 閲嶆柊鑾峰彇纭欢淇℃伅
+ /// 閲嶆柊鑾峰彇纭欢淇℃伅(false:涓嶉渶瑕佽幏鍙�,true:闇�瑕佽幏鍙�)
/// </summary>
- private void RefreshHardFirmwareInfo()
+ private bool RefreshHardFirmwareInfo()
{
if (listNewDevice[0].DriveCode > 0 || Common.Config.Instance.Home.IsShowTemplate == true)
{
//铏氭嫙璁惧娌℃湁杩欑鎿嶄綔
- return;
+ return false;
}
//閲嶆柊鑾峰彇纭欢淇℃伅
HdlDeviceAttributeLogic.Current.ReadDeviceAllHardFirmwareInfo(listNewDevice[0]);
+ //鑾峰彇璁惧鐨勫浐瀹氬睘鎬�
+ return HdlDeviceAttributeLogic.Current.ReadDeviceAllFixedAttribute(listNewDevice[0]);
}
#endregion
--
Gitblit v1.8.0