From e90209beae6a4e822cecb18e6889f8bda23f630e Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 14 十二月 2020 11:16:06 +0800
Subject: [PATCH] 合并了晾衣架(非新云端)
---
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs | 37 ++++++++++++++++++-------------------
1 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs
index b98747a..f65d1cc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs
@@ -58,9 +58,9 @@
public void ShowForm(CommonDevice i_device)
{
this.deviceObj = i_device;
- var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceObj.DeviceAddr);
+ var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceObj.DeviceAddr);
//鑾峰彇杩欎竴鍫嗚澶囨椂灞炰簬浠�涔堢被鍨嬬殑
- this.deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(listDevice);
+ this.deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice);
//璁剧疆澶撮儴淇℃伅
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uDryContactSettion));
@@ -103,18 +103,18 @@
this.ShowProgressBar();
foreach (var epoint in dicDeviceSaveName.Keys)
{
- var device = HdlDeviceCommonLogic.Current.GetDevice(deviceObj.DeviceAddr, epoint);
+ var device = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, epoint);
if (device == null || dicDeviceSaveName[epoint] == string.Empty)
{
//涓嶈兘鍏佽绌虹櫧鍚嶅瓧
continue;
}
string newName = dicDeviceSaveName[epoint];
- string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
+ string oldName = Common.LocalDevice.Current.GetDeviceEpointName(device);
if (oldName != newName)
{
//璁惧鍚嶇О淇敼
- var result = HdlDeviceCommonLogic.Current.ReName(device, newName);
+ var result = Common.LocalDevice.Current.ReName(device, newName);
if (result == false)
{
//鍏抽棴
@@ -143,7 +143,7 @@
//骞叉帴鐐瑰娉�
string caption = Language.StringByID(R.MyInternationalizationString.uDryContactNote);
- string nameValue = HdlDeviceCommonLogic.Current.GetDeviceEpointName(nowSelectDevice);
+ string nameValue = Common.LocalDevice.Current.GetDeviceEpointName(nowSelectDevice);
if (dicDeviceSaveName.ContainsKey(nowSelectDevice.DeviceEpoint) == true)
{
nameValue = dicDeviceSaveName[nowSelectDevice.DeviceEpoint];
@@ -159,7 +159,7 @@
{
frameDeviceName.txtInput.FinishInputEvent += () =>
{
- string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(nowSelectDevice);
+ string oldName = Common.LocalDevice.Current.GetDeviceEpointName(nowSelectDevice);
if (frameDeviceName.Text.Trim() == string.Empty)
{
//灏嗗悕瀛楄繕鍘�
@@ -168,7 +168,7 @@
if (oldName != frameDeviceName.Text.Trim())
{
//璁惧鍚嶇О淇敼
- var result = HdlDeviceCommonLogic.Current.ReName(nowSelectDevice, frameDeviceName.Text.Trim());
+ var result = Common.LocalDevice.Current.ReName(nowSelectDevice, frameDeviceName.Text.Trim());
if (result == false)
{
return;
@@ -195,7 +195,7 @@
//3璺户鐢靛櫒鎴栬��1璺皟鍏夊櫒绗竷鍥炶矾鐨勯厤缃俊鎭�
List<CommonDevice.AttributeDataObj> listRelayInfo7 = null;
- bool isHdlDevice = HdlDeviceCommonLogic.Current.IsHdlDevice(nowSelectDevice);
+ bool isHdlDevice = Common.LocalDevice.Current.IsHdlDevice(nowSelectDevice);
//娌充笢璁惧鎵嶄細寮�鍚閫夐」
if (isHdlDevice == true)
{
@@ -240,7 +240,7 @@
private void InitTopRightMenu()
{
//妫�娴嬫鍥炶矾鏄惁鎷ユ湁瀹氫綅鍔熻兘
- if (HdlDeviceCommonLogic.Current.DeviceIsCanFixedPosition(nowSelectDevice) == false
+ if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(nowSelectDevice) == false
|| Common.Config.Instance.Home.IsShowTemplate == true)
{
return;
@@ -264,7 +264,7 @@
int menuCount = 1;
string deviceMenu = string.Empty;
//妫�娴嬫鍥炶矾鏄惁鎷ユ湁瀹氫綅鍔熻兘
- bool canTest = HdlDeviceCommonLogic.Current.DeviceIsCanFixedPosition(nowSelectDevice);
+ bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(nowSelectDevice);
//if (canTest == true)
//{
// menuCount = 2;
@@ -277,7 +277,7 @@
frame.AddRowMenu(deviceMenu, "Item/FixedPosition.png", "Item/FixedPositionSelected.png", () =>
{
//鍙戦�佸畾浣嶅姛鑳�
- HdlDeviceCommonLogic.Current.SetFixedPositionCommand(nowSelectDevice);
+ Common.LocalDevice.Current.SetFixedPositionCommand(nowSelectDevice);
});
}
@@ -423,13 +423,13 @@
private void AddBackLightRow()
{
//涓夎矾缁х數鍣�,鎴栬�呬竴璺皟鍏夊櫒 鐨勬椂鍊欐墠鑳藉紑鍚閫夐」
- var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceObj.DeviceAddr);
- var myType = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(listDevice);
+ var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceObj.DeviceAddr);
+ var myType = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice);
+ //娆ф爣2璺�5A娌℃湁鑳屽厜鐏�
if (myType.ConcreteType == DeviceConcreteType.Relay_ThreeLoad
|| myType.ConcreteType == DeviceConcreteType.DimmableLight_OneLoad
|| myType.ConcreteType == DeviceConcreteType.Relay_NationalThreeLoadTenA
- || myType.ConcreteType == DeviceConcreteType.Relay_EuropeanTwoLoadFiveA
|| myType.ConcreteType == DeviceConcreteType.Relay_SevenLoadInOutPutDryContact)
{
//鑳屽厜鐏�
@@ -444,10 +444,9 @@
btnLight.ButtonClickEvent += (sender, e) =>
{
if (myType.ConcreteType == DeviceConcreteType.Relay_NationalThreeLoadTenA
- || myType.ConcreteType == DeviceConcreteType.Relay_EuropeanTwoLoadFiveA
|| myType.ConcreteType == DeviceConcreteType.Relay_SevenLoadInOutPutDryContact)
{
- //鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡 鎴栬�� 娆ф爣2璺�5A缁х數鍣ㄥ皬妯″潡 鎴栬�� 7璺共鎺ョ偣杈撳叆杈撳嚭妯″潡
+ //鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡 鎴栬�� 7璺共鎺ョ偣杈撳叆杈撳嚭妯″潡
var form = new DeviceRelay.RelayNationalBackLightSettionForm();
form.AddForm(deviceObj.DeviceAddr);
}
@@ -580,7 +579,7 @@
private List<List<CommonDevice>> GetAllDeviceGroup()
{
bool hadDevice = false;
- var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceObj.DeviceAddr);
+ var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceObj.DeviceAddr);
var listRelay = new List<CommonDevice>();
foreach (var device in listDevice)
{
@@ -661,7 +660,7 @@
nowContr.TextColor = UserCenterColor.Current.TextColor1;
nowSelectControl = nowContr;
- nowSelectDevice = HdlDeviceCommonLogic.Current.GetDevice(deviceObj.DeviceAddr, Convert.ToInt32(nowContr.Name.Replace("btn", string.Empty)));
+ nowSelectDevice = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, Convert.ToInt32(nowContr.Name.Replace("btn", string.Empty)));
//閲嶆柊鍒濆鍖栬彍鍗曡
this.InitMenuRow();
--
Gitblit v1.8.0