From 74a9ba8e9a2df9c39f9c2eb212a5ac889a055cd4 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 03 十二月 2019 10:47:51 +0800
Subject: [PATCH] 优化UI细节(请合并最新代码)
---
ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs | 32 ++++++++++++++++++++------------
1 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs
index d1ff0f7..10cf90f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs
@@ -143,7 +143,7 @@
listText.Add(Language.StringByID(R.MyInternationalizationString.uForwardDirection));//姝e悜
listText.Add(Language.StringByID(R.MyInternationalizationString.uReverseDirection));//鍙嶅悜
- var form = new BottomDialogSelectForm();
+ var form = new BottomItemSelectForm();
form.AddForm(Language.StringByID(R.MyInternationalizationString.uDirectionSelect), listText, nowSelectNo);
form.FinishSelectEvent += async (index) =>
{
@@ -512,7 +512,7 @@
bool receiptData = false;
string mainkeys = LocalDevice.Current.GetDeviceMainKeys(curtainDevice);
- HdlDeviceAttributeLogic.Current.AddAttributeEvent("CurtainDeviceAttribute", "DeviceStatusReport", (device) =>
+ HdlGatewayReceiveLogic.Current.AddAttributeEvent("CurtainDeviceAttribute", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (device) =>
{
string checkKey = LocalDevice.Current.GetDeviceMainKeys(device);
if (mainkeys != checkKey || device.DeviceStatusReport.CluterID != 258)
@@ -576,7 +576,7 @@
return false;
}
//绉婚櫎鐩戝惉
- HdlDeviceAttributeLogic.Current.RemoveEvent("CurtainDeviceAttribute");
+ HdlGatewayReceiveLogic.Current.RemoveEvent("CurtainDeviceAttribute");
//澶囦唤绐楀笜鏁版嵁
if (this.backupCurtainData == true)
@@ -605,12 +605,12 @@
/// </summary>
private void ReceiveLimitData()
{
- if (HdlDeviceAttributeLogic.Current.IsEsixt("ReceiveLimitData") == true)
+ if (HdlGatewayReceiveLogic.Current.IsEsixt("ReceiveLimitData") == true)
{
- HdlDeviceAttributeLogic.Current.RemoveEvent("ReceiveLimitData");
+ HdlGatewayReceiveLogic.Current.RemoveEvent("ReceiveLimitData");
}
string mainkeys = LocalDevice.Current.GetDeviceMainKeys(curtainDevice);
- HdlDeviceAttributeLogic.Current.AddAttributeEvent("ReceiveLimitData", "DeviceStatusReport", (device) =>
+ HdlGatewayReceiveLogic.Current.AddAttributeEvent("ReceiveLimitData", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (device) =>
{
string checkKey = LocalDevice.Current.GetDeviceMainKeys(device);
if (mainkeys != checkKey || device.DeviceStatusReport.CluterID != 258)
@@ -639,8 +639,12 @@
this.ShowMassage(ShowMsgType.Confirm, msg, async () =>
{
//鎵ц纭鍙婅鐩栦笂闄愪綅鐐�
- await HdlDeviceCurtainLogic.Current.CommitCurtainLimitPoint(curtainDevice, Rollershade.CurtainPrivateInstalledLimi.UpLimit,
+ var result = await HdlDeviceCurtainLogic.Current.CommitCurtainLimitPoint(curtainDevice, Rollershade.CurtainPrivateInstalledLimi.UpLimit,
curtainData.OpenLimitPersent, curtainData.CloseLimitPersent);
+ if (result == true)
+ {
+ curtainData.DeleteOpenLimit = true;
+ }
});
}
//鍚堥檺浣�
@@ -654,8 +658,12 @@
this.ShowMassage(ShowMsgType.Confirm, msg, async () =>
{
//鎵ц纭鍙婅鐩栧悎闄愪綅鐐�
- await HdlDeviceCurtainLogic.Current.CommitCurtainLimitPoint(curtainDevice, Rollershade.CurtainPrivateInstalledLimi.DownLimit,
+ var result = await HdlDeviceCurtainLogic.Current.CommitCurtainLimitPoint(curtainDevice, Rollershade.CurtainPrivateInstalledLimi.DownLimit,
curtainData.OpenLimitPersent, curtainData.CloseLimitPersent);
+ if (result == true)
+ {
+ curtainData.DeleteCloseLimit = true;
+ }
});
}
}
@@ -671,14 +679,14 @@
/// <summary>
/// 鐣岄潰鍏抽棴
/// </summary>
- public override void CloseForm()
+ public override void CloseFormBefore()
{
- HdlDeviceAttributeLogic.Current.RemoveEvent("CurtainDeviceAttribute");
- HdlDeviceAttributeLogic.Current.RemoveEvent("ReceiveLimitData");
+ HdlGatewayReceiveLogic.Current.RemoveEvent("CurtainDeviceAttribute");
+ HdlGatewayReceiveLogic.Current.RemoveEvent("ReceiveLimitData");
UserView.HomePage.Instance.ScrollEnabled = true;
- base.CloseForm();
+ base.CloseFormBefore();
}
#endregion
--
Gitblit v1.8.0