From 4b378188ce972df432b23d9cb73babb6cc0679c6 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 17 一月 2020 14:56:15 +0800
Subject: [PATCH] 合并代码 ver.10086
---
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs | 198 +++++++++++++++++++++++++++----------------------
1 files changed, 110 insertions(+), 88 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
index 95da582..1a1a47d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
@@ -7,23 +7,31 @@
{
public class DoorLockCommonLayout : EditorCommonForm
{
+ /// <summary>
+ /// 鏋勯�犲嚱鏁�
+ /// </summary>
public DoorLockCommonLayout()
{
-
}
- #region 鈼� 鍙橀噺鐢虫槑__________________________
+ #region 鍙橀噺鐢虫槑
public FrameLayout topFrameLayout = new FrameLayout { Height = Application.GetRealHeight(184), BackgroundColor = ZigbeeColor.Current.XMTopFrameLayout };
public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1921 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout };
- #region 鈼� 搴曢儴鏈夊渾瑙掑竷灞�__________________________
+ #region 搴曢儴鏈夊渾瑙掑竷灞�
+ /// 鑳屾櫙闃村奖鐣岄潰
+ /// </summary>
public FrameLayout shadowRadiusFrameLayout = new FrameLayout { BackgroundColor = 0x0f000000 };
-
+ /// <summary>
+ /// 璁剧疆鍦嗚鐨勭晫闈�
+ /// </summary>
public FrameLayout bottomRadiusFrameLayout = new FrameLayout()
{
- Height = Application.GetRealHeight(906),
+ Height = Application.GetRealHeight(806),
Y = Application.GetRealHeight(930),
BackgroundColor = ZigbeeColor.Current.XMWhite,
};
-
+ /// <summary>
+ /// 搴曢儴鍦嗚涓殑鍙栨秷鎸夐挳
+ /// </summary>
public Button btnCancel = new Button
{
X = Application.GetRealWidth(81),
@@ -34,7 +42,9 @@
TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
TextSize = 14,
};
-
+ /// <summary>
+ /// 搴曢儴鍦嗚涓殑鏍囬鏍�
+ /// </summary>
public Button btnBottomTitle = new Button
{
X = Application.GetRealWidth(446 - 50),
@@ -45,7 +55,9 @@
TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
TextSize = 16,
};
-
+ /// <summary>
+ /// 搴曢儴鍦嗚涓殑纭鎸夐挳
+ /// </summary>
public Button btnFinish = new Button
{
X = Application.GetRealWidth(919),
@@ -56,17 +68,20 @@
TextColor = Shared.Common.ZigbeeColor.Current.XMOrange,
TextSize = 14,
};
+ /// <summary>
+ /// 搴曢儴鍦嗚涓殑鏍囬鏍忎笅鐨勭嚎鏉�
+ /// </summary>
+ public Button line = new Button()
+ {
+ Y = Application.GetRealHeight(138),
+ Height = 1,
+ BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
+ };
+
#endregion
- /// <summary>
- /// 鈼� 涓儴鍒锋柊甯冨眬__________________________
- /// </summary>
- //public VerticalRefreshLayout midVerticalScrolViewLayout = new VerticalRefreshLayout()
- //{
- //};
-
/// <summary>
- /// 鈼� 鏍囬鏍忓竷灞�__________________________
+ /// 鏍囬鏍忓竷灞�
/// </summary>
public FrameLayout titleFrameLayout = new FrameLayout
{
@@ -131,6 +146,7 @@
topFrameLayout.AddChidren(btnBackFrameLayout);
topFrameLayout.AddChidren(titleFrameLayout);
topFrameLayout.AddChidren(btnTitleLine);
+
var title = new Button()
{
TextAlignment = TextAlignment.CenterLeft,
@@ -181,6 +197,7 @@
this.bottomRadiusFrameLayout.AddChidren(btnCancel);
this.bottomRadiusFrameLayout.AddChidren(btnBottomTitle);
this.bottomRadiusFrameLayout.AddChidren(btnFinish);
+ this.bottomRadiusFrameLayout.AddChidren(line);
}
/// <summary>
@@ -288,8 +305,8 @@
alert.ConfirmClickEvent += () =>
{
var form = new UserCenter.UserMain.SecondAuthenticationForm();
- form.AddForm();
- };
+ form.AddForm();
+ };
}
doorLock.ReSave();
}
@@ -334,7 +351,7 @@
{
var form = new UserCenter.UserMain.SecondAuthenticationForm();
form.AddForm();
- };
+ };
}
/// <summary>
@@ -346,7 +363,7 @@
/// <param name="btnDoorLockPic">闂ㄩ攣鍥剧墖寮�/鍏虫樉绀�</param>
public void RemoteUnlockRequest(ZigBee.Device.DoorLock doorLock, Action action, Button progressButton = null, Button btnDoorLockPic = null, Button btnStatus = null, Button btnDoorLockTitle = null)
{
- if (doorLock.RemoteUnlockPassword == "")
+ if (string.IsNullOrEmpty(doorLock.RemoteUnlockPassword))
{
string msgRemoteUnlockRequest = Language.StringByID(R.MyInternationalizationString.BindRemoteUnlockDoorlock);
var alertRemoteUnlockRequest = new Shared.Phone.UserCenter.ShowMsgControl(ShowMsgType.Confirm, msgRemoteUnlockRequest, Language.StringByID(R.MyInternationalizationString.GoSetting));
@@ -354,43 +371,20 @@
//浣跨敤纭鍨嬪脊妗嗘椂,鐨勫洖璋冨嚱鏁�
alertRemoteUnlockRequest.ConfirmClickEvent += () =>
{
- if (UserCenterResourse.UserInfo.AuthorityNo == 1)
+ var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock);
+ Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting);
+ Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+ functionSetting.Show();
+ functionSetting.devicNameAction += (deviceRename) =>
{
- var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock);
- Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting);
- Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
- functionSetting.Show();
- functionSetting.devicNameAction += (deviceRename) =>
+ if (!string.IsNullOrEmpty(deviceRename))
{
- if (!string.IsNullOrEmpty(deviceRename))
+ if (btnDoorLockTitle != null)
{
- if (btnDoorLockTitle != null)
- {
- btnDoorLockTitle.Text = deviceRename;
- }
+ btnDoorLockTitle.Text = deviceRename;
}
- };
- }
- else
- {
- var functionSettingSub = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock);
- Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSettingSub);
- Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
- functionSettingSub.Show();
- functionSettingSub.devicNameAction += (deviceRename) =>
- {
- if (!string.IsNullOrEmpty(deviceRename))
- {
- if (!string.IsNullOrEmpty(deviceRename))
- {
- if (btnDoorLockTitle != null)
- {
- btnDoorLockTitle.Text = deviceRename;
- }
- }
- }
- };
- }
+ }
+ };
};
return;
}
@@ -405,7 +399,7 @@
{
var form = new UserCenter.UserMain.SecondAuthenticationForm();
form.AddForm();
- };
+ };
return;
}
@@ -525,43 +519,20 @@
new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.DoorlockPasswordDispear), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(CommonPage.Instance);
CommonPage.Loading.Hide();
doorLock.RemoteUnlockPassword = "";
- if (UserCenterResourse.UserInfo.AuthorityNo == 1)
+ var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock);
+ Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting);
+ Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+ functionSetting.Show();
+ functionSetting.devicNameAction += (deviceRename) =>
{
- var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock);
- Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting);
- Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
- functionSetting.Show();
- functionSetting.devicNameAction += (deviceRename) =>
+ if (!string.IsNullOrEmpty(deviceRename))
{
- if (!string.IsNullOrEmpty(deviceRename))
+ if (btnDoorLockTitle != null)
{
- if (btnDoorLockTitle != null)
- {
- btnDoorLockTitle.Text = deviceRename;
- }
+ btnDoorLockTitle.Text = deviceRename;
}
- };
- }
- else
- {
- var functionSettingSub = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock);
- Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSettingSub);
- Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
- functionSettingSub.Show();
- functionSettingSub.devicNameAction += (deviceRename) =>
- {
- if (!string.IsNullOrEmpty(deviceRename))
- {
- if (!string.IsNullOrEmpty(deviceRename))
- {
- if (btnDoorLockTitle != null)
- {
- btnDoorLockTitle.Text = deviceRename;
- }
- }
- }
- };
- }
+ }
+ };
});
}
}
@@ -600,9 +571,60 @@
});
};
HdlCheckLogic.Current.CheckSecondarySecurity(action);
- };
+ };
}
// 鑾峰彇鍒板埌鍚嶇О鏇存敼鍥炶皟閫氱煡
public Action<string> devicNameSecAction;
+
+
+ /// <summary>
+ /// 褰撳墠閫変腑鐨勫紑閿佹柟寮�
+ /// </summary>
+ /// <param name="btnAllMethod"></param>
+ /// <param name="btnMethodText"></param>
+ /// <param name="oldbutton"></param>
+ /// <param name="oldbuttonText"></param>
+ public void CurrentSelectUnlockMethod(Button btnAllMethod, Button btnMethodText, Button oldbutton, Button oldbuttonText)
+ {
+ btnAllMethod.IsSelected = true;
+ btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+ btnMethodText.IsBold = true;
+ oldbutton = btnAllMethod;
+ oldbuttonText = btnMethodText;
+ }
+
+ /// <summary>
+ /// 鏄剧ず鎵�鏈夊紑閿佹柟寮忕殑鏁版嵁
+ /// </summary>
+ /// <param name="curIndex"></param>
+ /// <param name="btnAllMethod"></param>
+ /// <param name="btnMethodText"></param>
+ public void DisplayAllUnlockMethod(int curIndex, Button btnAllMethod, Button btnMethodText)
+ {
+ switch (curIndex)
+ {
+ case 0:
+ btnAllMethod.UnSelectedImagePath = "DoorLock/AllMethod.png";
+ btnAllMethod.SelectedImagePath = "DoorLock/AllMethodOn.png";
+ btnMethodText.Text = Language.StringByID(R.MyInternationalizationString.AllMethod);
+ break;
+ case 1:
+ btnAllMethod.UnSelectedImagePath = "DoorLock/Password.png";
+ btnAllMethod.SelectedImagePath = "DoorLock/PasswordOn.png";
+ btnMethodText.Text = Language.StringByID(R.MyInternationalizationString.PasswordUnlock);
+ break;
+ case 2:
+ btnAllMethod.UnSelectedImagePath = "DoorLock/Fingerprint.png";
+ btnAllMethod.SelectedImagePath = "DoorLock/FingerprintOn.png";
+ btnMethodText.Text = Language.StringByID(R.MyInternationalizationString.FingerprintUnlock);
+ break;
+ case 3:
+ btnAllMethod.UnSelectedImagePath = "DoorLock/proximityCard.png";
+ btnAllMethod.SelectedImagePath = "DoorLock/proximityCardOn.png";
+ btnMethodText.Text = Language.StringByID(R.MyInternationalizationString.ProximithCardUnlock);
+ break;
+ }
+ }
+
}
}
--
Gitblit v1.8.0