From 463cf39019aa54e6c1226be4620766a035a0c490 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期二, 14 四月 2020 13:31:07 +0800
Subject: [PATCH] 上传个东西
---
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs | 64 ++-
ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs | 30
ZigbeeApp/GateWay.Droid/Assets/Language.ini | 9
ZigbeeApp/Home.Ios/Resources/Language.ini | 9
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs | 4
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs | 9
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs | 45 +-
ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs | 319 ++++++++-------
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs | 82 +++
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs | 8
ZigbeeApp/Shared/Phone/Login/AccountLogin.cs | 292 ++++++++++++++
ZigbeeApp/Shared/R.cs | 33 +
ZigbeeApp/Shared/Shared.projitems | 1
ZigbeeApp/Shared/Phone/Login/Controls/PhoneEmailSelectControl.cs | 129 ++++++
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs | 58 ++
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs | 4
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs | 12
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs | 24
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs | 18
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs | 13
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs | 15
ZigbeeApp/Shared/Common/Device.cs | 9
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs | 6
23 files changed, 911 insertions(+), 282 deletions(-)
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
index a46cfd0..f66d440 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini
+++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -302,10 +302,14 @@
295= 鐢熸晥鏃堕棿涓嶈兘澶т簬澶辨晥鏃堕棿
296= 澶辨晥鏃堕棿涓嶈兘灏忎簬鐢熸晥鏃堕棿
297= 澶辨晥鏃堕棿涓嶈兘鐪佺暐
-298= 澶辨晥鏃堕棿涓嶈兘澶т簬36灏忔椂
+298= 澶辨晥鏃堕棿涓嶈兘澶т簬72灏忔椂
299= 澶辨晥鏃堕棿涓嶈兘灏忎簬1灏忔椂
300=鏂伴
301=闈炵鐞嗗憳涓嶈兘鍦ㄥ父寮�妯″紡涓嬫搷浣�
+302=缁戝畾鏂伴
+303=娓╁害鏉ユ簮
+304=婀垮害鏉ユ簮
+305=PM2.5鏉ユ簮
@@ -1793,6 +1797,9 @@
16088=甯稿紑妯″紡寮�鍚�(缃戝叧瑙﹀彂)
16089=甯稿紑妯″紡缁撴潫(缃戝叧瑙﹀彂)
16090=甯稿紑妯″紡
+16091=甯稿紑妯″紡鎵嬪姩寮�鍚�
+16092=甯稿紑妯″紡鎵嬪姩鍙栨秷
+16093=甯稿紑妯″紡鍚敤{0}灏忔椂
;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
18004=鎸囧畾缃戝叧宸茬粡琚粦瀹�
diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini
index a46cfd0..f66d440 100755
--- a/ZigbeeApp/Home.Ios/Resources/Language.ini
+++ b/ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -302,10 +302,14 @@
295= 鐢熸晥鏃堕棿涓嶈兘澶т簬澶辨晥鏃堕棿
296= 澶辨晥鏃堕棿涓嶈兘灏忎簬鐢熸晥鏃堕棿
297= 澶辨晥鏃堕棿涓嶈兘鐪佺暐
-298= 澶辨晥鏃堕棿涓嶈兘澶т簬36灏忔椂
+298= 澶辨晥鏃堕棿涓嶈兘澶т簬72灏忔椂
299= 澶辨晥鏃堕棿涓嶈兘灏忎簬1灏忔椂
300=鏂伴
301=闈炵鐞嗗憳涓嶈兘鍦ㄥ父寮�妯″紡涓嬫搷浣�
+302=缁戝畾鏂伴
+303=娓╁害鏉ユ簮
+304=婀垮害鏉ユ簮
+305=PM2.5鏉ユ簮
@@ -1793,6 +1797,9 @@
16088=甯稿紑妯″紡寮�鍚�(缃戝叧瑙﹀彂)
16089=甯稿紑妯″紡缁撴潫(缃戝叧瑙﹀彂)
16090=甯稿紑妯″紡
+16091=甯稿紑妯″紡鎵嬪姩寮�鍚�
+16092=甯稿紑妯″紡鎵嬪姩鍙栨秷
+16093=甯稿紑妯″紡鍚敤{0}灏忔椂
;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
18004=鎸囧畾缃戝叧宸茬粡琚粦瀹�
diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index 13acb40..7a1bee7 100755
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -2044,6 +2044,15 @@
return false;
}
}
+ //濡傛灉鏄柊椋庨潰鏉跨殑鏂伴璁惧,鍒欎笉鏄剧ず
+ else if (i_device.Type == DeviceType.FreshAir)
+ {
+ var myInfoType = LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { i_device });
+ if (myInfoType.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+ {
+ return false;
+ }
+ }
//2020.03.30杩藉姞寮忔牱:濡傛灉鏄潰鏉跨殑娓╁害鎺㈠ご,涓嶆樉绀�
else if (i_device.Type == DeviceType.TemperatureSensor && ((TemperatureSensor)i_device).SensorDiv == 1)
{
diff --git a/ZigbeeApp/Shared/Phone/Login/AccountLogin.cs b/ZigbeeApp/Shared/Phone/Login/AccountLogin.cs
index 616eb2f..88dedda 100755
--- a/ZigbeeApp/Shared/Phone/Login/AccountLogin.cs
+++ b/ZigbeeApp/Shared/Phone/Login/AccountLogin.cs
@@ -2,7 +2,8 @@
using Shared.Common;
using Shared.Phone.UserView;
using Shared.Phone.Device.CommonForm;
-
+using Shared.Phone.UserCenter;
+
namespace Shared.Phone.Login
{
/// <summary>
@@ -858,10 +859,297 @@
{
loginBtn.Enable = loginBtn.IsSelected = false;
}
- }
+ }
+
+
+ #endregion
+
+
+
+
+ #region 鈻� 鍙橀噺澹版槑___________________________
+ /// <summary>
+ /// 鎵嬫満璐﹀彿鐧婚檰鐨勬帶浠跺鍣�
+ /// </summary>
+ private FrameLayout frameAccLoginPhoneback = null;
+ /// <summary>
+ /// 閭璐﹀彿鐧婚檰鐨勬帶浠跺鍣�
+ /// </summary>
+ private FrameLayout frameEmailLoginPhoneback = null;
#endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+ /// <summary>
+ /// 鐣岄潰鏄剧ず
+ /// </summary>
+ /// <param name="account">鐧婚檰璐﹀彿</param>
+ public void ShowForm(string account = "")
+ {
+ if (Config.Instance.IsLogin == true)
+ {
+ return;
+ }
+ CommonPage.Instance.IsDrawerLockMode = true;
+ this.Tag = "Login";
+
+ //鐣岄潰涓婇儴鐨勯粦鑹插浘鐗�
+ var btnTopBlackPic = new NormalViewControl(this.Width, Application.GetRealHeight(619), false);
+ btnTopBlackPic.UnSelectedImagePath = "Account/Logo_loginBG.png";
+ this.AddChidren(btnTopBlackPic);
+
+ //涓棿娴呯櫧鑹茬殑鑳屾櫙
+ var frameMidBack = new FrameLayout();
+ frameMidBack.Y = btnTopBlackPic.Bottom;
+ frameMidBack.Height = this.Height - btnTopBlackPic.Bottom;
+ frameMidBack.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
+ this.AddChidren(frameMidBack);
+
+ //HdlHome鐨勫浘鏍�
+ var btnLogoIcon = new PicViewControl(184, 184);
+ btnLogoIcon.Y = Application.GetRealHeight(230);
+ btnLogoIcon.UnSelectedImagePath = "Account/Logo_White.png";
+ btnLogoIcon.Gravity = Gravity.CenterHorizontal;
+ this.AddChidren(btnLogoIcon);
+ //Hdl Home
+ var btnLogoName = new NormalViewControl(300, 69, true);
+ btnLogoName.Y = btnLogoIcon.Bottom;
+ btnLogoName.Gravity = Gravity.CenterHorizontal;
+ btnLogoName.TextID = R.MyInternationalizationString.AppName;
+ btnLogoName.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
+ btnLogoName.TextSize = 16;
+ this.AddChidren(btnLogoName);
+
+ //鎵嬫満鍙�,閭鐨勮彍鍗曟帶浠�
+ int defultIndex = account.Contains("@") == false ? 1 : 2;
+ var sitchControl = new Controls.PhoneEmailSelectControl();
+ sitchControl.Y = Application.GetRealHeight(559);
+ this.AddChidren(sitchControl);
+ sitchControl.SelectMenuEvent += (selectIndex) =>
+ {
+ //鎵嬫満鍙�
+ if (selectIndex == 1)
+ {
+ }
+ //閭
+ else if (selectIndex == 2)
+ {
+ }
+ };
+ //鎵ц鍒濆鍖�
+ sitchControl.InitControl(ZigbeeColor.Current.GXCButtonSelectedColor, defultIndex);
+
+
+ phoneEmailForm = new PhoneEmailForm();
+ phoneEmailForm.Init(midFrameLayout);
+
+
+ //閿欒鎻愮ずBtn
+ loginErrorBtn = new Button()
+ {
+ X = Application.GetRealWidth(242),
+ Y = Application.GetRealHeight(740),
+ Width = Application.GetRealWidth(700),
+ Height = Application.GetRealHeight(58),
+ TextColor = ZigbeeColor.Current.GXCTextRed,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CommonFormResouce.TextSize,
+ IsBold = true
+ };
+ midFrameLayout.AddChidren(loginErrorBtn);
+
+ accountPwdFL = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(801),
+ Height = Application.GetRealHeight(553),
+ Width = Application.GetRealWidth(942),
+ Gravity = Gravity.CenterHorizontal,
+ BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(17)
+ };
+ midFrameLayout.AddChidren(accountPwdFL);
+
+ AddPhoneOrEmailFL(accountPwdFL, "Phone");
+
+ forgotPasswordBtn = new Button()
+ {
+ X = Application.GetRealWidth(CommonPage.AppRealWidth - 115 - 250),
+ Y = Application.GetRealHeight(1198),
+ Width = Application.GetRealWidth(250),
+ Height = Application.GetRealHeight(58),
+ TextID = R.MyInternationalizationString.ForgotPWD_1,
+ TextSize = CommonFormResouce.loginTextSize,
+ TextColor = Shared.Common.ZigbeeColor.Current.GXCTextGrayColor,
+ TextAlignment = TextAlignment.CenterRight
+ };
+ midFrameLayout.AddChidren(forgotPasswordBtn);
+
+ loginBtn = new Button()
+ {
+ Y = Application.GetRealHeight(1293),
+ Width = Application.GetRealWidth(688),
+ Height = Application.GetRealHeight(127),
+ Gravity = Gravity.CenterHorizontal,
+ TextID = R.MyInternationalizationString.Login,
+ TextSize = 16,
+ TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+ SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+ SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor,
+ BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor,
+ Radius = (uint)Application.GetRealHeight(127 / 2),
+ Enable = false,
+ IsBold = true
+ };
+ midFrameLayout.AddChidren(loginBtn);
+
+ loginByCodeBtn = new Button()
+ {
+ X = Application.GetRealWidth(98),
+ Y = Application.GetRealHeight(1466),
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(49),
+ TextID = R.MyInternationalizationString.LoginByCode,
+ TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CommonFormResouce.loginTextSize
+ };
+ midFrameLayout.AddChidren(loginByCodeBtn);
+
+ registerBtn = new Button()
+ {
+ X = Application.GetRealWidth(738),
+ Y = Application.GetRealHeight(1466),
+ Width = Application.GetRealWidth(244),
+ Height = Application.GetRealHeight(49),
+ TextID = R.MyInternationalizationString.Register,
+ TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+ TextAlignment = TextAlignment.CenterRight,
+ TextSize = CommonFormResouce.loginTextSize
+ };
+ midFrameLayout.AddChidren(registerBtn);
+
+ wechatBtn = new Button
+ {
+ X = Application.GetRealWidth(395),
+ Y = Application.GetRealHeight(1737),
+ Width = Application.GetMinRealAverage(115),
+ Height = Application.GetMinRealAverage(115),
+ UnSelectedImagePath = "Account/Wechat.png",
+ Gravity = Gravity.CenterHorizontal
+ };
+ midFrameLayout.AddChidren(wechatBtn);
+
+ qqBtn = new Button
+ {
+ X = Application.GetRealWidth(567),
+ Y = Application.GetRealHeight(1737),
+ Width = Application.GetMinRealAverage(115),
+ Height = Application.GetMinRealAverage(115),
+ UnSelectedImagePath = "Account/QQ.png"
+ };
+ //midFrameLayout.AddChidren(qqBtn);
+
+ BindEvent();
+
+ if (account.Contains("@") == true)
+ {
+ SelectPhoneOrEmail_MouseUpEvent(phoneEmailForm.SelectedEmail, null);
+ }
+ }
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖栬处鍙风櫥闄嗙獥鍙________________
+
+ /// <summary>
+ /// 鍒濆鍖栬处鍙风櫥闄嗙獥鍙�
+ /// </summary>
+ /// <param name="frameMidBack">涓棿娴呰壊鐨勮儗鏅鍣�</param>
+ /// <param name="i_account">鐧婚檰璐﹀彿</param>
+ /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
+ private void InitAccoutLoginWindow(FrameLayout frameMidBack, string i_account, int i_div)
+ {
+ //瀹瑰櫒
+ var frameBack = new FrameLayout();
+ frameBack.Height = Application.GetRealHeight(620);
+ frameBack.Y = Application.GetRealHeight(181);
+ frameMidBack.AddChidren(frameBack);
+ //鐧借壊鑳屾櫙
+ var frameWhiteBack = new FrameLayout();
+ frameWhiteBack.Width = Application.GetRealWidth(942);
+ frameWhiteBack.Height = Application.GetRealHeight(553);
+ frameWhiteBack.BackgroundColor = UserCenterColor.Current.White;
+ frameWhiteBack.Radius = (uint)Application.GetRealHeight(17);
+ frameWhiteBack.Gravity = Gravity.CenterHorizontal;
+ frameBack.AddChidren(frameWhiteBack);
+
+ //璐﹀彿琛�
+ var rowAccount = new FrameLayout();
+ rowAccount.Y = Application.GetRealHeight(29);
+ rowAccount.Width = Application.GetRealWidth(884);
+ rowAccount.Height = Application.GetRealHeight(138);
+ rowAccount.Gravity = Gravity.CenterHorizontal;
+ frameWhiteBack.AddChidren(rowAccount);
+ //璐﹀彿鍥炬爣
+ var btnAccountIcon = new IconViewControl(92);
+ btnAccountIcon.X = Application.GetRealWidth(69);
+ btnAccountIcon.Gravity = Gravity.CenterVertical;
+ btnAccountIcon.UnSelectedImagePath = "Account/Account.png";
+ rowAccount.AddChidren(btnAccountIcon);
+ //璐﹀彿杈撳叆妗�
+ var txtAccount = new TextInputControl(600, 92, true);
+ txtAccount.X = btnAccountIcon.Right + Application.GetRealWidth(35);
+ txtAccount.Gravity = Gravity.CenterVertical;
+ if (i_div == 1)
+ {
+ //鎵嬫満鍙�
+ txtAccount.IsNumberKeyboardType = true;
+ txtAccount.PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPhoneNum);
+ }
+ else
+ {
+ //閭
+ txtAccount.PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputEmail);
+ }
+ txtAccount.PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor;
+ txtAccount.Text = i_account;
+ rowAccount.AddChidren(txtAccount);
+ //搴曠嚎
+ var btnAccountLine = new NormalViewControl(rowAccount.Width, 1, false);
+ btnAccountLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
+ btnAccountLine.Y = rowAccount.Height - 1;
+ rowAccount.AddChidren(btnAccountLine);
+
+ //瀵嗙爜琛�
+ var rowPassword = new FrameLayout();
+ rowPassword.Y = rowAccount.Bottom + Application.GetRealHeight(58);
+ rowPassword.Width = rowAccount.Width;
+ rowPassword.Height = rowAccount.Height;
+ rowPassword.Gravity = Gravity.CenterHorizontal;
+ frameWhiteBack.AddChidren(rowPassword);
+ //璐﹀彿鍥炬爣
+ var btnPswIcon = new IconViewControl(92);
+ btnPswIcon.X = btnAccountIcon.X;
+ btnPswIcon.Gravity = Gravity.CenterVertical;
+ btnPswIcon.UnSelectedImagePath = "Account/Password.png";
+ rowPassword.AddChidren(btnPswIcon);
+ //璐﹀彿杈撳叆妗�
+ var txtPsw = new TextInputControl(600, 92, true);
+ txtPsw.X = txtAccount.X;
+ txtPsw.Gravity = Gravity.CenterVertical;
+ txtPsw.PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPWD);
+ txtPsw.PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor;
+ txtPsw.SecureTextEntry = true;
+ rowPassword.AddChidren(txtPsw);
+ //搴曠嚎
+ var btnPswLine = new NormalViewControl(rowPassword.Width, 1, false);
+ btnPswLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
+ btnPswLine.Y = rowPassword.Height - 1;
+ rowPassword.AddChidren(btnPswLine);
+ }
+
+ #endregion
}
}
diff --git a/ZigbeeApp/Shared/Phone/Login/Controls/PhoneEmailSelectControl.cs b/ZigbeeApp/Shared/Phone/Login/Controls/PhoneEmailSelectControl.cs
new file mode 100755
index 0000000..0360031
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Login/Controls/PhoneEmailSelectControl.cs
@@ -0,0 +1,129 @@
+锘縰sing Shared.Phone.UserCenter;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.Login.Controls
+{
+ /// <summary>
+ /// 鐧婚檰鐣岄潰鐨勬墜鏈哄彿鍜岄偖绠辨潵鍥炲垏鎹㈢殑鎺т欢
+ /// </summary>
+ public class PhoneEmailSelectControl : FrameLayout
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ /// <summary>
+ /// 鑿滃崟閫夋嫨浜嬩欢 1:鎵嬫満鍙� 2:閭
+ /// </summary>
+ public Action<int> SelectMenuEvent = null;
+ /// <summary>
+ /// 鎵嬫満鍙锋帶浠�
+ /// </summary>
+ private NormalViewControl btnPhone = null;
+ /// <summary>
+ /// 閭鎺т欢
+ /// </summary>
+ private NormalViewControl btnEmail = null;
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
+ /// <summary>
+ /// 鐧婚檰鐣岄潰鐨勬墜鏈哄彿鍜岄偖绠辨潵鍥炲垏鎹㈢殑鎺т欢
+ /// </summary>
+ public PhoneEmailSelectControl()
+ {
+ this.Width = HdlControlLogic.Current.GetPictrueRealSize(905);
+ this.Height = HdlControlLogic.Current.GetPictrueRealSize(170);
+ this.Gravity = Gravity.CenterHorizontal;
+ this.BackgroundImagePath = "Account/PhoneEmail_White.png";
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栨帶浠�(绱㈠紩浼氳Е鍙戝洖璋冧簨浠�,SelectMenuEvent闇�瑕佸湪瀹冧箣鍓嶅疄鐜�)
+ /// </summary>
+ /// <param name="selectBackColor">閫夋嫨鏃剁殑鑳屾櫙棰滆壊</param>
+ /// <param name="selectIndex">榛樿閫夋嫨鐨勭储寮� 1:鎵嬫満鍙� 2:閭</param>
+ public void InitControl(uint selectBackColor,int selectIndex)
+ {
+ //鎵嬫満鍙�
+ this.btnPhone = new NormalViewControl(this.Width / 2 + HdlControlLogic.Current.GetPictrueRealSize(20), HdlControlLogic.Current.GetPictrueRealSize(127), false);
+ btnPhone.X = HdlControlLogic.Current.GetPictrueRealSize(10);
+ btnPhone.SelectedBackgroundColor = selectBackColor;
+ btnPhone.TextID = R.MyInternationalizationString.PhoneNum;
+ btnPhone.TextColor = UserCenterColor.Current.TextGrayColor3;
+ btnPhone.SelectedTextColor = UserCenterColor.Current.White;
+ btnPhone.Radius = (uint)HdlControlLogic.Current.GetPictrueRealSize(127) / 2;
+ this.AddChidren(btnPhone);
+ btnPhone.ButtonClickEvent += (sender, e) =>
+ {
+ if (btnPhone.IsSelected == false)
+ {
+ btnPhone.IsBold = true;
+ btnPhone.IsSelected = true;
+
+ btnEmail.IsBold = false;
+ btnEmail.IsSelected = false;
+ //璋冪敤鍥炶皟鍑芥暟
+ this.SelectMenuEvent?.Invoke(1);
+ }
+ };
+
+ //閭
+ this.btnEmail = new NormalViewControl(this.btnPhone.Width, this.btnPhone.Height, false);
+ btnEmail.X = this.btnPhone.Right - HdlControlLogic.Current.GetPictrueRealSize(40);
+ btnEmail.SelectedBackgroundColor = selectBackColor;
+ btnEmail.TextID = R.MyInternationalizationString.Email;
+ btnEmail.TextColor = UserCenterColor.Current.TextGrayColor3;
+ btnEmail.SelectedTextColor = UserCenterColor.Current.White;
+ btnEmail.Radius = (uint)HdlControlLogic.Current.GetPictrueRealSize(127) / 2;
+ this.AddChidren(btnEmail);
+ btnEmail.ButtonClickEvent += (sender, e) =>
+ {
+ if (btnEmail.IsSelected == false)
+ {
+ btnPhone.IsBold = false;
+ btnPhone.IsSelected = false;
+
+ btnEmail.IsBold = true;
+ btnEmail.IsSelected = true;
+ //璋冪敤鍥炶皟鍑芥暟
+ this.SelectMenuEvent?.Invoke(2);
+ }
+ };
+
+ //璁剧疆鍒濆鍊�
+ if (selectIndex == 1)
+ {
+ btnPhone.IsBold = true;
+ btnPhone.IsSelected = true;
+ //璋冪敤鍥炶皟鍑芥暟
+ this.SelectMenuEvent?.Invoke(1);
+ }
+ else if (selectIndex == 2)
+ {
+ btnEmail.IsBold = true;
+ btnEmail.IsSelected = true;
+ //璋冪敤鍥炶皟鍑芥暟
+ this.SelectMenuEvent?.Invoke(2);
+ }
+ }
+
+ #endregion
+
+ #region 鈻� 鎺т欢鎽ф瘉___________________________
+
+ /// <summary>
+ /// 鎺т欢鎽ф瘉
+ /// </summary>
+ public override void RemoveFromParent()
+ {
+ this.SelectMenuEvent = null;
+
+ base.RemoveFromParent();
+ }
+
+ #endregion
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
index e80c361..97428b0 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -683,8 +683,11 @@
}, ShowErrorMode.NO);
}
});
-
- System.Threading.Thread.Sleep(50);
+ if (contrCount > 6)
+ {
+ //璁╁畠鍛堢幇涓�绉嶇洿鎺ヤ竴娆℃�у埛鍑烘潵鐨勬晥鏋�
+ System.Threading.Thread.Sleep(50);
+ }
}
}
@@ -898,7 +901,11 @@
});
}
});
- System.Threading.Thread.Sleep(50);
+ if (contrCount > 6)
+ {
+ //璁╁畠鍛堢幇涓�绉嶄竴娆℃�ф樉绀哄嚭鏉ョ殑鏁堟灉
+ System.Threading.Thread.Sleep(50);
+ }
}
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
index f2add7e..8038b83 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
@@ -97,7 +97,7 @@
public void AdjustChidrenFrameHeight(FrameLayout frame, int buttomSpace)
{
//鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣
- int value = this.GetLocationMostLastViewBottom();
+ int value = this.GetLocationMostLastViewBottom(frame);
if (value != -1)
{
//璋冩暣妗屽竷楂樺害
@@ -114,7 +114,7 @@
public void AdjustTableHeight()
{
//鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣
- int value = this.GetLocationMostLastViewBottom();
+ int value = this.GetLocationMostLastViewBottom(this.m_frameTable);
if (value != -1)
{
//璋冩暣妗屽竷楂樺害
@@ -135,9 +135,12 @@
return;
}
//娣诲姞涓存椂鎺т欢,鐩磋嚦鍙互婊戝姩瓒呰繃搴曢儴鎸夐挳
+ int oldRowSpace = this.rowSpace;
+ this.rowSpace = 0;
var frameBackTemp = new FrameLayout();
frameBackTemp.Height = ControlCommonResourse.BodyFrameHeight - btnTemp.Yaxis + Application.GetRealHeight(23);
this.AddChidrenFrame(frameBackTemp);
+ this.rowSpace = oldRowSpace;
}
/// <summary>
@@ -155,15 +158,15 @@
/// 鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣
/// </summary>
/// <returns></returns>
- private int GetLocationMostLastViewBottom()
+ private int GetLocationMostLastViewBottom(FrameLayout frame)
{
int bottomHeight = -1;
- if (this.m_frameTable == null) { return bottomHeight; }
+ if (frame == null) { return bottomHeight; }
- for (int i = 0; i < this.m_frameTable.ChildrenCount; i++)
+ for (int i = 0; i < frame.ChildrenCount; i++)
{
- var child = this.m_frameTable.GetChildren(i);
+ var child = frame.GetChildren(i);
if (child.Bottom > bottomHeight)
{
bottomHeight = child.Bottom;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs
index 4f3a0c7..fff74a2 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs
@@ -123,7 +123,14 @@
}
}
//妫�娴嬫ゼ灞傛暟鎹殑鍚堟硶鎬�
- this.CheckFloorData(listRoomFile);
+ if (UserCenterResourse.UserInfo.AuthorityNo == 3)
+ {
+ this.CheckMemberFloorData(listRoomFile);
+ }
+ else
+ {
+ this.CheckAdminFloorData(listRoomFile);
+ }
homeTemp.Save(false);
InitAllRoom();
@@ -144,8 +151,12 @@
/// 妫�娴嬫ゼ灞傛暟鎹殑鍚堟硶鎬�
/// </summary>
/// <param name="listRoomFile"></param>
- private void CheckFloorData(List<string> listRoomFile)
+ private void CheckAdminFloorData(List<string> listRoomFile)
{
+ //娌℃湁妤煎眰,鍒欐棤闇�澶勭悊
+ if (Config.Instance.Home.FloorDics.Count == 0) { return; }
+
+ //涓讳汉鎴栬�呯鐞嗗憳鐨勮瘽,灏辨娴嬫槸鍚﹀瓨鍦ㄦ湭鍒嗛厤妤煎眰鐨勬埧闂�
for (int i = 0; i < listRoomFile.Count; i++)
{
try
@@ -165,6 +176,49 @@
}
}
+ /// <summary>
+ /// 妫�娴嬫ゼ灞傛暟鎹殑鍚堟硶鎬�
+ /// </summary>
+ /// <param name="listRoomFile"></param>
+ private void CheckMemberFloorData(List<string> listRoomFile)
+ {
+ //娌℃湁妤煎眰,鍒欐棤闇�澶勭悊
+ if (Config.Instance.Home.FloorDics.Count == 0) { return; }
+
+ //鎴愬憳鐨勮瘽,灏辨娴嬫槸鍚﹀瓨鍦ㄦ病鏈夋埧闂寸殑妤煎眰
+ var listEsixtFloor = new List<string>();
+ for (int i = 0; i < listRoomFile.Count; i++)
+ {
+ try
+ {
+ var byteData = Global.ReadFileByHomeId(listRoomFile[i]);
+ string valueData = System.Text.Encoding.UTF8.GetString(byteData);
+ var roomTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.Room>(valueData);
+ if (roomTemp.FloorId != string.Empty && listEsixtFloor.Contains(roomTemp.FloorId) == false)
+ {
+ //鏀堕泦妤煎眰
+ listEsixtFloor.Add(roomTemp.FloorId);
+ }
+ }
+ catch (Exception ex) { HdlLogLogic.Current.WriteLog(ex); }
+ }
+ var listDeleteId = new List<string>();
+ foreach (var flootId in Config.Instance.Home.FloorDics.Keys)
+ {
+ if (listEsixtFloor.Contains(flootId) == false)
+ {
+ //濡傛灉杩欎釜id涓嶅瓨鍦ㄤ簬浠讳綍鎴块棿鐨勮瘽,鏀堕泦瀹�
+ listDeleteId.Add(flootId);
+ }
+ }
+ foreach (var deleteId in listDeleteId)
+ {
+ //鍒犻櫎杩欎釜id
+ Config.Instance.Home.FloorDics.Remove(deleteId);
+ }
+ Config.Instance.Home.Save(false);
+ }
+
#endregion
#region 鈻� 娣诲姞鎴块棿___________________________
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
index 095152f..2da6efc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
@@ -365,6 +365,8 @@
}
}
+ //娓呯┖妤煎眰鏁版嵁
+ Common.Config.Instance.Home.FloorDics.Clear();
//鐒跺悗妫�娴嬫湰鍦扮殑鏂囦欢
var listLocalFile = Global.FileListByHomeId();
foreach (string fileName in listLocalFile)
@@ -375,8 +377,7 @@
var varData = Global.ReadFileByHomeId(fileName);
var dicFloor = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(Encoding.UTF8.GetString(varData));
Common.Config.Instance.Home.FloorDics = dicFloor;
- Common.Config.Instance.Home.Save(false);
-
+ //鏆傛椂涓嶄繚瀛�,鐣欏湪鏈�鍚庨潰鎵嶄繚瀛�
Global.DeleteFilebyHomeId(fileName);
}
@@ -425,6 +426,10 @@
dicUpdateTime.Remove(fileName);
}
}
+
+ //淇濆瓨妤煎眰鏁版嵁
+ Common.Config.Instance.Home.Save(false);
+
//缃戝叧鏂囦欢闈炲悎娉曟�ф槸鍒锋柊璁惧鍒楄〃鐨勫嚱鏁伴噷闈㈠疄鐜�
//淇濆瓨鍏ㄩ儴鍒嗕韩鏂囦欢鐨勬洿鏂版棩鏈�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
index 23e2b3a..cdbc6d0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
@@ -127,8 +127,8 @@
var btnBindDown = new Button
{
- Height = Application.GetRealHeight(69),
- Width = Application.GetRealWidth(69),
+ Height = Application.GetMinReal(69),
+ Width = Application.GetMinReal(69),
X = Application.GetRealWidth(200 - 77),
UnSelectedImagePath = "BindPic/BindDown.png",
Gravity = Gravity.CenterVertical,
@@ -353,8 +353,8 @@
var btnRoomFrameLayout = new FrameLayout
{
- Height = Application.GetRealHeight(159),
- Width = Application.GetRealWidth(255),
+ Height = Application.GetMinReal(159),
+ Width = Application.GetMinReal(255),
Y = Application.GetRealHeight(23),
X = Application.GetRealWidth(5),
BackgroundImagePath = "Item/RoomIconBackground.png",
@@ -529,7 +529,7 @@
}
/// <summary>
- /// 鎸夐敭缁戝畾鍦烘櫙琛ㄦ樉绀�
+ /// 鎸夐敭缁戝畾鐩爣琛ㄦ樉绀�
/// </summary>
/// <param name="gateway">Gateway.</param>
/// <param name="key">Key.</param>
@@ -733,8 +733,8 @@
var sidelipFrameLayout = new FrameLayout()
{
- Height = Application.GetRealHeight(783),
- Width = Application.GetRealWidth(449),
+ Height = Application.GetMinReal(783),
+ Width = Application.GetMinReal(449),
Y = Application.GetRealHeight(161),
X = Application.GetRealWidth(596),
BackgroundImagePath = "DoorLock/SideslipPic.png",
@@ -776,8 +776,8 @@
var btnAllMethod = new Button()
{
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
+ Width = Application.GetMinReal(81),
+ Height = Application.GetMinReal(81),
Y = Application.GetRealHeight(55),
UnSelectedImagePath = "Floor/Floor.png",
SelectedImagePath = "Floor/FloorSelected.png",
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
index 72c60b7..72394ac 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
@@ -100,8 +100,8 @@
var btnBindDown = new Button
{
- Height = Application.GetRealHeight(69),
- Width = Application.GetRealWidth(69),
+ Height = Application.GetMinReal(69),
+ Width = Application.GetMinReal(69),
X = Application.GetRealWidth(200 - 77),
UnSelectedImagePath = "BindPic/BindDown.png",
Gravity = Gravity.CenterVertical,
@@ -483,8 +483,8 @@
var btnRoomFrameLayout = new FrameLayout
{
- Height = Application.GetRealHeight(159),
- Width = Application.GetRealWidth(255),
+ Height = Application.GetMinReal(159),
+ Width = Application.GetMinReal(255),
Y = Application.GetRealHeight(23),
X = Application.GetRealWidth(5),
BackgroundImagePath = "Item/RoomIconBackground.png",
@@ -603,8 +603,8 @@
{
X = Application.GetMinRealAverage(58),
Y = Application.GetMinRealAverage(46),
- Width = Application.GetMinRealAverage(81),
- Height = Application.GetMinRealAverage(81),
+ Width = Application.GetMinReal(81),
+ Height = Application.GetMinReal(81),
UnSelectedImagePath = "Scene/SceneIcon.png",// scene.IconPath,
};
rowLayout.AddChidren(devicePic);
@@ -621,8 +621,8 @@
var btnChoose = new Button()
{
- Width = Application.GetRealWidth(60),
- Height = Application.GetRealHeight(60),
+ Width = Application.GetMinReal(60),
+ Height = Application.GetMinReal(60),
X = Application.GetRealWidth(861 + 81),
Y = Application.GetRealHeight(35),
SelectedImagePath = "DoorLock/SelectedIcon.png",
@@ -761,8 +761,8 @@
var sidelipFrameLayout = new FrameLayout()
{
- Height = Application.GetRealHeight(783),
- Width = Application.GetRealWidth(449),
+ Height = Application.GetMinReal(783),
+ Width = Application.GetMinReal(449),
Y = Application.GetRealHeight(161),
X = Application.GetRealWidth(596),
BackgroundImagePath = "DoorLock/SideslipPic.png",
@@ -804,8 +804,8 @@
var btnAllMethod = new Button()
{
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
+ Width = Application.GetMinReal(81),
+ Height = Application.GetMinReal(81),
Y = Application.GetRealHeight(55),
UnSelectedImagePath = "Floor/Floor.png",
SelectedImagePath = "Floor/FloorSelected.png",
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
index 1efed52..2c9ebe9 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
@@ -44,8 +44,8 @@
public Button btnBack = new Button
{
- Height = Application.GetRealHeight(51),
- Width = Application.GetRealWidth(30),
+ Height = Application.GetMinReal(51),
+ Width = Application.GetMinReal(30),
UnSelectedImagePath = "DoorLock/Left.png",
};
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
index be9b319..586f04d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
@@ -254,8 +254,8 @@
var btnBindAdd = new Button
{
X = Application.GetRealWidth(62),
- Height = Application.GetRealHeight(72),
- Width = Application.GetRealWidth(72),
+ Height = Application.GetMinReal(72),
+ Width = Application.GetMinReal(72),
UnSelectedImagePath = "BindPic/BindAdd.png",
};
btnAddFrameLayout.AddChidren(btnBindAdd);
@@ -698,8 +698,8 @@
var sidelipFrameLayout = new FrameLayout()
{
- Height = Application.GetRealHeight(628),
- Width = Application.GetRealWidth(415),
+ Height = Application.GetMinReal(628),
+ Width = Application.GetMinReal(415),
Y = Application.GetRealHeight(115 + 45),
X = Application.GetRealWidth(605),
BackgroundImagePath = "DoorLock/SideslipPic.png",
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
index bf7b169..75d054b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
@@ -634,8 +634,8 @@
var btnChoose = new Button()
{
- Width = Application.GetRealWidth(60),
- Height = Application.GetRealHeight(60),
+ Width = Application.GetMinReal(60),
+ Height = Application.GetMinReal(60),
X = Application.GetRealWidth(861 + 81),
Y = Application.GetRealHeight(35),
SelectedImagePath = "DoorLock/SelectedIcon.png",
@@ -793,8 +793,8 @@
var btnChoose = new Button()
{
- Width = Application.GetRealWidth(60),
- Height = Application.GetRealHeight(60),
+ Width = Application.GetMinReal(60),
+ Height = Application.GetMinReal(60),
X = Application.GetRealWidth(861 + 81),
Y = Application.GetRealHeight(35),
SelectedImagePath = "DoorLock/SelectedIcon.png",
@@ -967,8 +967,8 @@
var btnChoose = new Button()
{
- Width = Application.GetRealWidth(60),
- Height = Application.GetRealHeight(60),
+ Width = Application.GetMinReal(60),
+ Height = Application.GetMinReal(60),
X = Application.GetRealWidth(861 + 81),
Y = Application.GetRealHeight(35),
SelectedImagePath = "DoorLock/SelectedIcon.png",
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
index aeb1f8a..082f117 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
@@ -335,9 +335,33 @@
this.listView.AddChidrenFrame2(frameTable);
//鍥炬爣
var btnIcon = frameTable.AddLeftIcon();
+ //淇℃伅
+ var btnMsg = frameTable.AddTopView("", 600);
+ //浜虹墿
+ string perName = dicName.ContainsKey(historyInfo.CloudAccountId) == true ? dicName[historyInfo.CloudAccountId] : Language.StringByID(R.MyInternationalizationString.uOther);
+ frameTable.AddBottomView(perName, 600);
+ //鏃堕棿
+ if (this.dateFromControl.dateValue == this.dateToControl.dateValue)
+ {
+ //濡傛灉鏃ユ湡鑼冨洿涓�鏍�,鍒欎笉鏄剧ず骞存湀鏃�
+ frameTable.AddMostRightView(UserCenterLogic.ConvertUtcTimeToLocalTime(historyInfo.UnlockTime).ToString("HH:mm:ss"), 400);
+ }
+ else
+ {
+ //濡傛灉鏃ユ湡鑼冨洿涓嶄竴鏍�,鍒欐樉绀哄勾鏈堟棩
+ frameTable.AddMostRightView(UserCenterLogic.ConvertUtcTimeToLocalTime(historyInfo.UnlockTime).ToString("yyyy/MM/dd HH:mm:ss"), 700);
+ }
+ //搴曠嚎
+ if (addLine == true)
+ {
+
+ frameTable.AddBottomLine();
+ }
+
+ //鍏朵粬娑堟伅
if (historyInfo.OpenLockMode == -1)
{
- //鍏朵粬娑堟伅
+ //鍥剧墖
var device = Common.LocalDevice.Current.GetDevice(historyInfo.DeviceMac, historyInfo.DeviceEpoint);
if (device == null)
{
@@ -347,29 +371,42 @@
{
Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, device);
}
- }
- else if (historyInfo.OpenLockMode == 9000)
- {
- btnIcon.UnSelectedImagePath = "Item/NormallyOpen.png";
- }
- else if (historyInfo.UnlockIsSuccess == true)
- {
- btnIcon.UnSelectedImagePath = "Item/UnLockSuccess.png";
- }
- else
- {
- btnIcon.UnSelectedImagePath = "Item/UnLockFail.png";
- }
-
- //淇℃伅
- var btnMsg = frameTable.AddTopView("", 600);
- if (historyInfo.OpenLockMode == -1 || historyInfo.OpenLockMode == 9000)
- {
- //鍏朵粬娑堟伅
+ //娑堟伅
btnMsg.Text = historyInfo.AlarmMsg;
}
+ //闂ㄩ攣甯稿紑妯″紡
+ else if (historyInfo.OpenLockMode == 9000)
+ {
+ //鍥剧墖
+ btnIcon.UnSelectedImagePath = "Item/NormallyOpen.png";
+ //娑堟伅
+ if (historyInfo.OtherOpenLockMode == 9001)
+ {
+ //甯稿紑妯″紡鎵嬪姩寮�鍚�
+ btnMsg.TextID = R.MyInternationalizationString.uNormallyOpenModeManualOpen;
+ }
+ else if (historyInfo.OtherOpenLockMode == 9002)
+ {
+ //甯稿紑妯″紡鎵嬪姩鍙栨秷
+ btnMsg.TextID = R.MyInternationalizationString.uNormallyOpenModeManualClose;
+ }
+ else if (historyInfo.OtherOpenLockMode == 9003)
+ {
+ //甯稿紑妯″紡鍚敤{0}灏忔椂
+ btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uNormallyOpenModeOpenSomeTime).Replace("{0}", historyInfo.NormallyOpenContinuedTime);
+ }
+ else
+ {
+ //涓婇潰鏄疉pp鎵嬪姩鎺ㄩ��,杩欓噷鏄綉鍏虫垨鑰呴棬閿佽嚜宸辨帹閫�
+ btnMsg.Text = historyInfo.AlarmMsg;
+ }
+ }
+ //寮�閿佹垚鍔�
else if (historyInfo.UnlockIsSuccess == true)
{
+ //鍥剧墖
+ btnIcon.UnSelectedImagePath = "Item/UnLockSuccess.png";
+ //娑堟伅
if (historyInfo.OpenLockMode == 0)
{
//瀵嗙爜寮�閿佹垚鍔�
@@ -386,8 +423,12 @@
btnMsg.TextID = R.MyInternationalizationString.uUnlockByFingerPrintSuccess;
}
}
+ //寮�閿佸け璐�
else
{
+ //鍥剧墖
+ btnIcon.UnSelectedImagePath = "Item/UnLockFail.png";
+ //娑堟伅
if (historyInfo.OpenLockMode == 0)
{
//瀵嗙爜寮�閿佸け璐�
@@ -403,28 +444,6 @@
//鎸囩汗寮�閿佸け璐�
btnMsg.TextID = R.MyInternationalizationString.uUnlockByFingerPrintFail;
}
- }
-
- //浜虹墿
- string perName = dicName.ContainsKey(historyInfo.CloudAccountId) == true ? dicName[historyInfo.CloudAccountId] : Language.StringByID(R.MyInternationalizationString.uOther);
- frameTable.AddBottomView(perName, 600);
-
- //鏃堕棿
- if (this.dateFromControl.dateValue == this.dateToControl.dateValue)
- {
- //濡傛灉鏃ユ湡鑼冨洿涓�鏍�,鍒欎笉鏄剧ず骞存湀鏃�
- frameTable.AddMostRightView(UserCenterLogic.ConvertUtcTimeToLocalTime(historyInfo.UnlockTime).ToString("HH:mm:ss"), 400);
- }
- else
- {
- //濡傛灉鏃ユ湡鑼冨洿涓嶄竴鏍�,鍒欐樉绀哄勾鏈堟棩
- frameTable.AddMostRightView(UserCenterLogic.ConvertUtcTimeToLocalTime(historyInfo.UnlockTime).ToString("yyyy/MM/dd HH:mm:ss"), 700);
- }
-
- if (addLine == true)
- {
- //搴曠嚎
- frameTable.AddBottomLine();
}
}
@@ -454,6 +473,110 @@
//鍒濆鍖栬褰曞垪琛�
this.InitLogListInfo(false);
};
+ }
+
+ #endregion
+
+ #region 鈻� 绛涢�夎褰昣__________________________
+
+ /// <summary>
+ /// 绛涢�夊巻鍙茶褰�
+ /// </summary>
+ /// <returns></returns>
+ private List<HistoryInfo> ScreeningHistoryData(Dictionary<string, string> dicMemberName)
+ {
+ //鍘嗗彶璁板綍澶夯鐑︿簡,瀛樺湪涓嶅悓鐨勬暟鎹簱琛ㄩ噷,骞朵笖鏁版嵁杩樹笉涓�鏍�,鍙兘杩欐牱涓�涓釜鍒ゆ柇浜�
+ var listScreeningData = new List<HistoryInfo>();
+ //娓呴櫎鎺変箣鍓嶇殑璁板綍
+ this.listOtherUserId = new List<string>();
+ this.listOtherMsgId = new List<string>();
+
+ //鏄惁閫夋嫨鍏ㄩ�夌敤鎴�
+ bool selectAllUser = this.listSearchUserId.Contains("-1");
+ //鏄惁鍗曢�変簡鍏朵粬
+ bool selectOtherUser = this.listSearchUserId.Contains("-9999");
+ //鏄惁閫夋嫨鍏ㄩ�夊紑閿佹柟寮�
+ bool selectAllLockMode = this.listSearchLockId.Contains(-1);
+
+ //涓�涓釜鍘婚亶鍘�
+ foreach (var data in this.listHistoryInfo)
+ {
+ //妫�娴嬭鍘嗗彶璁板綍鑳藉惁鏄剧ず
+ bool result = this.CheckHistoryDataCanShow(data, dicMemberName, selectAllUser, selectOtherUser, selectAllLockMode);
+ if (result == true)
+ {
+ listScreeningData.Add(data);
+ }
+ }
+
+ return listScreeningData;
+ }
+
+ /// <summary>
+ /// 妫�娴嬭鍘嗗彶璁板綍鑳藉惁鏄剧ず
+ /// </summary>
+ /// <param name="info">妫�娴嬪璞�</param>
+ /// <param name="dicMemberName">鎴愬憳淇℃伅</param>
+ /// <param name="selectAllUser">鏄惁閫夋嫨鍏ㄩ�夌敤鎴�</param>
+ /// <param name="selectOtherUser">鏄惁鍗曢�変簡鍏朵粬</param>
+ /// <param name="slectAllLockMode">鏄惁閫夋嫨鍏ㄩ�夊紑閿佹柟寮�</param>
+ private bool CheckHistoryDataCanShow(HistoryInfo info, Dictionary<string, string> dicMemberName,
+ bool selectAllUser, bool selectOtherUser, bool slectAllLockMode)
+ {
+ //濡傛灉娌℃湁閫夋嫨 鍏ㄩ�夌敤鎴�
+ if (selectAllUser == false)
+ {
+ //濡傛灉杩欎釜鐢ㄦ埛ID涓嶅寘鍚湪鎸囧畾閫夋嫨鐨勬垚鍛樺垪琛ㄩ噷闈�
+ if (this.listSearchUserId.Contains(info.CloudAccountId) == false)
+ {
+ if (dicMemberName.ContainsKey(info.CloudAccountId) == true)
+ {
+ //濡傛灉鑳藉璇嗗埆杩欎釜id鐨勮瘽,鍒欒〃绀哄畠涓嶅睘浜庡叾浠栫被,骞朵笖涔熶笉鍐嶉�夋嫨鐩爣鍐�
+ return false;
+ }
+ //濡傛灉娌℃湁閫夋嫨 鍏朵粬鐨勮瘽,涓嶆樉绀�
+ if (selectOtherUser == false)
+ {
+ return false;
+ }
+ }
+ }
+ //濡傛灉鏄垚鍛樿韩浠�,骞朵笖鐢ㄦ埛ID涓嶄负绌�
+ if (UserCenterResourse.UserInfo.AuthorityNo == 3 && info.CloudAccountId != string.Empty)
+ {
+ //鎴愬憳涓嶈兘鐪嬪埌 鍏朵粬浜虹殑璁板綍(鎴愬憳鐨勬椂鍊�,杩欎釜鍙橀噺閲岄潰鍙湁浠栬嚜宸变竴涓�)
+ if (dicMemberName.ContainsKey(info.CloudAccountId) == false)
+ {
+ return false;
+ }
+ }
+ //濡傛灉娌℃湁閫夋嫨 鍏ㄩ�夊紑閿佹柟寮�
+ if (slectAllLockMode == false)
+ {
+ //濡傛灉杩欎釜寮�閿佹柟寮忎笉鍦ㄩ�夋嫨鐨勫垪琛ㄩ噷闈㈢殑璇�
+ if (this.listSearchLockId.Contains(info.OpenLockMode) == false)
+ {
+ return false;
+ }
+ }
+
+ //鍙︿竴寮犺〃鐨勬暟鎹富閿�
+ if (info.OpenLockMode == -1 || info.OpenLockMode == 9000)
+ {
+ if (info.MsgKeyId != string.Empty)
+ {
+ //鍏朵粬娑堟伅鐨勪富閿�,瀹冨瓨鍦ㄥ彟澶栫殑涓�寮犳暟鎹簱琛ㄤ腑
+ this.listOtherMsgId.Add(info.MsgKeyId);
+ }
+ }
+ if (info.CloudAccountId != string.Empty && dicMemberName.ContainsKey(info.CloudAccountId) == false
+ && this.listOtherUserId.Contains(info.CloudAccountId) == false)
+ {
+ //鏃犳硶璇嗗埆鐨勫紑閿佽褰曠殑鐢ㄦ埛ID(鍥犱负閭d釜瀵嗙爜鏈夊彲鑳芥病鏈夊垎閰嶇粰鎴愬憳)
+ this.listOtherUserId.Add(info.CloudAccountId);
+ }
+
+ return true;
}
#endregion
@@ -591,110 +714,6 @@
}
return listLog;
- }
-
- #endregion
-
- #region 鈻� 绛涢�夎褰昣__________________________
-
- /// <summary>
- /// 绛涢�夊巻鍙茶褰�
- /// </summary>
- /// <returns></returns>
- private List<HistoryInfo> ScreeningHistoryData(Dictionary<string, string> dicMemberName)
- {
- //鍘嗗彶璁板綍澶夯鐑︿簡,瀛樺湪涓嶅悓鐨勬暟鎹簱琛ㄩ噷,骞朵笖鏁版嵁杩樹笉涓�鏍�,鍙兘杩欐牱涓�涓釜鍒ゆ柇浜�
- var listScreeningData = new List<HistoryInfo>();
- //娓呴櫎鎺変箣鍓嶇殑璁板綍
- this.listOtherUserId = new List<string>();
- this.listOtherMsgId = new List<string>();
-
- //鏄惁閫夋嫨鍏ㄩ�夌敤鎴�
- bool selectAllUser = this.listSearchUserId.Contains("-1");
- //鏄惁鍗曢�変簡鍏朵粬
- bool selectOtherUser = this.listSearchUserId.Contains("-9999");
- //鏄惁閫夋嫨鍏ㄩ�夊紑閿佹柟寮�
- bool selectAllLockMode = this.listSearchLockId.Contains(-1);
-
- //涓�涓釜鍘婚亶鍘�
- foreach (var data in this.listHistoryInfo)
- {
- //妫�娴嬭鍘嗗彶璁板綍鑳藉惁鏄剧ず
- bool result = this.CheckHistoryDataCanShow(data, dicMemberName, selectAllUser, selectOtherUser, selectAllLockMode);
- if (result == true)
- {
- listScreeningData.Add(data);
- }
- }
-
- return listScreeningData;
- }
-
- /// <summary>
- /// 妫�娴嬭鍘嗗彶璁板綍鑳藉惁鏄剧ず
- /// </summary>
- /// <param name="info">妫�娴嬪璞�</param>
- /// <param name="dicMemberName">鎴愬憳淇℃伅</param>
- /// <param name="selectAllUser">鏄惁閫夋嫨鍏ㄩ�夌敤鎴�</param>
- /// <param name="selectOtherUser">鏄惁鍗曢�変簡鍏朵粬</param>
- /// <param name="slectAllLockMode">鏄惁閫夋嫨鍏ㄩ�夊紑閿佹柟寮�</param>
- private bool CheckHistoryDataCanShow(HistoryInfo info, Dictionary<string, string> dicMemberName,
- bool selectAllUser, bool selectOtherUser, bool slectAllLockMode)
- {
- //濡傛灉娌℃湁閫夋嫨 鍏ㄩ�夌敤鎴�
- if (selectAllUser == false)
- {
- //濡傛灉杩欎釜鐢ㄦ埛ID涓嶅寘鍚湪鎸囧畾閫夋嫨鐨勬垚鍛樺垪琛ㄩ噷闈�
- if (this.listSearchUserId.Contains(info.CloudAccountId) == false)
- {
- if (dicMemberName.ContainsKey(info.CloudAccountId) == true)
- {
- //濡傛灉鑳藉璇嗗埆杩欎釜id鐨勮瘽,鍒欒〃绀哄畠涓嶅睘浜庡叾浠栫被,骞朵笖涔熶笉鍐嶉�夋嫨鐩爣鍐�
- return false;
- }
- //濡傛灉娌℃湁閫夋嫨 鍏朵粬鐨勮瘽,涓嶆樉绀�
- if (selectOtherUser == false)
- {
- return false;
- }
- }
- }
- //濡傛灉鏄垚鍛樿韩浠�,骞朵笖鐢ㄦ埛ID涓嶄负绌�
- if (UserCenterResourse.UserInfo.AuthorityNo == 3 && info.CloudAccountId != string.Empty)
- {
- //鎴愬憳涓嶈兘鐪嬪埌 鍏朵粬浜虹殑璁板綍(鎴愬憳鐨勬椂鍊�,杩欎釜鍙橀噺閲岄潰鍙湁浠栬嚜宸变竴涓�)
- if (dicMemberName.ContainsKey(info.CloudAccountId) == false)
- {
- return false;
- }
- }
- //濡傛灉娌℃湁閫夋嫨 鍏ㄩ�夊紑閿佹柟寮�
- if (slectAllLockMode == false)
- {
- //濡傛灉杩欎釜寮�閿佹柟寮忎笉鍦ㄩ�夋嫨鐨勫垪琛ㄩ噷闈㈢殑璇�
- if (this.listSearchLockId.Contains(info.OpenLockMode) == false)
- {
- return false;
- }
- }
-
- //鍙︿竴寮犺〃鐨勬暟鎹富閿�
- if (info.OpenLockMode == -1 || info.OpenLockMode == 9000)
- {
- if (info.MsgKeyId != string.Empty)
- {
- //鍏朵粬娑堟伅鐨勪富閿�,瀹冨瓨鍦ㄥ彟澶栫殑涓�寮犳暟鎹簱琛ㄤ腑
- this.listOtherMsgId.Add(info.MsgKeyId);
- }
- }
- if (info.CloudAccountId != string.Empty && dicMemberName.ContainsKey(info.CloudAccountId) == false
- && this.listOtherUserId.Contains(info.CloudAccountId) == false)
- {
- //鏃犳硶璇嗗埆鐨勫紑閿佽褰曠殑鐢ㄦ埛ID(鍥犱负閭d釜瀵嗙爜鏈夊彲鑳芥病鏈夊垎閰嶇粰鎴愬憳)
- this.listOtherUserId.Add(info.CloudAccountId);
- }
-
- return true;
}
#endregion
@@ -942,6 +961,14 @@
/// </summary>
public string CloudAccountId = string.Empty;
/// <summary>
+ /// 鍏朵粬寮�閿佹柟寮�(OpenLockMode=9000鏃舵湁鏁�) 9001:甯稿紑鎵撳紑 9002:甯稿紑鍙栨秷 9003:甯稿紑鎸佺画
+ /// </summary>
+ public int OtherOpenLockMode = -1;
+ /// <summary>
+ /// 甯稿紑鎸佺画鏃堕棿(1~72灏忔椂 OtherOpenLockMode=9003鐨勬椂鍊欐湁鏁�)
+ /// </summary>
+ public string NormallyOpenContinuedTime = string.Empty;
+ /// <summary>
/// 褰撳紑閿佹柟寮忎负-1鏃朵娇鐢�,瀹冨睘浜庡叾浠栫被
/// </summary>
public string AlarmMsg = string.Empty;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
index a2c97bb..35dea98 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
@@ -127,7 +127,6 @@
btnLevel.Y = Application.GetRealHeight(54);
btnLevel.TextAlignment = TextAlignment.CenterRight;
btnLevel.TextColor = UserCenterColor.Current.TextGrayColor1;
- btnLevel.Text = "3" + strRank;
frameBack.AddChidren(btnLevel);
//褰撳墠浜害
@@ -143,7 +142,6 @@
btnProgress1.Y = Application.GetRealHeight(157);
btnProgress1.TextSize = 12;
btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1;
- btnProgress1.Text = "4";
frameBack.AddChidren(btnProgress1);
//杩涘害鏉�
@@ -155,8 +153,71 @@
seekBar1.ProgressChangedEvent += (div, value) =>
{
btnProgress1.Text = value.ToString();
+ switch (value)
+ {
+ case 1:
+ linghtLevelInfo.panelDirectionsLevel = 20;
+ btnLevel.Text = "1" + strRank;
+ break;
+ case 2:
+ linghtLevelInfo.panelDirectionsLevel = 40;
+ btnLevel.Text = "2" + strRank;
+ break;
+ case 3:
+ linghtLevelInfo.panelDirectionsLevel = 60;
+ btnLevel.Text = "3" + strRank;
+ break;
+ case 4:
+ linghtLevelInfo.panelDirectionsLevel = 80;
+ btnLevel.Text = "4" + strRank;
+ break;
+ case 5:
+ linghtLevelInfo.panelDirectionsLevel = 100;
+ btnLevel.Text = "5" + strRank;
+ break;
+ default:
+ linghtLevelInfo.panelDirectionsLevel = 0;
+ btnLevel.Text = "0" + strRank;
+ break;
+ }
};
- //seekBar1.Progress = linghtLevelInfo.panelBacklightLevel;
+
+ if (linghtLevelInfo.panelDirectionsLevel <= 20 && linghtLevelInfo.panelDirectionsLevel > 0)
+ {
+ btnLevel.Text = "1" + strRank;
+ btnProgress1.Text = "1";
+ seekBar1.Progress = 1;
+ }
+ else if (linghtLevelInfo.panelDirectionsLevel <= 40 && linghtLevelInfo.panelDirectionsLevel > 20)
+ {
+ btnLevel.Text = "2" + strRank;
+ btnProgress1.Text = "2";
+ seekBar1.Progress = 2;
+ }
+ else if (linghtLevelInfo.panelDirectionsLevel <= 60 && linghtLevelInfo.panelDirectionsLevel > 40)
+ {
+ btnLevel.Text = "3" + strRank;
+ btnProgress1.Text = "3";
+ seekBar1.Progress = 3;
+ }
+ else if (linghtLevelInfo.panelDirectionsLevel <= 80 && linghtLevelInfo.panelDirectionsLevel > 60)
+ {
+ btnLevel.Text = "4" + strRank;
+ btnProgress1.Text = "4";
+ seekBar1.Progress = 4;
+ }
+ else if (linghtLevelInfo.panelDirectionsLevel <= 100 && linghtLevelInfo.panelDirectionsLevel > 80)
+ {
+ btnLevel.Text = "5" + strRank;
+ btnProgress1.Text = "5";
+ seekBar1.Progress = 5;
+ }
+ else
+ {
+ btnLevel.Text = "0" + strRank;
+ btnProgress1.Text = "0";
+ seekBar1.Progress = 0;
+ }
var btnTemp1 = new NormalViewControl(200, 50, true);
btnTemp1.X = ControlCommonResourse.XXLeft;
@@ -225,7 +286,6 @@
seekBar1.ProgressChangedEvent += (div, value) =>
{
btnProgress1.Text = value + "%";
- //鏁版嵁鍙樻洿
};
//seekBar1.Progress = linghtLevelInfo.panelBacklightLevel;
@@ -505,7 +565,7 @@
this.ShowProgressBar();
//鑺傝兘妯″紡淇敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
- //璁惧鍚屼簨璇撮粯璁ゅ幓绉掓椂闂达紝杩欐牱鎺ヨ繎鎰熷簲鍔熻兘鎵嶅悎鐞�
+ //璁惧鍚屼簨璇撮粯璁ゅ幓1绉掓椂闂达紝杩欐牱鎺ヨ繎鎰熷簲鍔熻兘鎵嶅悎鐞�
energyModeInfo.time = 1;
var result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
if (result == false)
@@ -537,18 +597,6 @@
// return;
//}
//鍏抽棴鑷韩
- this.CloseForm();
- }
-
- #endregion
-
- #region 鈻� 淇濆瓨閰嶇疆___________________________
-
- /// <summary>
- /// 淇濆瓨閰嶇疆
- /// </summary>
- private void SaveSettionData()
- {
this.CloseForm();
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
index 1ed5f98..3632beb 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
@@ -96,9 +96,9 @@
rowNewWind.AddBottomLine();
//鍙崇澶�
rowNewWind.AddRightArrow();
- var msg = Language.StringByID(R.MyInternationalizationString.ReshAirRead);
+ var msg = Language.StringByID(R.MyInternationalizationString.nothing);
// 鍥炶皟鏂伴涓暟
- var btnNewWindStatu = rowNewWind.AddMostRightView(msg + 2, 700);
+ var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700);
rowNewWind.ButtonClickEvent += (sender, e) =>
{
var form = new PanelFangyueFreshAirTargetForm();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs
index 91d1c6f..64b9ea0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs
@@ -83,7 +83,7 @@
{
if (listDataRoom.Count > 0)
{
- //鍒濆鍖栨埧闂村拰璁惧鍒楄〃
+ //鍒濆鍖栨埧闂村拰璁惧鍒楄〃
this.InitRoomAndDeviceRow(listDataRoom);
}
else
@@ -201,46 +201,63 @@
DeviceSimpleSelectControl oldSelectContr = null;
var listDevice = this.dicShowDevice[roomId];
+ //鑾峰彇璁惧绫诲瀷鐨�
+ var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice);
//妫�鏌ョ鍚堢殑璁惧
List<CommonDevice> listSupportDevice = new List<CommonDevice> { };
foreach (var dev in listDevice)
{
+ //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
+ if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+ {
+ continue;
+ }
if (dev.Type == DeviceType.FreshAir)
{
listSupportDevice.Add(dev);
}
}
+ DeviceSimpleSelectControl oldDeviceSimpleSelectControl = null;
+ int curIndex = 0;
for (int i = 0; i < listSupportDevice.Count; i++)
{
string mainKey = Common.LocalDevice.Current.GetDeviceMainKeys(listSupportDevice[i]);
- var contr = new DeviceSimpleSelectControl(listDevice[i], false, this.listView.rowSpace / 2);
+ var contr = new DeviceSimpleSelectControl(listSupportDevice[i], false, this.listView.rowSpace / 2);
listView.AddChidren(contr);
contr.InitControl();
- if (i != listDevice.Count - 1)
+ if (i != listSupportDevice.Count - 1)
{
//搴曠嚎
contr.AddBottomLine();
}
+
contr.ButtonClickEvent += (sender, e) =>
{
- contr.IsSelected = !contr.IsSelected;
- //閫夋嫨浜嗗埆鐨勮澶�
- if (contr.IsSelected == true)
+ if (contr.IsSelected)
{
- if (oldSelectContr != null)
- {
- oldSelectContr.IsSelected = false;
- }
- oldSelectContr = contr;
- this.bindTargetKey = mainKey;
+ return;
}
- //鍙栨秷閫夋嫨
- else
- {
- oldSelectContr = null;
- this.bindTargetKey = string.Empty;
- }
+ contr.IsSelected = true;
+ oldSelectContr = contr;
+ this.bindTargetKey = mainKey;
+ //contr.IsSelected = !contr.IsSelected;
+ ////閫夋嫨浜嗗埆鐨勮澶�
+ //if (contr.IsSelected == true)
+ //{
+ // if (oldSelectContr != null)
+ // {
+ // oldSelectContr.IsSelected = false;
+ // }
+ // oldSelectContr = contr;
+ // this.bindTargetKey = mainKey;
+ //}
+ ////鍙栨秷閫夋嫨
+ //else
+ //{
+ // oldSelectContr = null;
+ // this.bindTargetKey = string.Empty;
+ //}
};
if (this.bindTargetKey == mainKey)
{
@@ -285,10 +302,15 @@
var device = Common.LocalDevice.Current.GetDevice(deviceKeys);
if (device != null)
{
- canShow = true;
- //鏀堕泦鍙互鏄剧ず鐨勮澶�
- this.dicShowDevice[room.Id].Add(device);
+ if (device.Type == DeviceType.FreshAir)
+ {
+ //canShow = true;//聽聽杩欎釜鐣岄潰涓嶆樉绀烘埧闂�
+ //鏀堕泦鍙互鏄剧ず鐨勮澶�
+ this.dicShowDevice[room.Id].Add(device);
+ }
}
+
+
}
return canShow;
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs
index 99aae10..de6bb06 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs
@@ -396,7 +396,7 @@
}
if (tetxValue.Length >= 3)
{
- var msg = Language.StringByID(R.MyInternationalizationString.InvalidTimeMoreThan36);
+ var msg = Language.StringByID(R.MyInternationalizationString.InvalidTimeMoreThan72);
var msgContr = new ShowMsgControl(ShowMsgType.Error, msg);
msgContr.Show();
return false;
@@ -410,9 +410,9 @@
msgContr.Show();
return false;
}
- if (value > 36)
+ if (value > 72)
{
- var msg = Language.StringByID(R.MyInternationalizationString.InvalidTimeMoreThan36);
+ var msg = Language.StringByID(R.MyInternationalizationString.InvalidTimeMoreThan72);
var msgContr = new ShowMsgControl(ShowMsgType.Error, msg);
msgContr.Show();
return false;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
index bf61365..f7bd9c0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -536,14 +536,14 @@
};
flMain.AddChidren(progressBackground);
- var progressValue = (currentVolume * (Convert.ToInt32(((float)100 / 15) * 100))) / 100;
+ //var progressValue = (currentVolume * (Convert.ToInt32(((float)100 / 15) * 100))) / 100;
progressText = new Button()
{
Height = Application.GetRealHeight(58),
Y = Application.GetRealHeight(89),
TextColor = ZigbeeColor.Current.XMGray2,
TextAlignment = TextAlignment.Center,
- Text = progressValue.ToString() + "%",
+ Text = currentVolume.ToString() + "%",
};
diyImageVerticalSeekBar = new DiyImageVerticalSeekBar()
@@ -559,27 +559,14 @@
ProgressTextColor = ZigbeeColor.Current.LogicBtnCancelColor,
ProgressTextSize = 12,//鏄剧ず鐧惧垎姣斿瓧浣撳ぇ灏�
SeekBarViewHeight = Application.GetRealHeight(17),//杩涘害鏉$殑瀹藉害
- Progress = progressValue,
+ Progress = currentVolume,
};
progressBackground.AddChidren(progressText);
progressBackground.AddChidren(diyImageVerticalSeekBar);
diyImageVerticalSeekBar.OnProgressChangedEvent += (sender, e) =>
{
int curVolume = -1;
- if (e == 0)
- {
- curVolume = 0;
- }
- else if (e == 100)
- {
- curVolume = 14;
- }
- else
- {
- int comandValue = e;
- int comandValueTemp = (comandValue * 100) / (Convert.ToInt32(((float)100 / 15) * 100));
- curVolume = comandValueTemp;
- }
+ curVolume = e;
currentVolume = curVolume;
progressText.Text = e.ToString() + "%";
};
@@ -1103,12 +1090,19 @@
var doorLockInValidSetting = Language.StringByID(R.MyInternationalizationString.DoorLockInValidSetting);
var alertNomallyModeIsTurnOn = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.DoorLockLogic, msgNomallyModeIsTurnOn, doorLockInValidSetting);
alertNomallyModeIsTurnOn.Show();
+ alertNomallyModeIsTurnOn.MsgControlClickEvent += async () =>
+ {
+ //榛樿鍒涘缓鐗规畩閫昏緫
+ DoorLockCommonInfo.NormallyOpenModeInvalidTime = 12;
+ Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock);
+ };
//鐐瑰嚮鑷姩鍖�
alertNomallyModeIsTurnOn.LogicClickEvent += () =>
{
//閫昏緫璋冪敤鍓嶈寰楃Щ闄�
ZbGateway.StatusList.Remove(this);
+ //璋冪敤閫昏緫鐣岄潰
Shared.Phone.Device.Logic.SkipView.SkipAddLogic(2, doorLock);
};
alertNomallyModeIsTurnOn.InvalidClickEvent += async () =>
@@ -1145,26 +1139,27 @@
alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.CancelNomallyOpenModeWithLogic, msg, confirm);
}
alert.Show();
+
alert.MsgControlClickEvent += async () =>
{
if (IsFromReport)
{
- //鍙栨秷甯稿紑
+ //涓婃姤鈥滃父寮�妯″紡鈥濆凡琚彇娑堬紝app榛樿浜嗏�滃父寮�妯″紡鈥濊鍙栨秷
NormallyOpenModeValue(false);
UpdateNomallyOpenStatus();
}
else
{
- //淇濇寔甯稿紑
+ //app榛樿鈥滃父寮�妯″紡鈥濊繕鏄紑鍚�
NormallyOpenModeValue(true);
UpdateNomallyOpenStatus();
}
};
alert.CancelClickEvent += async () =>
{
- //淇濇寔甯稿紑
if (IsFromReport)
{
+ //涓婃姤鈥滃父寮�妯″紡鈥濆凡琚彇娑堬紝app閲嶆柊寮�鍚�滃父寮�妯″紡鈥�
Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
if (result == null || result.defaultControlResponseData == null)
@@ -1185,6 +1180,7 @@
}
else
{
+ //淇濇寔鈥滃父寮�鎴愬姛鈥�
NormallyOpenModeValue(true);
UpdateNomallyOpenStatus();
CommonPage.Loading.Hide();
@@ -1192,20 +1188,22 @@
}
else
{
+ //app鎿嶄綔涓嶅彇娑堚�滃父寮�妯″紡鈥�
NormallyOpenModeValue(true);
UpdateNomallyOpenStatus();
}
};
alert.ConfirmClickEvent += async () =>
{
- //纭鍙栨秷甯稿紑
if (IsFromReport)
{
+ //涓婃姤闂ㄩ攣鈥滃父寮�妯″紡鈥濆凡缁忓彇娑堬紝鐜板湪app纭鈥滃父寮�妯″紡鈥濆彇娑�
NormallyOpenModeValue(false);
UpdateNomallyOpenStatus();
}
else
{
+ //app鎿嶄綔鍙栨秷鈥滃父寮�妯″紡鈥�
Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
var result = await doorLock.SetNormallyOpenModeFuncAsync(false);
if (result == null || result.defaultControlResponseData == null)
@@ -1224,7 +1222,7 @@
{
//娣诲姞App寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(this.doorLock, 9002, string.Empty);
-
+ //app纭鍙栨秷鈥滃父寮�妯″紡鈥濇垚鍔�
NormallyOpenModeValue(false);
UpdateNomallyOpenStatus();
string msg2 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess);
@@ -1235,7 +1233,7 @@
};
}
- ///// <summary>
+ /// <summary>
/// 甯稿紑妯″紡澶辨晥鏃堕棿澶勭悊
/// </summary>
private void NomallyOpenModeInvalidTimeDialog()
@@ -1261,6 +1259,7 @@
alertTimeInValidSetting2.Show();
return;
}
+ //甯稿紑妯″紡澶辨晥鏃堕棿璁剧疆鎴愬姛
var temp = int.Parse(obj);
DoorLockCommonInfo.NormallyOpenModeInvalidTime = temp;
Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock);
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
index 33bb1bc..0735d15 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
@@ -2408,7 +2408,7 @@
{
var tempD = new VolumeResponseData();
tempD.command = data[10].ToString() + data[11].ToString();
- tempD.value = Convert.ToInt32(data[13].ToString(), 16);
+ tempD.value = Convert.ToInt32(data[12].ToString() + data[13].ToString(), 16);
result = new VolumeResponseAllData { volumeResponseData = tempD };
DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0456_{ topic}");
}
@@ -2455,10 +2455,7 @@
///<summary >
///闊抽噺
///<para>鍛戒护鍊�: comandValue</para>
- ///<para>comandValue: 0 闈欓煶</para>
- ///<para>comandValue:1 鏈�灏忛煶閲�</para>
- ///<para>comandValue:2~13 闊抽噺 </para>
- ///<para>comandValue:14 鏈�澶ч煶閲�</para>
+ ///<para>comandValue: 0-0x64 闊抽噺</para>
/// </summary>
public async System.Threading.Tasks.Task<DefaultControlResponseAllData> SetVolumeAsync(int comandValue)
{
@@ -2560,10 +2557,7 @@
/// <summary>
/// 闊抽噺鍙戦�佹暟鎹�
- ///<para>comandValue: 0 闈欓煶</para>
- ///<para>comandValue:1 鏈�灏忛煶閲�</para>
- ///<para>comandValue:2~13 闊抽噺 </para>
- ///<para>comandValue:14 鏈�澶ч煶閲�</para>
+ ///<para>comandValue: 0-100 闊抽噺</para>
/// </summary>
public string VolumeData(int comandValue)
{
@@ -2578,16 +2572,16 @@
{
if (comandValue >= 1)
{
- //comandValue = comandValue * 100;
- //float v = (float)100 / 15;
- //int vv = Convert.ToInt32(v * 100);
- //var comandValueTemp = comandValue / vv;
- //if (comandValueTemp == 0)
- //{
- // comandValueTemp = 1;
- //}
cValue = Convert.ToString(comandValue, 16).ToUpper();
- cValue = "F" + cValue;
+ if (cValue.Length == 1)
+ {
+ cValue = "0" + cValue;
+ }
+ else
+ {
+ cValue = cValue;
+ }
+
}
else
{
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
index 9fd3b3f..aa84796 100755
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -511,9 +511,9 @@
/// </summary>
public const int InvalidTimeIsEmpty = 297;
/// <summary>
- /// 澶辨晥鏃堕棿涓嶈兘澶т簬36灏忔椂
+ /// 澶辨晥鏃堕棿涓嶈兘澶т簬72灏忔椂
/// </summary>
- public const int InvalidTimeMoreThan36 = 298;
+ public const int InvalidTimeMoreThan72 = 298;
/// <summary>
/// 澶辨晥鏃堕棿涓嶈兘灏忎簬1灏忔椂
/// </summary>
@@ -526,6 +526,22 @@
/// 闈炵鐞嗗憳涓嶈兘鍦ㄥ父寮�妯″紡涓嬫搷浣�
/// </summary>
public const int OnlyMasterOperate = 301;
+ /// <summary>
+ /// 缁戝畾鏂伴
+ /// </summary>
+ public const int BindFreshAirTarget = 302;
+ /// <summary>
+ /// 娓╁害鏉ユ簮
+ /// </summary>
+ public const int TemperatureSource = 303;
+ /// <summary>
+ /// 婀垮害鏉ユ簮
+ /// </summary>
+ public const int HumiditySource = 304;
+ /// <summary>
+ /// PM2.5鏉ユ簮
+ /// </summary>
+ public const int PM25Source = 305;
public readonly static int cancel = 5097;
@@ -5591,6 +5607,19 @@
/// 甯稿紑妯″紡
/// </summary>
public const int uNormallyOpenMode = 16090;
+ /// <summary>
+ /// 甯稿紑妯″紡鎵嬪姩寮�鍚�
+ /// </summary>
+ public const int uNormallyOpenModeManualOpen = 16091;
+ /// <summary>
+ /// 甯稿紑妯″紡鎵嬪姩鍙栨秷
+ /// </summary>
+ public const int uNormallyOpenModeManualClose = 16092;
+ /// <summary>
+ /// 甯稿紑妯″紡鍚敤{0}灏忔椂
+ /// </summary>
+ public const int uNormallyOpenModeOpenSomeTime = 16093;
+
//鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
/// <summary>
diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems
index d73789e..4643d64 100755
--- a/ZigbeeApp/Shared/Shared.projitems
+++ b/ZigbeeApp/Shared/Shared.projitems
@@ -55,6 +55,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountRegister.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountRegisterSuccess.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountResetPWDSuccess.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\Controls\PhoneEmailSelectControl.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Login\PhoneEmailForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Login\PhoneZone.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\AC\ACControlBase.cs" />
--
Gitblit v1.8.0