From dfd3bdc07c49fab66b38382e0bbe7c91bdf4f15b Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 28 四月 2020 15:03:43 +0800
Subject: [PATCH] 合并新代码,提供逻辑需要的门锁接口
---
ZigbeeApp/Home.Ios/Resources/Language.ini | 2
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs | 15
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs | 2
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs | 108 ++-
ZigbeeApp/Home.Ios/Home.IOS.csproj | 6
ZigbeeApp/Shared/Phone/Device/DeviceLogic/ReadDeviceAttributeLogic.cs | 52 +
ZigbeeApp/Shared/Phone/ZigBee/Device/HumiditySensor.cs | 1
ZigbeeApp/Shared/R.cs | 12
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs | 12
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs | 14
ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected2.png | 0
ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAcDetailCardForm.cs | 5
ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected.png | 0
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs | 11
ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs | 171 ++++--
ZigbeeApp/Shared/Common/Device.cs | 43
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs | 506 +++++++++++++-----
ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs | 3
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs | 2
ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirPic.png | 0
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs | 51 +
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs | 2
ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs | 1
ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs | 322 ++++++++++++
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs | 29 +
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs | 52 +
ZigbeeApp/Shared/Shared.projitems | 2
ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs | 105 ++++
ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 10
ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpoint.png | 0
ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirRealDevicePic.png | 0
ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs | 14
ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs | 2
33 files changed, 1,253 insertions(+), 302 deletions(-)
diff --git a/ZigbeeApp/Home.Ios/Home.IOS.csproj b/ZigbeeApp/Home.Ios/Home.IOS.csproj
index 308ee69..d98b09b 100644
--- a/ZigbeeApp/Home.Ios/Home.IOS.csproj
+++ b/ZigbeeApp/Home.Ios/Home.IOS.csproj
@@ -108,6 +108,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
+ <Folder Include="Resources\Phone\FreshAir\" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="LaunchScreen.storyboard" />
@@ -1009,6 +1010,11 @@
<BundleResource Include="Resources\Phone\Gateway\WiredGateway.png" />
<BundleResource Include="Resources\Phone\Gateway\WirelessGateway.png" />
<BundleResource Include="Resources\Phone\Gateway\AddGatewaySuccess.png" />
+ <BundleResource Include="Resources\Phone\FreshAir\FreshAirPic.png" />
+ <BundleResource Include="Resources\Phone\Device\FreshAirEpoint.png" />
+ <BundleResource Include="Resources\Phone\Device\FreshAirEpointSelected.png" />
+ <BundleResource Include="Resources\Phone\Device\FreshAirEpointSelected2.png" />
+ <BundleResource Include="Resources\Phone\FreshAir\FreshAirRealDevicePic.png" />
</ItemGroup>
<Import Project="..\Shared\Shared.projitems" Label="Shared" Condition="Exists('..\Shared\Shared.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini
index 05fabd8..eac7933 100755
--- a/ZigbeeApp/Home.Ios/Resources/Language.ini
+++ b/ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -313,6 +313,7 @@
308=璀﹀憡锛佹椂鏁堟�у父寮�鍒犻櫎澶辫触銆�
309=鏃舵晥鎬у父寮�鍒犻櫎澶辫触锛岀户缁�滃父寮�妯″紡鈥濊鍓嶅線闂ㄩ攣鐢ㄦ埛鐣岄潰璁剧疆;
310=璇疯緭鍏ュ悎娉曠殑鏁板瓧
+311=鎵嬪姩
5097=鍙栨秷
5098=纭畾
@@ -1951,6 +1952,7 @@
40015=鎻掑骇
40016=鐏厜
40017=骞叉帴鐐�
+40018=鏂伴
;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勮澶囬粯璁ゅ娉ㄥ悕瀛�,浠�50000寮�濮�.娉�:瀹冨苟涓嶉渶瑕佸啀R.cs鏂囦欢涓畾涔夆槄鈽呪槄鈽�
50000=绱ф�ユ寜閽�
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpoint.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpoint.png
new file mode 100644
index 0000000..c637e9b
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpoint.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected.png
new file mode 100644
index 0000000..d028074
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected2.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected2.png
new file mode 100644
index 0000000..14d38c3
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected2.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirPic.png b/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirPic.png
new file mode 100644
index 0000000..fc08f7b
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirPic.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirRealDevicePic.png b/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirRealDevicePic.png
new file mode 100644
index 0000000..721a5dd
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirRealDevicePic.png
Binary files differ
diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index 15dcb3c..197639c 100644
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -1770,7 +1770,7 @@
//14鏂伴璁惧
else if (dicType.ContainsKey(DeviceType.FreshAir) == true)
{
- info.ConcreteTextId = R.MyInternationalizationString.DeviceModelId2310;
+ info.ConcreteTextId = R.MyInternationalizationString.uDeviceModelId2310;
info.BeloneType = DeviceBeloneType.A鏂伴;
info.ConcreteType = DeviceConcreteType.Relay_FangyueFreshAirModul;
info.ObjectTypeNameId = 60011;//鏂伴
@@ -2024,14 +2024,14 @@
list.Add(DeviceBeloneType.A鎻掑骇);
list.Add(DeviceBeloneType.A璋冨厜鍣�);
list.Add(DeviceBeloneType.A绐楀笜);
+ list.Add(DeviceBeloneType.A鏂伴);
list.Add(DeviceBeloneType.A绌鸿皟);
list.Add(DeviceBeloneType.A缁х數鍣�);
list.Add(DeviceBeloneType.A骞叉帴鐐�);
list.Add(DeviceBeloneType.A鏅鸿兘闂ㄩ攣);
list.Add(DeviceBeloneType.A鏅鸿兘绌哄紑);
- list.Add(DeviceBeloneType.A浼犳劅鍣�);
-
- //鍏朵粬鐨勭湅鐫�鍔炲憲,閮芥槸鎺掑湪鍚庨潰鐨�,閮藉綊涓鸿繖涓睘鎬�
+ list.Add(DeviceBeloneType.A浼犳劅鍣�);
+ //鍏朵粬鐨勭湅鐫�鍔炲憲,閮芥槸鎺掑湪鍚庨潰鐨�,閮藉綊涓鸿繖涓睘鎬�
list.Add(DeviceBeloneType.A鏈煡璁惧);
return list;
@@ -2509,7 +2509,10 @@
else if (deviceType == DeviceType.FreshAir) { device = new FreshAir(); }
else if (deviceType == DeviceType.DoorLock) { device = new DoorLock(); }
else if (deviceType == DeviceType.TemperatureSensor) { device = new TemperatureSensor(); }
- else if (deviceType == DeviceType.FreshAirHumiditySensor) { device = new HumiditySensor(); }
+ else if (deviceType == DeviceType.FreshAirHumiditySensor)
+ {
+ device = new HumiditySensor();
+ }
else if (deviceType == DeviceType.OtaDevice || deviceType == DeviceType.OtaPanelDevice) { device = new OTADevice(); }
else { return null; }
@@ -2648,13 +2651,12 @@
this.dicDeviceModelIdChanged["MULTI-FIRE--EA05"] = "MSS01/M-ZB.10";//鐑熼浘浼犳劅鍣�
this.dicDeviceModelIdChanged["MULTI-MOTI--EA04"] = "MSPIR01/M-ZB.10";//绾㈠浼犳劅鍣�
this.dicDeviceModelIdChanged["MULTI-WATE--EA02"] = "MSW01/M-ZB.10";//姘存蹈浼犳劅鍣�
- this.dicDeviceModelIdChanged["MULTI-BURO--EA06"] = "MBU01/M-ZB.10";//绱ф�ユ寜閿�
-
-
-
- //鉁┾湬鉁┾湬鉁╅渶瑕佸叡鏈夌殑鍥剧墖瀵硅薄鉁┾湬鉁┾湬鉁�
- //涓よ�呴兘鏄疍eviceConcreteType
- //Keys:鎸囧畾鐨勮澶� value:娌跨敤鐨勫浘鐗囨槸鍝璁惧鐨�
+ this.dicDeviceModelIdChanged["MULTI-BURO--EA06"] = "MBU01/M-ZB.10";//绱ф�ユ寜閿�
+
+
+ //鉁┾湬鉁┾湬鉁╅渶瑕佸叡鏈夌殑鍥剧墖瀵硅薄鉁┾湬鉁┾湬鉁�
+ //涓よ�呴兘鏄疍eviceConcreteType
+ //Keys:鎸囧畾鐨勮澶� value:娌跨敤鐨勫浘鐗囨槸鍝璁惧鐨�
this.dicPictrueShard = new Dictionary<string, string>();
this.dicPictrueShard["ButtonPanel_SimpleFour"] = "ButtonPanel_Four";//绠�绾�4鎸夐敭闈㈡澘 娌跨敤 4鎸夐敭鐨勫浘鏍�
this.dicPictrueShard["ButtonPanel_SimpleThree"] = "ButtonPanel_Three";//绠�绾�3鎸夐敭闈㈡澘 娌跨敤 3鎸夐敭鐨勫浘鏍�
@@ -2822,6 +2824,11 @@
/// </summary>
Sensor_Humidity = -1310,
+ /// <summary>
+ /// PM2.5浼犳劅鍣�
+ /// </summary>
+ Sensor_PM = -1311,
+
//=========鈽呪槄缁х數鍣ㄧ被(2300-2499)鈽呪槄=========
/// <summary>
/// 缁х數鍣�
@@ -2946,7 +2953,7 @@
/// <summary>
/// 鎸夐敭闈㈡澘(200-1199)
/// </summary>
- A鎸夐敭闈㈡澘 = 200,
+ A鎸夐敭闈㈡澘 = 200,
/// <summary>
/// 浼犳劅鍣�(1200-2299)
/// </summary>
@@ -2954,7 +2961,11 @@
/// <summary>
/// 缁х數鍣�(2300-2499)
/// </summary>
- A缁х數鍣� = 2300,
+ A缁х數鍣� = 2300,
+ /// <summary>
+ /// 鏂伴
+ /// </summary>
+ A鏂伴 = 2310,
/// <summary>
/// 璋冨厜鍣�(2500-2799)
/// </summary>
@@ -3011,10 +3022,6 @@
/// 骞叉帴鐐�
/// </summary>
A骞叉帴鐐� = 16,
- /// <summary>
- /// 鏂伴
- /// </summary>
- A鏂伴 = 17
}
#endregion
diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
index 913be70..2e14264 100644
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -525,8 +525,8 @@
}
// 鏂伴
else if (device.Type == DeviceType.FreshAir)
- {
- cardContr = new Controls.DeviceAcRowControl(listView.rowSpace / 2);
+ {
+ cardContr = new Controls.DeviceFreshAirRowControl(listView.rowSpace / 2);
}
//褰╃伅(璋冨厜鍣�)
else if (device.Type == DeviceType.DimmableLight)
@@ -780,6 +780,11 @@
//绌鸿皟鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉
this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
}
+ if (report.DeviceStatusReport.CluterID == 514 && report.DeviceStatusReport.AttriBute[0].AttributeId == 0)
+ {
+ //鏂伴鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉
+ this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
+ }
this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
}
}, ShowErrorMode.NO);
@@ -886,6 +891,11 @@
LocalDevice.Current.GetDeviceObjectIcon(typeInfo.ConcreteType, ref path1, ref path2);
dic[typeInfo.BeloneTextId].IconPath = path1;
dic[typeInfo.BeloneTextId].IconPathSelected = path2;
+ if (device.Type == DeviceType.FreshAir)
+ {
+ dic[typeInfo.BeloneTextId].IconPath = "Device/FreshAirEpoint.png";
+ dic[typeInfo.BeloneTextId].IconPathSelected = "Device/FreshAirEpointSelected.png";
+ }
dic[typeInfo.BeloneTextId].TextId = typeInfo.BeloneTextId;
}
dic[typeInfo.BeloneTextId].listDeviceKeys.Add(LocalDevice.Current.GetDeviceMainKeys(device));
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs
new file mode 100644
index 0000000..c2ab4b8
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs
@@ -0,0 +1,105 @@
+锘縰sing System;
+using Shared.Phone.UserCenter;
+using ZigBee.Device;
+
+namespace Shared.Phone.Category.Controls
+{
+ /// <summary>
+ /// 鍒嗙被鐣岄潰鐨勬柊椋庤澶囪鎺т欢
+ /// </summary>
+ public class DeviceFreshAirRowControl : DeviceRowCommon
+ {
+ /// <summary>
+ /// 鍒嗙被鐣岄潰鐨勬柊椋庤澶囪鎺т欢
+ /// </summary>
+ /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+ public DeviceFreshAirRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
+ {
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栨帶浠�
+ /// </summary>
+ /// <param name="i_device"></param>
+ public override void InitControl(CommonDevice i_device)
+ {
+ base.InitControl(i_device);
+
+ //娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+ this.AddDetailInfoEvent(i_device);
+
+ //娣诲姞寮�鍏虫帶浠�
+ var btnSwitch = this.AddSwitchControl();
+ btnSwitch.ButtonClickEvent += (sender, e) =>
+ {
+ bool setStatu = !btnSwitch.IsSelected;
+ //鍙樻洿鍗$墖鐘舵��
+ this.SetRowOpenStatu(setStatu);
+ //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅
+ this.StartCheckResponeResult(!setStatu);
+
+ if (setStatu == true)
+ {
+ //鎵撳紑
+ this.SetDeviceStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1));
+ (i_device as FreshAir).Open();
+ }
+ else
+ {
+ //鍏抽棴
+ this.SetDeviceStatuText(Language.StringByID(R.MyInternationalizationString.Close));
+ (i_device as FreshAir).Close();
+ }
+ };
+ }
+
+ #region 鈻� 娣卞害鍗$墖淇℃伅_______________________
+
+ /// <summary>
+ /// 娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+ /// </summary>
+ private void AddDetailInfoEvent(CommonDevice i_device)
+ {
+ //娣卞害鍗$墖淇℃伅
+ this.frameTable.ButtonClickEvent += (sender, e) =>
+ {
+ //鏂伴绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈�
+ var form = new MainPage.ControlForm.DeviceFreshAirDetailCardForm();
+ form.AddForm(i_device, HdlRoomLogic.Current.CurrentRoom, 965, 1374);
+ form.FormCloseEvent += this.CardDetailInfoBackEvent;
+ };
+ }
+
+ #endregion
+
+ #region 鈻� 妫�娴嬭澶囨墦寮�鐘舵�乢__________________
+
+ /// <summary>
+ /// 妫�娴嬭澶囨墦寮�鐘舵��
+ /// </summary>
+ /// <param name="i_device"></param>
+ /// <returns></returns>
+ public override bool CheckIsOpenStatu(CommonDevice i_device)
+ {
+ return ((FreshAir)i_device).currentFanStatus != 0;
+ }
+
+ #endregion
+
+ #region 鈻� 鍙戦�佽幏鍙栫姸鎬佸懡浠__________________
+
+ /// <summary>
+ /// 鍙戦�佽幏鍙栫姸鎬佸懡浠�
+ /// </summary>
+ public override void SendStatuComand()
+ {
+ //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
+ if (this.CheckCanSendStatuComand() == true)
+ {
+ Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendFreshAirStatuComand(this.device);
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/DeviceLogic/ReadDeviceAttributeLogic.cs b/ZigbeeApp/Shared/Phone/Device/DeviceLogic/ReadDeviceAttributeLogic.cs
old mode 100755
new mode 100644
index 0515eab..746a189
--- a/ZigbeeApp/Shared/Phone/Device/DeviceLogic/ReadDeviceAttributeLogic.cs
+++ b/ZigbeeApp/Shared/Phone/Device/DeviceLogic/ReadDeviceAttributeLogic.cs
@@ -17,7 +17,7 @@
{
get
{
- if(_instance == null)
+ if (_instance == null)
{
_instance = new ReadDeviceAttributeLogic();
}
@@ -27,6 +27,56 @@
#endregion
+ #region 鈼� 鏂伴____________________________
+ /// <summary>
+ /// SendFreshAirStatuComand
+ /// </summary>
+ /// <param name="device">璁惧</param>
+ public void SendFreshAirStatuComand(CommonDevice device)
+ {
+ if (device == null)
+ {
+ return;
+ }
+ new System.Threading.Thread(() =>
+ {
+ SendFreshAirFanStatuComand(device);
+ System.Threading.Thread.Sleep(300);
+ })
+ { IsBackground = true }.Start();
+ }
+
+ /// <summary>
+ /// SendFanStatuComand
+ /// </summary>
+ /// <param name="device">璁惧</param>
+ private void SendFreshAirFanStatuComand(CommonDevice device)
+ {
+ if (device == null)
+ {
+ return;
+ }
+ var jObject = new Newtonsoft.Json.Linq.JObject
+ {
+ { "DeviceAddr",device.DeviceAddr },
+ { "Epoint", device.DeviceEpoint },
+ { "Cluster_ID", (int)Cluster_ID.FanControl },
+ { "Command", 108 }
+ };
+ var attriBute = new Newtonsoft.Json.Linq.JArray
+ {
+ new Newtonsoft.Json.Linq.JObject
+ {
+ { "AttriButeId", (int)AttriButeId.FanMode}
+ }
+ };
+ var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
+ jObject.Add("Data", data);
+ device.Gateway?.Send("GetDeviceStatus", jObject.ToString());
+ }
+
+ #endregion
+
#region 鈼� 绌鸿皟____________________________
/// <summary>
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAcDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAcDetailCardForm.cs
old mode 100755
new mode 100644
index 9631854..a8c383d
--- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAcDetailCardForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAcDetailCardForm.cs
@@ -13,8 +13,7 @@
/// </summary>
public class DeviceAcDetailCardForm : DeviceDetailCardCommonForm
{
- #region 鈻� 鍙橀噺澹版槑___________________________
-
+ #region 鈻� 鍙橀噺澹版槑___________________________
/// <summary>
/// 鐣岄潰涓婂彲浠ユ搷浣滅殑鎺т欢
/// </summary>
@@ -67,7 +66,7 @@
public override void InitMiddleFrameAfter(FrameLayout frameWhiteBack)
{
//宸︽粦涓嶈兘
- this.ScrollEnabled = false;
+ this.ScrollEnabled = true;
this.deviceAc = (AC)this.device;
//鍏堟竻绌�
this.listControl = new List<ButtonBase>();
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs
new file mode 100644
index 0000000..32925fc
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs
@@ -0,0 +1,322 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared.Common;
+using Shared.Phone.UserCenter;
+using ZigBee.Device;
+
+namespace Shared.Phone.MainPage.ControlForm
+{
+ /// <summary>
+ /// 鏂伴绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈�
+ /// </summary>
+ public class DeviceFreshAirDetailCardForm : DeviceDetailCardCommonForm
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+ /// <summary>
+ /// 鐣岄潰涓婂彲浠ユ搷浣滅殑鎺т欢
+ /// </summary>
+ private List<ButtonBase> listControl = new List<ButtonBase>();
+ /// <summary>
+ /// 鎺т欢
+ /// </summary>
+ private FreshAir FreshAirDev = null;
+ /// <summary>
+ /// 鐘舵�佹帶浠�
+ /// </summary>
+ private NormalViewControl btnStatu = null;
+ /// <summary>
+ /// 褰撳墠鐨勬枃鏈�
+ /// </summary>
+ private string CurrentText = string.Empty;
+
+ /// <summary>
+ /// 璁惧鍚嶇О鎺т欢
+ /// </summary>
+ private NormalViewControl btnDeviceName = null;
+
+ #endregion
+
+
+ #region 鈻� 鍒濆鍖朹____________________________
+ public override void InitMiddleFrameAfter(FrameLayout frameWhiteBack)
+ {
+
+ //宸︽粦涓嶈兘
+ this.ScrollEnabled = true;
+ this.FreshAirDev = (FreshAir)this.device;
+ //鍏堟竻绌�
+ this.listControl = new List<ButtonBase>();
+ InitFreshAirControl(frameWhiteBack);
+ UpdateStatus();
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栨柊椋庢帶浠�
+ /// </summary>
+ /// <param name="frameWhiteBack"></param>
+ private void InitFreshAirControl(FrameLayout frameWhiteBack)
+ {
+ //鏂伴鎺т欢鐨勫鍣�
+ var frameAcBack = new FrameLayout();
+ frameAcBack.Y = Application.GetRealHeight(262);
+ frameAcBack.Width = Application.GetMinRealAverage(444);
+ frameAcBack.Height = Application.GetMinRealAverage(444);
+ frameAcBack.Gravity = Gravity.CenterHorizontal;
+ frameAcBack.BackgroundImagePath = "FreshAir/FreshAirPic.png";
+ frameWhiteBack.AddChidren(frameAcBack);
+
+ // 鑷姩锛堢1涓紝listControl銆�0銆戯級
+ var btnAuto = new NormalViewControl(213, 63, true);
+ btnAuto.X = Application.GetRealWidth(275);
+ btnAuto.Y = Application.GetRealHeight(821);
+ btnAuto.TextID = R.MyInternationalizationString.Mode_Auto;
+ btnAuto.TextColor = ZigbeeColor.Current.XMGray3;
+ btnAuto.IsBold = false;
+ btnAuto.TextAlignment = TextAlignment.Center;
+ frameWhiteBack.AddChidren(btnAuto);
+ this.listControl.Add(btnAuto);
+ btnAuto.ButtonClickEvent += (sender, e) =>
+ {
+ if (!btnAuto.IsSelected)
+ {
+ this.SetFanComand(5);
+ }
+ };
+
+ //鑷姩涓嬪垝绾匡紙绗�2涓紝listControl銆�1銆戯級
+ var btnAutoLine = new NormalViewControl(72, 12, true);
+ btnAutoLine.X = Application.GetRealWidth(346);
+ btnAutoLine.Y = Application.GetRealHeight(896);
+ btnAutoLine.BackgroundColor = ZigbeeColor.Current.XMOrange;
+ btnAutoLine.Visible = false;
+ frameWhiteBack.AddChidren(btnAutoLine);
+ this.listControl.Add(btnAutoLine);
+
+ //鎵嬪姩锛堢3涓紝listControl銆�2銆戯級
+ var btnManual = new NormalViewControl(213, 63, true);
+ btnManual.X = Application.GetRealWidth(488);
+ btnManual.Y = btnAuto.Y;
+ btnManual.TextID = R.MyInternationalizationString.Manual;
+ btnManual.TextColor = ZigbeeColor.Current.XMGray3;
+ btnManual.IsBold = false;
+ btnManual.TextAlignment = TextAlignment.Center;
+ frameWhiteBack.AddChidren(btnManual);
+ this.listControl.Add(btnManual);
+ btnManual.ButtonClickEvent += (sender, e) =>
+ {
+ if (!btnManual.IsSelected)
+ {
+ this.SetFanComand(7);
+ }
+ };
+
+ //鎵嬪姩涓嬪垝绾匡紙绗�4涓紝listControl銆�3銆戯級
+ var btnManualLine = new NormalViewControl(72, 12, true);
+ btnManualLine.X = Application.GetRealWidth(560);
+ btnManualLine.BackgroundColor = ZigbeeColor.Current.XMOrange;
+ btnManualLine.Y = btnAutoLine.Y;
+ btnManualLine.Visible = false;
+ frameWhiteBack.AddChidren(btnManualLine);
+ this.listControl.Add(btnManualLine);
+
+ //楂橀锛堢5涓紝listControl銆�4銆戯級
+ var btnHighSpeed = new IconViewControl(81);
+ btnHighSpeed.X = Application.GetRealWidth(207);
+ btnHighSpeed.Y = Application.GetRealHeight(999);
+ btnHighSpeed.UnSelectedImagePath = "AC/Fan_Height.png";
+ btnHighSpeed.SelectedImagePath = "AC/Fan_HeightSelected.png";
+ frameWhiteBack.AddChidren(btnHighSpeed);
+ this.listControl.Add(btnHighSpeed);
+ btnHighSpeed.ButtonClickEvent += (sender, e) =>
+ {
+ if (!btnHighSpeed.IsSelected)
+ {
+ this.SetFanComand(3);
+ }
+ };
+
+ //寮�鍏筹紙绗�6涓紝listControl銆�5銆戯級
+ var btnSwitch = new IconViewControl(81);
+ btnSwitch.X = Application.GetRealWidth(444);
+ btnSwitch.Y = btnHighSpeed.Y;
+ btnSwitch.UnSelectedImagePath = "AC/OpenOrClose.png";
+ btnSwitch.SelectedImagePath = "AC/OpenOrCloseSelected.png";
+ frameWhiteBack.AddChidren(btnSwitch);
+ this.listControl.Add(btnSwitch);
+ btnSwitch.ButtonClickEvent += (sender, e) =>
+ {
+ btnSwitch.IsSelected = !btnSwitch.IsSelected;
+ if (btnSwitch.IsSelected)
+ {
+ this.SetFanComand(4);
+ }
+ else
+ {
+ this.SetFanComand(0);
+ }
+ };
+
+ //浣庨锛堢7涓紝listControl銆�6銆戯級
+ var btnLowSpeed = new IconViewControl(81);
+ btnLowSpeed.X = Application.GetRealWidth(677);
+ btnLowSpeed.Y = btnHighSpeed.Y;
+ btnLowSpeed.UnSelectedImagePath = "AC/Fan_Low.png";
+ btnLowSpeed.SelectedImagePath = "AC/Fan_LowSelected.png";
+ frameWhiteBack.AddChidren(btnLowSpeed);
+ this.listControl.Add(btnLowSpeed);
+ btnLowSpeed.ButtonClickEvent += (sender, e) =>
+ {
+ if (!btnLowSpeed.IsSelected)
+ {
+ this.SetFanComand(1);
+ }
+ };
+ }
+ #endregion
+
+ #region 鈻� 鏄惁鑾峰彇缃戝叧鍙嶉鐨勭粨鏋淿____________
+
+ /// <summary>
+ /// 妫�娴嬬綉鍏崇殑鍙嶉缁撴灉(灞炴�т笂鎶ョ殑瀵硅薄锛歞evice.DeviceStatusReport)
+ /// </summary>
+ /// <param name="comandDiv">鍛戒护鍖哄垎</param>
+ /// <param name="report">涓婃姤鏁版嵁</param>
+ /// <returns></returns>
+ public override bool CheckResponeResultStatu(ReceiveComandDiv comandDiv, CommonDevice report)
+ {
+ if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�)
+ {
+ if (report.DeviceStatusReport.CluterID == 514)
+ {
+ var attriButeList = report.DeviceStatusReport.AttriBute;
+ foreach (var attList in attriButeList)
+ {
+ if (attList.AttributeId == 0)
+ {
+ //椋庨��
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ UpdateStatus();
+ });
+
+ //宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+ #endregion
+
+ #region 鈻� 璁剧疆鏂规硶
+ /// <summary>
+ ///鍛戒护
+ ///0:Off
+ ///1:Low
+ ///3:High
+ ///4:On
+ ///5:Auto
+ /// 7:Manual
+ /// </summary>
+ private void SetFanComand(int command)
+ {
+ //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅
+ this.StartCheckResponeResult(this.listControl, (result) =>
+ {
+ //鎺ユ敹鍒扮綉鍏冲洖澶�
+ if (result == true)
+ {
+ }
+ });
+
+ switch (command)
+ {
+ case 0:
+ FreshAirDev.Close();
+ break;
+ case 1:
+ FreshAirDev.SetLowSpeed();
+ break;
+ case 3:
+ FreshAirDev.SetHighSpeed();
+ break;
+ case 4:
+ FreshAirDev.Open();
+ break;
+ case 5:
+ FreshAirDev.SetAuto();
+ break;
+ case 7:
+ FreshAirDev.SetManual();
+ break;
+ }
+ }
+ #endregion
+
+ #region 鈻� 鍒锋柊鐘舵�乢____________
+ /// <summary>
+ /// 鍒锋柊鐘舵��
+ /// </summary>
+ private void UpdateStatus()
+ {
+ //璁剧疆鐘舵�佹枃瀛�
+ if (FreshAirDev.currentFanStatus == 4)
+ {
+ //鎵撳紑
+ this.listControl[5].IsSelected = true;
+ //璁剧疆鐘舵�佹枃瀛�
+ this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1));
+ }
+ if (FreshAirDev.currentFanStatus == 0)
+ {
+ //鍏抽棴
+ this.listControl[0].TextColor = ZigbeeColor.Current.XMGray3;
+ this.listControl[0].IsBold = false;
+ this.listControl[1].Visible = false;
+ this.listControl[2].TextColor = ZigbeeColor.Current.XMGray3;
+ this.listControl[2].IsBold = false;
+ this.listControl[3].Visible = false;
+ this.listControl[4].IsSelected = false;
+ this.listControl[5].IsSelected = false;
+ this.listControl[6].IsSelected = false;
+ //璁剧疆鐘舵�佹枃瀛�
+ this.SetStatuText(Language.StringByID(R.MyInternationalizationString.Close));
+ return;
+ }
+
+ //璁剧疆妯″紡
+ if (FreshAirDev.currentFanMode == 5)
+ {
+ this.listControl[0].TextColor = ZigbeeColor.Current.XMGray1;
+ this.listControl[0].IsBold = true;
+ this.listControl[1].Visible = true;
+ this.listControl[2].TextColor = ZigbeeColor.Current.XMGray3;
+ this.listControl[2].IsBold = false;
+ this.listControl[3].Visible = false;
+ }
+ else if (FreshAirDev.currentFanMode == 7)
+ {
+ this.listControl[0].TextColor = ZigbeeColor.Current.XMGray3;
+ this.listControl[0].IsBold = false;
+ this.listControl[1].Visible = false;
+ this.listControl[2].TextColor = ZigbeeColor.Current.XMGray1;
+ this.listControl[2].IsBold = true;
+ this.listControl[3].Visible = true;
+ }
+
+ //璁剧疆椋庨��
+ if (FreshAirDev.currentFanSpeed == 1)
+ {
+ this.listControl[4].IsSelected = false;
+ this.listControl[6].IsSelected = true;
+ }
+ else if (FreshAirDev.currentFanSpeed == 3)
+ {
+ this.listControl[4].IsSelected = true;
+ this.listControl[6].IsSelected = false;
+ }
+ }
+ #endregion
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs b/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
old mode 100755
new mode 100644
index 3f52cff..cf7e7a4
--- a/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
@@ -360,6 +360,20 @@
};
}
}
+
+ //濡傛灉鏄柊椋�
+ if (device.Type == DeviceType.FreshAir)
+ {
+ //鍔熻兘绫诲瀷
+ string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType);
+ string strType = Language.StringByID(R.MyInternationalizationString.FreshAir);
+ var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2);
+ btnFunction.UseClickStatu = false;
+ listview.AddChidren(btnFunction);
+ btnFunction.InitControl();
+ //搴曠嚎
+ btnFunction.AddBottomLine();
+ }
}
/// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
old mode 100755
new mode 100644
index 179faf5..89e7821
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
@@ -154,6 +154,35 @@
}
return $"{(device as Rollershade).WcdCurrentPositionLiftPercentage}%";
}
+ else if (device.Type == DeviceType.FreshAir)
+ {
+ //鍦ㄧ綉鍏虫病鏈夊洖澶嶄箣鍓�,榛樿绂荤嚎
+ if (device.HadReadDeviceStatu == false)
+ {
+ return Language.StringByID(R.MyInternationalizationString.uOffLine);
+ }
+
+ //妯″紡
+ string wind = string.Empty;
+ var freshAir = device as FreshAir;
+ if (freshAir.currentFanStatus == 0)
+ {
+ return Language.StringByID(R.MyInternationalizationString.Close);
+ }
+ if (freshAir.currentFanSpeed == 1)
+ {
+ wind = Language.StringByID(R.MyInternationalizationString.Fan_Low);
+ }
+ else if (freshAir.currentFanSpeed == 2)
+ {
+ wind = Language.StringByID(R.MyInternationalizationString.Fan_Middle);
+ }
+ else if (freshAir.currentFanSpeed == 3)
+ {
+ wind = Language.StringByID(R.MyInternationalizationString.Fan_Height);
+ }
+ return $"{wind}";
+ }
else if (device.Type == DeviceType.Thermostat)
{
//鍦ㄧ綉鍏虫病鏈夊洖澶嶄箣鍓�,榛樿绂荤嚎
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
old mode 100755
new mode 100644
index 3d4e330..5c00a59
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
@@ -274,7 +274,7 @@
}
#endregion
- #region 鈻� 绌鸿皟鏁版嵁
+ #region 鈻� 绌鸿皟鍜屾柊椋庢暟鎹�
//绌鸿皟鏁版嵁
else if (report.DeviceStatusReport.CluterID == 513)
{
@@ -339,40 +339,70 @@
}
//绌鸿皟鏁版嵁
else if (report.DeviceStatusReport.CluterID == 514)
- {
+ {
locadevice.DeviceStatusReport = report.DeviceStatusReport;
foreach (var attData in report.DeviceStatusReport.AttriBute)
- {
- if (attData.AttributeId == 0)
- {
- //椋庢墖妯″紡
- ((AC)locadevice).currentFanMode = attData.AttriButeData;
- //宸茬粡鎺ユ敹鍒扮姸鎬�
- locadevice.HadReadDeviceStatu = true;
- }
- else if (attData.AttributeId == 4096)
- {
- //椋庢墖鎵
- ((AC)locadevice).currentFanSwingMode = attData.AttriButeData;
- //宸茬粡鎺ユ敹鍒扮姸鎬�
- locadevice.HadReadDeviceStatu = true;
- }
- else if (attData.AttributeId == 4097)
- {
- //杞崲涓轰簩杩涘埗
- var value = Convert.ToString(attData.AttriButeData, 2).PadLeft(16, '0');
- //杩欎釜璁剧疆鏄斁鍦ㄥ悗闈㈢殑
- value = value.Substring(value.Length - 1, 1);
- //鍚敤鎽嗛鍔熻兘
- ((AC)locadevice).UseSwingFunction = value == "1";
- locadevice.ReSave();
- }
+ {
+ //鍖哄垎鏄┖璋冭繕鏄柊椋�
+ var device = Shared.Common.LocalDevice.Current.GetDevice(report.DeviceAddr, report.DeviceEpoint);
+
+ if (device.Type == DeviceType.FreshAir)
+ {
+ if (attData.AttributeId == 0)
+ {
+ switch (attData.AttriButeData)
+ {
+ case 0:
+ case 4:
+ ((FreshAir)locadevice).currentFanStatus = attData.AttriButeData;
+ break;
+ case 1:
+ case 2:
+ case 3:
+ ((FreshAir)locadevice).currentFanSpeed = attData.AttriButeData;
+ break;
+ case 5:
+ case 7:
+ ((FreshAir)locadevice).currentFanMode = attData.AttriButeData;
+ break;
+ }
+ //宸茬粡鎺ユ敹鍒扮姸鎬�
+ locadevice.HadReadDeviceStatu = true;
+ }
+ }
+ else
+ {
+ if (attData.AttributeId == 0)
+ {
+ //椋庢墖妯″紡
+ ((AC)locadevice).currentFanMode = attData.AttriButeData;
+ //宸茬粡鎺ユ敹鍒扮姸鎬�
+ locadevice.HadReadDeviceStatu = true;
+ }
+ else if (attData.AttributeId == 4096)
+ {
+ //椋庢墖鎵
+ ((AC)locadevice).currentFanSwingMode = attData.AttriButeData;
+ //宸茬粡鎺ユ敹鍒扮姸鎬�
+ locadevice.HadReadDeviceStatu = true;
+ }
+ else if (attData.AttributeId == 4097)
+ {
+ //杞崲涓轰簩杩涘埗
+ var value = Convert.ToString(attData.AttriButeData, 2).PadLeft(16, '0');
+ //杩欎釜璁剧疆鏄斁鍦ㄥ悗闈㈢殑
+ value = value.Substring(value.Length - 1, 1);
+ //鍚敤鎽嗛鍔熻兘
+ ((AC)locadevice).UseSwingFunction = value == "1";
+ locadevice.ReSave();
+ }
+ }
}
- }
+ }
#endregion
-
+
#region 鈻� 浜害鏁版嵁
- //浜害鏁版嵁
+ //浜害鏁版嵁
else if (report.DeviceStatusReport.CluterID == 8)
{
locadevice.DeviceStatusReport = report.DeviceStatusReport;
@@ -512,7 +542,21 @@
//甯稿紑妯″紡寮�鍚�
if (info.AlarmCode == 216)
{
- DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device, DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, null);
+ //娓╁眳鍩庣殑瑕佺綉鍏充腑鏄惁鏈夐�昏緫瀛樺湪
+ Application.RunOnMainThread(async () =>
+ {
+ var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist();
+ if (resTemp == 1)
+ {
+ DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device, DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, true, null);
+ }
+ else if (resTemp == 0)
+ {
+ DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device, DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, false, null);
+ }
+
+
+ });
}
}
}
@@ -528,7 +572,7 @@
/// 璁惧鍦ㄧ嚎鐘舵�佹洿鏂板弽棣�
/// </summary>
/// <param name="receiveData"></param>
- private void DeviceOnlineChangePush (JObject receiveData)
+ private void DeviceOnlineChangePush(JObject receiveData)
{
if (this.dicDeviceEvent.Count == 0)
{
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
old mode 100755
new mode 100644
index b38dd82..ea3f30e
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
@@ -87,12 +87,12 @@
//鍒濆鍖栨甯�
this.tableContr = new InformationEditorControl();
- this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1128);
-
- //鍒濆鍖栬澶囧洖璺浘鏍�
- this.InitDeviceEpointIcon(listBackControl);
-
- //淇濆瓨
+ this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1128);
+
+ //鍒濆鍖栬澶囧洖璺浘鏍�
+ this.InitDeviceEpointIcon(listBackControl);
+
+ //淇濆瓨
var btnFinish = new BottomClickButton();
btnFinish.TextID = R.MyInternationalizationString.uSave;
bodyFrameLayout.AddChidren(btnFinish);
@@ -316,8 +316,8 @@
{
strType = Language.StringByID(R.MyInternationalizationString.uSocket1);
nowSelectNo = 2;
- }
-
+ }
+
var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2);
btnFunction.UseClickStatu = false;
listview.AddChidren(btnFunction);
@@ -377,6 +377,20 @@
};
}
}
+
+ //濡傛灉鏄柊椋�
+ if (nowSelectDevice.Type == DeviceType.FreshAir)
+ {
+ //鍔熻兘绫诲瀷
+ string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType);
+ string strType = Language.StringByID(R.MyInternationalizationString.FreshAir);
+ var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2);
+ btnFunction.UseClickStatu = false;
+ listview.AddChidren(btnFunction);
+ btnFunction.InitControl();
+ //搴曠嚎
+ btnFunction.AddBottomLine();
+ }
}
#endregion
@@ -414,7 +428,7 @@
else
{
//涓嶉渶瑕佹粦鍔ㄦ帶浠�
- frameBorder.AddChidren(frameBack);
+ frameBorder.AddChidren(frameBack);
}
int index = 0;
@@ -429,7 +443,17 @@
if (listIcon.Count == 1)
{
- frame.Gravity = Gravity.CenterVertical;
+ frame.Gravity = Gravity.CenterVertical;
+
+ //濡傛灉鏄柊椋�
+ if (deviceObj.Type == DeviceType.FreshAir)
+ {
+ frame.RemoveFromParent();
+ frameBack.BackgroundImagePath = "FreshAir/FreshAirRealDevicePic.png";
+ frameBack.Width = Application.GetMinRealAverage(878);
+ frameBack.Height = Application.GetMinRealAverage(354);
+ frameBack.Gravity = Gravity.Center;
+ }
}
else
{
@@ -442,15 +466,15 @@
//璁$畻鐪熷疄楂樺害
int realHeight = this.GetPictrueRealSize(58 + 58);//涓婁笅闂磋窛
realHeight += frameBack.ChildrenCount * this.GetPictrueRealSize(124);//鍦嗗湀楂樺害
- realHeight += (frameBack.ChildrenCount-1) * this.GetPictrueRealSize(60);//鍦嗗湀闂磋窛
+ realHeight += (frameBack.ChildrenCount - 1) * this.GetPictrueRealSize(60);//鍦嗗湀闂磋窛
if (realHeight > frameBack.Height)
{
//鍙樻洿楂樺害
frameBack.Height = realHeight;
}
}
- }
-
+ }
+
/// <summary>
/// 鍒濆鍖栦竴琛岃澶囧浘鏍�
/// </summary>
@@ -491,6 +515,8 @@
//鍒濆鍖栬彍鍗曡
this.DeviceEpointSelectEvent(btnTemp, null);
}
+
+
}
/// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
index be8c916..4281bcb 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -582,8 +582,8 @@
private void AddDryContactSettionRow()
{
if (this.listDeviceType.Contains(DeviceType.OnOffSwitch) == false)
- {
- //蹇呴』鏈変竴璺洖璺槸OnOffSwitch鎵嶈,闈㈡澘鐨勫共鎺ョ偣鐨勮瘽锛屼娇鐢ㄧ殑鏄埆鐨勮彍鍗�
+ {
+ //蹇呴』鏈変竴璺洖璺槸OnOffSwitch鎵嶈,闈㈡澘鐨勫共鎺ョ偣鐨勮瘽锛屼娇鐢ㄧ殑鏄埆鐨勮彍鍗�
return;
}
if (deviceEnumInfo.IsHdlDevice == true && deviceEnumInfo.BeloneType == DeviceBeloneType.A鎸夐敭闈㈡澘)
@@ -679,8 +679,12 @@
{
//鍙湁鍥炶矾鏁板ぇ浜�1鎵嶈兘鏈夎繖涓彍鍗�
if (Common.LocalDevice.Current.GetDevicesCountByMac(listNewDevice[0].DeviceAddr) == 1)
- {
- return;
+ {
+ //瑕佹眰鏂伴灏忔ā鍧楃殑鏂伴鏈夊姛鑳借缃�
+ if (deviceEnumInfo.ConcreteType != DeviceConcreteType.Relay_FangyueFreshAirModul)
+ {
+ return;
+ }
}
if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment
|| deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs
index c02ee5a..e9b7b89 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs
@@ -576,7 +576,7 @@
//鑺傝兘妯″紡淇敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
//鑲栧織璞粰鎸夐敭鎺у埗闈㈡澘锛堝洓寮�鍏帶锛夎澶囷紝璇撮粯璁�15绉掓椂闂达紝杩欐牱鎺ヨ繎鎰熷簲鍔熻兘鎵嶅悎鐞�
- energyModeInfo.time = 15;
+ energyModeInfo.time = 4094;
result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
if (result == false)
{
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
index 572a224..759549a 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
@@ -584,7 +584,7 @@
//鑺傝兘妯″紡淇敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
//璁惧鍚屼簨璇存柊椋庨潰鏉块粯璁�60绉掓椂闂达紝杩欐牱鎺ヨ繎鎰熷簲鍔熻兘鎵嶅悎鐞�
- energyModeInfo.time = 60;
+ energyModeInfo.time = 65534;
var result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
if (result == false)
{
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
index fd741ba..68aa327 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
@@ -233,16 +233,15 @@
curControlDev.bindList.Add(bDev);
var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
- //鑾峰彇璁惧绫诲瀷鐨�
- var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
- //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
- if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
- {
- continue;
- }
-
if (device.Type == DeviceType.FreshAir)
{
+ //鑾峰彇璁惧绫诲瀷鐨�
+ var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+ //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
+ if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+ {
+ continue;
+ }
bindFreshAirName = device.DeviceEpointName;
}
if (device.Type == DeviceType.TemperatureSensor)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
index ac89816..bb30fa1 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
@@ -74,8 +74,28 @@
/// 澶辨晥鏁堟棩鏈熲�滅鈥�
/// </summary>
public static int InValidDateSecond = 0;
+
+ /// <summary>
+ /// 闂ㄩ攣鎿嶄綔绫诲瀷
+ /// </summary>
+ public enum DoorLockMessType
+ {
+ /// <summary>
+ /// app鎿嶄綔
+ /// </summary>
+ AppOperate = 0,
+ /// <summary>
+ /// 閫氳繃闂ㄩ攣鎿嶄綔璁惧涓婃姤
+ /// </summary>
+ DeviceReport = 1,
+ /// <summary>
+ /// 閫氳繃鏈嶅姟鍣ㄦ帹閫�
+ /// </summary>
+ ServicePush = 2,
+ }
#endregion
+ #region 甯稿紑妯″紡 API
/// <summary>
/// 鑾峰彇褰撳墠闂ㄩ攣鐨勫父寮�妯″紡
/// </summary>
@@ -122,6 +142,343 @@
}
/// <summary>
+ /// 璁剧疆鏈湴闂ㄩ攣鐨勫父寮�妯″紡鍊�
+ /// </summary>
+ public static void NormallyOpenModeValue(ZigBee.Device.DoorLock doorLock, bool value)
+ {
+ string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
+ if (doorLock.IsDoorLockNormallyMode.ContainsKey(key))
+ {
+ doorLock.IsDoorLockNormallyMode[key] = value;
+ }
+ else
+ {
+ doorLock.IsDoorLockNormallyMode.Add(key, value);
+ }
+ }
+
+ /// <summary>
+ /// 甯稿紑妯″紡澶辨晥澶勭悊銆愬脊绐椼��
+ /// </summary>
+ /// <param name="doorLock">褰撳墠闂ㄩ攣</param>
+ /// <param name="doorLockMessType">瀵艰嚧闂ㄩ攣澶辨晥鐨勬搷浣滅被鍨�</param>
+ /// <param name="haveLogic">缃戝叧涓槸鍚﹀瓨鍦ㄩ�昏緫甯稿紑妯″紡</param>
+ /// <param name="action">鍥炶皟澶勭悊鏇存柊鍐呭</param>
+ public static async void NomallyOpenModeInvalidDialog(ZigBee.Device.DoorLock doorLock, DoorLockMessType doorLockMessType, bool haveLogic, Action action = null)
+ {
+ //甯稿紑妯″紡鍙兘涓讳汉鎿嶄綔
+ if (UserCenterResourse.UserInfo.AuthorityNo != 1)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ string msg0 = Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate);
+ ShowTipMsg(msg0);
+ });
+ return;
+ }
+
+ //甯稿紑妯″紡灏嗚鍙栨秷寮圭獥
+ string msg = Language.StringByID(R.MyInternationalizationString.NomallyModeIsCanceled).Replace("{0}", "\r\n");
+ var confirm = Language.StringByID(R.MyInternationalizationString.SureCancel);
+ var alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.NomallyOpenMode, msg, confirm);
+
+ if (haveLogic)
+ {
+ //鏈夐�昏緫璁剧疆鐨勫脊绐�
+ alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.CancelNomallyOpenModeWithLogic, msg, confirm);
+ }
+ alert.Show();
+
+ alert.MsgControlClickEvent += async () =>
+ {
+ if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
+ {
+ //涓婃姤鈥滃父寮�妯″紡鈥濆凡琚彇娑堬紝app榛樿浜嗏�滃父寮�妯″紡鈥濊鍙栨秷
+ DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
+ }
+ else
+ {
+ //淇濇寔甯稿紑
+ NormallyOpenModeValue(doorLock, true);
+ }
+ action?.Invoke();
+ };
+
+ alert.CancelClickEvent += async () =>
+ {
+ if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
+ {
+ //涓婃姤鈥滃父寮�妯″紡鈥濆凡琚彇娑�
+ Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
+ //鍏堝垹闄ゅ凡澶辨晥鐨勨�滃父寮�妯″紡鈥濈殑閫昏緫
+ //if (resTemp == 1)
+ //{
+ // var restulTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3);
+ // //if (restulTemp == 3)
+ // //{
+ // // string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed2);
+ // // this.ShowTipMsg(msg0);
+ // // return;
+ // //}
+ //}
+
+ //app閲嶆柊寮�鍚�滃父寮�妯″紡鈥�
+ var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
+ if (result == null || result.defaultControlResponseData == null)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
+ ShowTipMsg(msg0);
+ NormallyOpenModeValue(doorLock, false);
+ CommonPage.Loading.Hide();
+ //new Tip() { MaxWidth = 150, Text = msg0, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+ });
+ action?.Invoke();
+ return;
+ }
+ if (result.defaultControlResponseData.status != 0)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ string msg1 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeFailed);
+ ShowTipMsg(msg1);
+ NormallyOpenModeValue(doorLock, false);
+ CommonPage.Loading.Hide();
+ //new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+ });
+ action?.Invoke();
+ return;
+ }
+ else
+ {
+ //鍒涘缓甯稿紑妯″紡鐨勭壒娈婇�昏緫
+ var resu = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock);
+ Application.RunOnMainThread(() =>
+ {
+ string msg0 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeSuccess);
+ ShowTipMsg(msg0);
+ NormallyOpenModeValue(doorLock, true);
+ CommonPage.Loading.Hide();
+ //new Tip() { MaxWidth = 150, Text = msg0, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+ });
+ }
+ }
+ else
+ {
+ //app鎿嶄綔涓嶅彇娑堚�滃父寮�妯″紡鈥�
+ DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
+ }
+ action?.Invoke();
+ };
+
+ alert.ConfirmClickEvent += async () =>
+ {
+ if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
+ {
+ NormallyOpenModeValue(doorLock, false);
+ if (haveLogic)
+ {
+ var resTemp2 = await Shared.Phone.Device.Logic.SkipView.Exist(3);
+ //if (resTemp2 == 3)
+ //{
+ // string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed);
+ // this.ShowTipMsg(msg0);
+ //}
+ }
+ }
+ else
+ {
+ //app鎿嶄綔鍙栨秷鈥滃父寮�妯″紡鈥�
+ Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
+ var result = await doorLock.SetNormallyOpenModeFuncAsync(false);
+ if (result == null || result.defaultControlResponseData == null)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ ShowTipMsg(Language.StringByID(R.MyInternationalizationString.GwResponseOvertime));
+ CommonPage.Loading.Hide();
+ //new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+ });
+ action?.Invoke();
+ return;
+ }
+ if (result.defaultControlResponseData.status != 0)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ string msg1 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeFailed);
+ ShowTipMsg(msg1);
+ CommonPage.Loading.Hide();
+ //new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+ });
+ action?.Invoke();
+ return;
+ }
+ else
+ {
+ //娣诲姞App寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
+ HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(doorLock, 9002, string.Empty);
+ //app纭鍙栨秷鈥滃父寮�妯″紡鈥濇垚鍔�
+ NormallyOpenModeValue(doorLock, false);
+ //鍒犻櫎璁剧疆甯稿紑妯″紡鍒涘缓鐨勯�昏緫
+ if (haveLogic)
+ {
+ var resTemp1 = await Shared.Phone.Device.Logic.SkipView.Exist(3);
+ //鍥犱负鐩墠鏈哄埗闂锛岄�昏緫缁忓父澶辫触锛屾墍浠ヤ笉鎻愮ず锛屽悗鏈熸満鍒惰鏀癸紝閲嶆柊鍋氫竴涓繖涓晫闈�
+ //if (resTemp1 == 3)
+ //{
+ //Application.RunOnMainThread(() =>
+ //{
+ // string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed);
+ // ShowTipMsg(msg0);
+ //});
+ //}
+ //else if (resTemp1 == 2)
+ //{
+ //Application.RunOnMainThread(() =>
+ //{
+ // string msg0 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess);
+ // ShowTipMsg(msg0);
+ //});
+ }
+ Application.RunOnMainThread(() =>
+ {
+ string msg2 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess);
+ ShowTipMsg(msg2);
+ CommonPage.Loading.Hide();
+ });
+ }
+ }
+ action?.Invoke();
+ };
+ }
+
+ /// <summary>
+ /// 鍒犻櫎甯稿紑妯″紡
+ /// </summary>
+ /// <param name="doorLock">褰撳墠闂ㄩ攣</param>
+ /// <param name="action">鍥炶皟澶勭悊鏇存柊鍐呭</param>
+ /// <returns></returns>
+ public static async System.Threading.Tasks.Task<bool> DelNormallyOpenMode(ZigBee.Device.DoorLock doorLock, Action action = null)
+ {
+ //app鎿嶄綔鍙栨秷鈥滃父寮�妯″紡鈥�
+ var result = await doorLock.SetNormallyOpenModeFuncAsync(false);
+ if (result == null || result.defaultControlResponseData == null || result.defaultControlResponseData.status != 0)
+ {
+ action?.Invoke();
+ return false;
+ }
+
+ if (result.defaultControlResponseData.status == 0)
+ {
+ //app纭鍙栨秷鈥滃父寮�妯″紡鈥濇垚鍔�
+ NormallyOpenModeValue(doorLock, false);
+ action?.Invoke();
+ return true;
+ }
+ return false;
+ }
+
+ /// <summary>
+ /// 鍚姩甯稿紑妯″紡銆愬脊绐椼��
+ /// </summary>
+ /// <param name="doorLock">褰撳墠闂ㄩ攣</param>
+ /// <param name="action">鍥炶皟澶勭悊鏇存柊鍐呭</param>
+ public static async void NomallyOpenModeStartDialog(ZigBee.Device.DoorLock doorLock, Action action)
+ {
+ //甯稿紑妯″紡鍙兘涓讳汉鎿嶄綔ZigBee.Device.DoorLock doorLock
+ if (UserCenterResourse.UserInfo.AuthorityNo != 1)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ string msg0 = Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate);
+ ShowTipMsg(msg0);
+ });
+ return;
+ }
+
+ //璁剧疆甯稿紑妯″紡鍚庯紝鎮ㄧ殑闂ㄩ攣灏嗗缁堝浜庢墦寮�鐘舵�侊紝纭寮�鍚紵
+ string msg = Language.StringByID(R.MyInternationalizationString.SetDoorLockNomallyOpen).Replace("{0}", "\r\n");
+ var confirm = Language.StringByID(R.MyInternationalizationString.Confrim);
+ var alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.Confirm, msg, confirm);
+ alert.Show();
+
+ alert.ConfirmClickEvent += async () =>
+ {
+ Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
+ var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
+ if (result == null || result.defaultControlResponseData == null)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
+ ShowTipMsg(msg0);
+ CommonPage.Loading.Hide();
+ });
+ return;
+ }
+ if (result.defaultControlResponseData.status != 0)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ string msg1 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeFailed);
+ ShowTipMsg(msg1);
+ CommonPage.Loading.Hide();
+ });
+ return;
+ }
+ else
+ {
+ //娣诲姞App寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
+ HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(doorLock, 9001, string.Empty);
+ DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
+ action?.Invoke();
+ Application.RunOnMainThread(() =>
+ {
+ NomallyOpenModeInvalidTimeDialog(doorLock);
+ CommonPage.Loading.Hide();
+ });
+ }
+ };
+ }
+
+ /// <summary>
+ /// 甯稿紑妯″紡澶辨晥鏃堕棿澶勭悊銆愬脊绐椼��
+ /// </summary>
+ public static async void NomallyOpenModeInvalidTimeDialog(ZigBee.Device.DoorLock doorLock)
+ {
+ //澶辨晥璁剧疆
+ string msgTimeInValidSetting = Language.StringByID(R.MyInternationalizationString.DoorLockOpenAllTheTime);
+ var timeConfrim = Language.StringByID(R.MyInternationalizationString.Confrim);
+ var alertTimeInValidSetting = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.InValid, msgTimeInValidSetting, timeConfrim);
+ alertTimeInValidSetting.Show();
+
+ alertTimeInValidSetting.InvalidTimeAction += async (obj) =>
+ {
+ //甯稿紑妯″紡澶辨晥鏃堕棿璁剧疆鎴愬姛
+ var temp = int.Parse(obj);
+ DoorLockCommonInfo.NormallyOpenModeInvalidTime = temp;
+ //榛樿鍒涘缓甯稿紑妯″紡鐨勭壒娈婇�昏緫
+ var res = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock);
+ if (!res)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ //榛樿鍒涘缓甯稿紑妯″紡澶辫触
+ string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed);
+ var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal, msg0, Language.StringByID(R.MyInternationalizationString.confrim));
+ alert.Show();
+ //浜屾鍔犺浇寮圭獥 甯稿紑妯″紡寮�鍚彁绀�
+ NomallyOpenModeInvalidTimeDialog(doorLock);
+ });
+ }
+ };
+ }
+ #endregion
+
+ #region 闊抽噺
+ /// <summary>
/// 闂ㄩ攣鏄惁鏀寔闊抽噺[杩欓噷鏆傛椂鍙湁S-One闂ㄩ攣鏀寔锛孒06C涓嶆敮鎸侊紝鍚庢湡閫氳繃鑳藉姏鍊兼敮鎸乚
/// </summary>
/// <param name="doorLock:褰撳墠闂ㄩ攣"></param>
@@ -137,6 +494,8 @@
}
return false;
}
+
+ #endregion
#region 浠庝簯绔幏鍙栫殑鏂规硶
/// <summary>
@@ -856,7 +1215,7 @@
/// 鏄剧ず閿欒淇℃伅绐楀彛
/// </summary>
/// <param name="msg"></param>
- private void ShowErrorMsg(string msg)
+ private static void ShowErrorMsg(string msg)
{
Application.RunOnMainThread(() =>
{
@@ -869,7 +1228,7 @@
/// 鏄剧ずTip淇℃伅绐楀彛
/// </summary>
/// <param name="msg"></param>
- private void ShowTipMsg(string msg)
+ private static void ShowTipMsg(string msg)
{
Application.RunOnMainThread(() =>
{
@@ -880,148 +1239,5 @@
#endregion
- public enum DoorLockMessType
- {
- /// <summary>
- /// app鎿嶄綔
- /// </summary>
- AppOperate = 0,
- /// <summary>
- /// 璁惧涓婃姤
- /// </summary>
- DeviceReport = 1,
- /// <summary>
- /// 鏈嶅姟鍣ㄦ帹閫�
- /// </summary>
- ServicePush = 2,
- }
-
- /// <summary>
- /// 甯稿紑妯″紡澶辨晥澶勭悊
- /// </summary>
- public static async void NomallyOpenModeInvalidDialog(ZigBee.Device.DoorLock doorLock, DoorLockMessType doorLockMessType, Action action)
- {
- if (UserCenterResourse.UserInfo.AuthorityNo != 1)
- {
- return;
- }
- string msg = Language.StringByID(R.MyInternationalizationString.NomallyModeIsCanceled).Replace("{0}", "\r\n");
- var confirm = Language.StringByID(R.MyInternationalizationString.SureCancel);
- var alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.NomallyOpenMode, msg, confirm);
- var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist();
-
- if (resTemp == 1)
- {
- //鏈夐�昏緫璁剧疆鐨勫脊绐�
- alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.CancelNomallyOpenModeWithLogic, msg, confirm);
- }
- alert.Show();
- alert.MsgControlClickEvent += async () =>
- {
- if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
- {
- //鍙栨秷甯稿紑
- NormallyOpenModeValue(doorLock, false);
- }
- else
- {
- //淇濇寔甯稿紑
- NormallyOpenModeValue(doorLock, true);
- }
- action?.Invoke();
- action = null;
- };
- alert.CancelClickEvent += async () =>
- {
- if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
- {
- var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
- if (result == null || result.defaultControlResponseData == null)
- {
- string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
- Application.RunOnMainThread(() =>
- {
- new Tip() { MaxWidth = 150, Text = msg0, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- });
- NormallyOpenModeValue(doorLock, false);
- return;
- }
- if (result.defaultControlResponseData.status != 0)
- {
- string msg1 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeFailed);
- Application.RunOnMainThread(() =>
- {
- new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- });
- NormallyOpenModeValue(doorLock, false);
- return;
- }
- else
- {
- NormallyOpenModeValue(doorLock, true);
- }
- }
- else
- {
- NormallyOpenModeValue(doorLock, true);
- }
- action?.Invoke();
- action = null;
- };
- alert.ConfirmClickEvent += async () =>
- {
- if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
- {
- NormallyOpenModeValue(doorLock, false);
- }
- else
- {
- var result = await doorLock.SetNormallyOpenModeFuncAsync(false);
- if (result == null || result.defaultControlResponseData == null)
- {
- Application.RunOnMainThread(() =>
- {
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- });
- return;
- }
- if (result.defaultControlResponseData.status != 0)
- {
- string msg1 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeFailed);
- Application.RunOnMainThread(() => { });
-
- new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- return;
- }
- else
- {
- NormallyOpenModeValue(doorLock, false);
- string msg2 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess);
- Application.RunOnMainThread(() =>
- {
- new Tip() { MaxWidth = 150, Text = msg2, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- });
- }
- }
- action?.Invoke();
- action = null;
- };
- }
-
- /// <summary>
- /// 闂ㄩ攣甯稿紑妯″紡鍊�
- /// </summary>
- public static void NormallyOpenModeValue(ZigBee.Device.DoorLock doorLock, bool value)
- {
- string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
- if (doorLock.IsDoorLockNormallyMode.ContainsKey(key))
- {
- doorLock.IsDoorLockNormallyMode[key] = value;
- }
- else
- {
- doorLock.IsDoorLockNormallyMode.Add(key, value);
- }
- }
}
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
index 1721127..1c10f51 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
@@ -386,7 +386,7 @@
}
/// <summary>
- /// 鍘讳釜浜轰腑蹇冿紝寮�鍚繙绋嬪紑閿侀獙璇�
+ /// 鍘讳釜浜轰腑蹇冿紝寮�鍚郴缁熷瘑鐮佹敮鎸佸紑閿佹潈闄�
/// </summary>
public void SystemSecondAuthentication()
{
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs
old mode 100755
new mode 100644
index de24e88..401a08a
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs
@@ -74,10 +74,11 @@
{
RemoveFromParent();
- var userDoorLockPage = new UserDoorLockPage(currentRoom, deviceUI);
- HomePage.Instance.AddChidren(userDoorLockPage);
- HomePage.Instance.PageIndex += 1;
- userDoorLockPage.Show();
+ //鏆傛椂涓嶈�冭檻涓嬬骇鐣岄潰绛夋帹閫佸鑷村父寮�妯″紡澶辨晥鐨勯棶棰�
+ //var userDoorLockPage = new UserDoorLockPage(currentRoom, deviceUI);
+ //HomePage.Instance.AddChidren(userDoorLockPage);
+ //HomePage.Instance.PageIndex += 1;
+ //userDoorLockPage.Show();
};
this.btnBack.MouseUpEventHandler += eHandlerBack;
this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
@@ -186,7 +187,7 @@
var listCheck = new List<string>();
rowBeloneArea.SelectRoomEvent += (roomKeys) =>
{
- //閫夋嫨鏈垎閰嶆椂,娓呯┖
+ //閫夋嫨鏈垎閰嶆椂,娓呯┖
if (roomKeys == string.Empty) { listCheck = new List<string>(); }
foreach (var device in this.listNewDevice)
{
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
index 285699d..cc714f0 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -47,7 +47,7 @@
/// </summary>
bool canVolume = false;
/// <summary>
- /// 淇濈暀涓婁竴娆¢煶閲�
+ /// 鏄惁鏀寔甯稿紑
/// </summary>
bool canOpenNormallyMode = false;
/// <summary>
@@ -788,8 +788,9 @@
//璁剧疆
EventHandler<MouseEventArgs> btnFuncSetHander = (sender, e) =>
{
- //鎵撳紑鍏朵粬鐣岄潰鏃跺墠绉婚櫎
- RemoveFromParent();
+ //鎵撳紑鍏朵粬鐣岄潰鏃跺墠绉婚櫎銆愭殏鏃朵笉绉婚櫎銆�
+ //RemoveFromParent();
+
var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(currentRoom, doorLock);
Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting);
Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
@@ -1040,6 +1041,35 @@
/// </summary>
private async void NomallyOpenDialog()
{
+ #region 鍚庣画鐗堟湰
+ //if (UserCenterResourse.UserInfo.AuthorityNo != 1)
+ //{
+ // this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate));
+ // return;
+ //}
+
+ //if (!UserCenterResourse.AccountOption.DoorUnLockByRemote)
+ //{
+ // SystemSecondAuthentication();
+ // return;
+ //}
+
+ //action = () =>
+ //{
+ // //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤娓╁眳鍩庣殑鐣岄潰銆愬父寮�鑷姩鍖栥��
+ // var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(currentRoom, doorLock);
+ // Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting);
+ // Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+ // functionSetting.Show();
+ // functionSetting.aaaAction = () =>
+ // {
+ // UpdateNomallyOpenStatus();
+ // };
+ //};
+ //HdlCheckLogic.Current.CheckSecondarySecurity(action);
+ #endregion
+
+ #region 鏆傛椂鐗堟湰 (鏈�缁堝幓鎺夛級
if (!btnNormallyOpen.IsSelected)
{
if (UserCenterResourse.UserInfo.AuthorityNo != 1)
@@ -1056,6 +1086,12 @@
action = () =>
{
+ //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤闂俯灞呭煄鐨勭晫闈€�愬父寮�鑷姩鍖栥��
+ //Action nomallyOpenModeStartAction = () =>
+ //{
+ // UpdateNomallyOpenStatus();
+ //};
+
string msg = Language.StringByID(R.MyInternationalizationString.SetDoorLockNomallyOpen).Replace("{0}", "\r\n");
var confirm = Language.StringByID(R.MyInternationalizationString.Confrim);
var alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.Confirm, msg, confirm);
@@ -1095,6 +1131,7 @@
AlreadyOpenNormallyMode();
}
};
+
};
HdlCheckLogic.Current.CheckSecondarySecurity(action);
}
@@ -1102,6 +1139,8 @@
{
NomallyOpenModeInvalidDialog();
}
+
+ #endregion
}
/// <summary>
@@ -1177,11 +1216,11 @@
var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
if (result == null || result.defaultControlResponseData == null)
{
- string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
- this.ShowTipMsg(msg0);
- DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
Application.RunOnMainThread(() =>
{
+ string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
+ this.ShowTipMsg(msg0);
+ DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
UpdateNomallyOpenStatus();
});
return;
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
old mode 100755
new mode 100644
index f73ef01..f2e05ad
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -238,12 +238,16 @@
//缁х數鍣�
IconPath = "Device/RelayEpoint.png";
}
- else if (this.Type == DeviceType.Thermostat || this.Type == DeviceType.FreshAir)
+ else if (this.Type == DeviceType.Thermostat)
{
- //绌鸿皟
- //鏂伴鍜岀┖璋冨浘鏍囩浉鍚�
+ //绌鸿皟
IconPath = "Device/AirConditionerEpoint.png";
}
+ else if (this.Type == DeviceType.FreshAir)
+ {
+ //鏂伴
+ IconPath = "Device/FreshAirEpoint.png";
+ }
else if (this.Type == DeviceType.FreshAirHumiditySensor)
{
//婀垮害浼犳劅鍣�
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs
old mode 100755
new mode 100644
index 7e3f7f7..6928ccf
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs
@@ -79,7 +79,7 @@
FreshAir = 0xD100,
/// <summary>
/// <para>鏂伴婀垮害浼犳劅鍣�</para>
- /// <para>璁惧ID涓�0xD200</para>
+ /// <para>璁惧ID涓�53760</para>
/// <para>瀹氫箟瀵硅薄锛歍emperatureSensor</para>
/// </summary>
FreshAirHumiditySensor = 0xD200,
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
old mode 100755
new mode 100644
index 0735d15..944cd49
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
@@ -36,7 +36,8 @@
//鏈湴鎵�鏈夎处鎴峰垪琛�
public List<Shared.Phone.UserCenter.MemberInfoRes> localAllAccountList = new List<Shared.Phone.UserCenter.MemberInfoRes> { };
/// <summary>
- /// 鏄惁甯稿紑妯″紡[褰撴暟鎹幏鍙栧け璐ワ紝杩斿洖绌篯
+ /// 鏄惁甯稿紑妯″紡銆恔ey = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint銆�
+ /// ture:甯稿紑锛� false:鍏抽棴
/// </summary>
public Dictionary<string, bool> IsDoorLockNormallyMode = new Dictionary<string, bool> { };//鏄惁鍐荤粨瀛愯处鎴�
public string LocalTempPassword = string.Empty;//鏈湴鐢熸垚鐨勪复鏃跺瘑鐮�
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs
old mode 100755
new mode 100644
index 4a9954a..b7661a2
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs
@@ -15,24 +15,85 @@
}
/// <summary>
- /// 鎭掓俯璁惧褰撳墠妯″紡
- /// <para>鎭掓俯璁惧鍏峰鍔熻兘锛孲ystemMode Attribute Values濡備笅</para>
- /// <para>0:Off </para>
- /// <para>1:Auto </para>
- /// <para>3:Cool </para>
- /// <para>4:Heat </para>
- /// <para>5:Emergency heating </para>
- /// <para>6:Precooling</para>
- /// <para>7:Fan only </para>
- /// <para>8:Dry </para>
- /// <para>9:Sleep</para>
+ /// 椋庨�熸ā寮�
+ /// <para>5:鑷姩</para>
+ /// <para>6:Smart</para>
+ /// <para>7:鎵嬪姩</para>
/// </summary>
- public int currentSystemMode = 0;
+ public int currentFanMode = 0;
+ /// <summary>
+ /// 椋庨�熸。浣�
+ /// <para>1:浣庨</para>
+ /// <para>2:涓</para>
+ /// <para>3:楂橀 </para>
+ /// </summary>
+ public int currentFanSpeed = 0;
+ /// <summary>
+ /// 椋庢墖鐘舵��
+ /// <para>0:鍏抽棴 </para>
+ /// <para>4:鎵撳紑 </para>
+ /// </summary>
+ public int currentFanStatus = 0;
+
+ /// <summary>
+ /// 鍏抽棴
+ /// </summary>
+ /// <returns>The close.</returns>
+ public async System.Threading.Tasks.Task<SetWritableValueResponAllData> Close()
+ {
+ return await SetFanModeAsync(FanMode.Off);
+ }
+
+ /// <summary>
+ /// 寮�鍚�
+ /// </summary>
+ /// <returns>The open.</returns>
+ public async System.Threading.Tasks.Task<SetWritableValueResponAllData> Open()
+ {
+ return await SetFanModeAsync(FanMode.On);
+ }
+
+ /// <summary>
+ /// 楂橀
+ /// </summary>
+ /// <returns>The close.</returns>
+ public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetHighSpeed()
+ {
+ return await SetFanModeAsync(FanMode.High);
+ }
+
+ /// <summary>
+ /// 浣庨
+ /// </summary>
+ /// <returns>The open.</returns>
+ public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetLowSpeed()
+ {
+ return await SetFanModeAsync(FanMode.Low);
+ }
+
+
+ /// <summary>
+ /// 鎵嬪姩
+ /// </summary>
+ /// <returns>The close.</returns>
+ public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetManual()
+ {
+ return await SetFanModeAsync(FanMode.Manual);
+ }
+
+ /// <summary>
+ /// 鑷姩
+ /// </summary>
+ /// <returns>The open.</returns>
+ public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetAuto()
+ {
+ return await SetFanModeAsync(FanMode.Auto);
+ }
///<summary >
- ///璁剧疆鎭掓俯鍣ㄨ澶囧綋鍓嶅伐浣滄ā寮�.
+ ///璁剧疆鎭掓俯鍣ㄨ澶囧綋鍓嶉閫�.
/// </summary>
- public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetSystemModeAsync(AcMode acMode)
+ public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetFanModeAsync(FanMode fanMode)
{
if (Gateway == null)
{
@@ -81,8 +142,8 @@
DebugPrintLog("SetWritableValue_Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
try
{
- var jObject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 513 }, { "Command", 120 } };
- var data = new JObject { { "Undivided", 0 }, { "AttributeId", 28 }, { "AttributeDataType", 48 }, { "AttributeData", (int)acMode } };
+ var jObject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 514 }, { "Command", 120 } };
+ var data = new JObject { { "Undivided", 0 }, { "AttributeId", 0 }, { "AttributeDataType", 48 }, { "AttributeData", (int)fanMode } };
jObject.Add("Data", data);
Gateway.Send("SetWritableValue", jObject.ToString());
}
@@ -107,63 +168,63 @@
});
}
- public enum AcMode
+
+ #region 鈼� 褰撳墠鏂伴寮�鍏崇姸鎬乢___________________
+
+ /// <summary>
+ /// 褰撳墠鏂伴寮�鍏崇姸鎬�
+ /// </summary>
+ /// <param name="freshAir"></param>
+ /// <returns></returns>
+ public bool IsOpen(FreshAir freshAir)
+ {
+ if (freshAir.currentFanStatus == 4)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ #endregion
+
+
+ /// <summary>
+ /// 椋庨�熸。浣�
+ /// </summary>
+ public enum FanMode
{
/// <summary>
- /// 鍏抽棴妯″紡锛堟祴璇曟亽娓╅潰鏉挎椂鍙戠幇锛�2锛�5锛�6锛�7锛�8锛�9閮芥槸鍙互鎵撳紑鐨勶級
+ /// 鍏抽棴
/// </summary>
Off = 0,
/// <summary>
- /// 鑷姩妯″紡
+ /// 浣庨
/// </summary>
- Auto = 1,
+ Low = 1,
/// <summary>
- /// 鍒跺喎妯″紡
+ /// 涓
/// </summary>
- Cool = 3,
+ Medium = 2,
/// <summary>
- /// 鍒剁儹妯″紡
+ /// 楂橀
/// </summary>
- Heat = 4,
+ High = 3,
/// <summary>
- /// 绱ф�ュ埗鐑ā寮�
+ /// 鎵撳紑
/// </summary>
- EmergencyHeating = 5,
+ On = 4,
/// <summary>
- /// 棰勫喎妯″紡
+ /// 鑷姩
/// </summary>
- Precooling = 6,
+ Auto = 5,
/// <summary>
- /// 鍙湁椋庨�熸ā寮�
+ /// Smart
/// </summary>
- FanOnly = 7,
+ Smart = 6,
/// <summary>
- /// 骞茬嚗妯″紡
+ /// 鎵嬪姩
/// </summary>
- Dry = 8,
- /// <summary>
- /// 鐫$湢妯″紡
- /// </summary>
- Sleep = 9
- }
-
- /// <summary>
- /// 鍏抽棴
- /// </summary>
- /// <returns>The close.</returns>
- public async System.Threading.Tasks.Task<SetWritableValueResponAllData> Close()
- {
- return await SetSystemModeAsync(AcMode.Off);
- }
-
- /// <summary>
- /// 寮�鍚�
- /// </summary>
- /// <returns>The open.</returns>
- /// <param name="acMode">Ac mode.</param>
- public async System.Threading.Tasks.Task<SetWritableValueResponAllData> Open(AcMode acMode = AcMode.Cool)
- {
- return await SetSystemModeAsync(acMode);
+ Manual = 7,
}
}
}
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/HumiditySensor.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/HumiditySensor.cs
old mode 100755
new mode 100644
index d982539..3646638
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/HumiditySensor.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/HumiditySensor.cs
@@ -8,6 +8,7 @@
{
public HumiditySensor()
{
+ this.Type = DeviceType.FreshAirHumiditySensor;
}
}
}
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
index a6c6de9..4f527da 100644
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
@@ -155,6 +155,7 @@
/// <para>304:CurtainDownstop,绐楀笜涓嬮檷鍋�</para>
/// </summary>
public List<int> privateFuncThirdLevelList = new List<int>();
+
#region 鑾峰彇闈㈡澘鐨勭鏈変俊鎭�.
/// <summary>
///鑾峰彇闈㈡澘鐨勭鏈変俊鎭�
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
index 9cf03ef..6c9a52b 100644
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -554,6 +554,10 @@
/// 璇疯緭鍏ュ悎娉曠殑鏁板瓧
/// </summary>
public const int IllegalNumber = 310;
+ /// <summary>
+ /// 鎵嬪姩
+ /// </summary>
+ public const int Manual = 311;
public readonly static int cancel = 5097;
public readonly static int confrim = 5098;
@@ -6042,7 +6046,7 @@
/// <summary>
/// 闀滃儚ID涓�2310鐨勮澶囩殑榛樿鍚嶅瓧锛氭柟鎮︽柊椋庡皬妯″潡
/// </summary>
- public const int DeviceModelId2310 = 30038;
+ public const int uDeviceModelId2310 = 30038;
//鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄澶囨墍灞炵绫荤殑缈昏瘧鍚嶅瓧,浠�40000寮�濮嬧槄鈽呪槄鈽�
/// <summary>
@@ -6116,7 +6120,11 @@
/// <summary>
/// 鑷畾涔夎澶囨墍灞濱D涓�16鐨勭炕璇戝悕瀛楋細骞叉帴鐐�
/// </summary>
- public const int uDeviceBelongId16 = 40017;
+ public const int uDeviceBelongId16 = 40017;
+ /// <summary>
+ /// 鑷畾涔夎澶囨墍灞濱D涓�2310鐨勭炕璇戝悕瀛楋細鏂伴
+ /// </summary>
+ public const int uDeviceBelongId2310 = 40018;
//鈽呪槄鈽呪槄妯″潡ID鐨勮澶囬粯璁ゅ娉ㄥ悕瀛�,浠�50000寮�濮�,杩欓噷涓嶉渶瑕佸畾涔�,鍙啓鍦↙anguage.ini鏂囦欢閲岄潰鈽呪槄鈽呪槄
//鈽呪槄鈽呪槄妯″潡ID鐨勮澶囩被鍨嬪悕瀛�,浠�60000寮�濮�,杩欓噷涓嶉渶瑕佸畾涔�,鍙啓鍦↙anguage.ini鏂囦欢閲岄潰鈽呪槄鈽呪槄
diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems
old mode 100755
new mode 100644
index 70e00cb..87dd7b3
--- a/ZigbeeApp/Shared/Shared.projitems
+++ b/ZigbeeApp/Shared/Shared.projitems
@@ -479,6 +479,8 @@
<Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\IO\LocalFileUtils.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlSafeguardLogic.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlAlarmsLogic.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\DeviceFreshAirRowControl.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceFreshAirDetailCardForm.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Pad\" />
--
Gitblit v1.8.0