From b562a582ac3a288193e6e4f57c5eff8a344305a4 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 13:52:17 +0800
Subject: [PATCH] Update AndroidManifest.xml
---
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs | 427 +++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 313 insertions(+), 114 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
index 5b6d5ca..d638b04 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
@@ -5,6 +5,8 @@
using System.Text;
using HDL_ON.UI.CSS;
using HDL_ON.Entity;
+using HDL_ON.DriverLayer;
+using HDL_ON.DAL.Server;
namespace HDL_ON.UI
{
@@ -72,6 +74,8 @@
/// </summary>
private Dictionary<string, string> dicText = new Dictionary<string, string>();
+
+
#endregion
#region 鈻� 鍒濆鍖朹____________________________
@@ -96,24 +100,67 @@
this.dicText["宸茶繛鎺�"] = Language.StringByID(StringId.Connected);
this.dicText["鏈繛鎺�"] = Language.StringByID(StringId.UnConnected);
- //宸﹀彸缈婚〉鐨勪簨浠�
- base.PageChangeEvent += (index) =>
- {
- if (index == 1)
- {
- //鍒濆鍖栭棬閿佸巻鍙茶褰曚互鍙婃帶浠�
- this.InitDoorHistoryLogAndControl();
- }
- };
+ ////宸﹀彸缈婚〉鐨勪簨浠�
+ //base.PageChangeEvent += (index) =>
+ //{
+ // if (index == 1)
+ // {
+ // //鍒濆鍖栭棬閿佸巻鍙茶褰曚互鍙婃帶浠�
+ // this.InitDoorHistoryLogAndControl();
+ // }
+ //};
//鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛�
this.RefreshNowDeviceStatuMemory(this.device);
//鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹�
this.InitFrameWhiteContent1();
- //鍒濆鍖栫浜屼釜绱㈠紩椤�(鍘嗗彶璁板綍)
- this.InitFrameWhiteContent2();
+ ////鍒濆鍖栫浜屼釜绱㈠紩椤�(鍘嗗彶璁板綍)
+ //this.InitFrameWhiteContent2();
//鍒锋柊鐣岄潰鐘舵��
this.RefreshFormStatu();
+ //璇诲彇璁惧鐘舵��
+ Control.Ins.SendReadCommand(device);
+
+ // 鑾峰彇涓存椂瀵嗙爜
+ GetTempPwd();
+ }
+
+ /// <summary>
+ /// 鑾峰彇涓存椂瀵嗙爜
+ /// </summary>
+ private void GetTempPwd()
+ {
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ var pack = Common.ApiUtlis.Ins.HttpRequest.GetDoorTempPassword(device.deviceId);
+ if (pack != null)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (pack.Code == StateCode.SUCCESS)
+ {
+ var tempPasswrodObj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<DoorTempPassword>>(pack.Data.ToString());
+ if (tempPasswrodObj.Count > 0)
+ {
+ doorLockData.TempPassword = tempPasswrodObj[0].pwd;
+ doorLockData.StartTimeTick = tempPasswrodObj[0].beginTime;
+ doorLockData.EndTimeTick = tempPasswrodObj[0].endTime;
+ doorLockData.PwdId = tempPasswrodObj[0].pwdId;
+ this.InitTempPasswordControl();
+ }
+ }
+ });
+ }
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"鑾峰彇涓存椂瀵嗙爜寮傚父:{ex.Message}");
+ }
+ })
+ { IsBackground = true }.Start();
+
}
/// <summary>
@@ -126,7 +173,7 @@
//瀹冩湁涓渶灏忕殑X杞�
batteryControl.X = Application.GetRealWidth(104) > base.btnRoomName.Right ?
Application.GetRealWidth(104) : base.btnRoomName.Right + Application.GetRealWidth(4);
- FrameWhiteCentet1.AddChidren(batteryControl);
+ //FrameWhiteCentet1.AddChidren(batteryControl);
if (batteryControl.Height > base.btnRoomName.Height)
{
//涓�涓槸25锛屼竴涓槸21锛屽紕涓嶅噯鍒板簳璋佹洿楂�,鍥犱负璁$畻鏂规硶涓嶄竴鏍�
@@ -144,7 +191,7 @@
btnOnlineIcon.X = batteryControl.Right + Application.GetRealWidth(12);
btnOnlineIcon.Y = batteryControl.Y;
btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/Connect.png";
- FrameWhiteCentet1.AddChidren(btnOnlineIcon);
+ //FrameWhiteCentet1.AddChidren(btnOnlineIcon);
//鍦ㄧ嚎鏂囨湰
this.btnOnlineView = new NormalViewControl(Application.GetRealWidth(100), btnOnlineIcon.Height, false);
btnOnlineView.X = btnOnlineIcon.Right + Application.GetRealWidth(4);
@@ -152,7 +199,7 @@
btnOnlineView.TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel;
btnOnlineView.TextColor = CSS_Color.PromptingColor1;
btnOnlineView.TextID = StringId.Connected;
- FrameWhiteCentet1.AddChidren(btnOnlineView);
+ //FrameWhiteCentet1.AddChidren(btnOnlineView);
//鍙充笂瑙掗厤缃粨鏉熺殑浜嬩欢
base.SettionFinishEvent += () =>
{
@@ -167,7 +214,7 @@
this.picLockControl = new PicViewControl(256, 260);
picLockControl.Y = Application.GetRealHeight(129);
picLockControl.Gravity = Gravity.CenterHorizontal;
- picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue1.png";
+ picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue1.png";
FrameWhiteCentet1.AddChidren(picLockControl);
picLockControl.ButtonClickEvent += (sender, e) =>
{
@@ -182,6 +229,7 @@
frameTempPsw.Visible = false;
FrameWhiteCentet1.AddChidren(frameTempPsw);
+
//澹伴煶
this.btnVoice = new IconViewControl(24);
btnVoice.UnSelectedImagePath = "FunctionIcon/DoorLock/Voice.png";
@@ -198,7 +246,7 @@
seekBarVoiceControl.BindPageLayout();
//澹伴煶鐧惧垎姣�
- this.btnVoicePersent = new NormalViewControl(Application.GetRealWidth(50), btnVoice.Height, false);
+ this.btnVoicePersent = new NormalViewControl(Application.GetRealWidth(55), btnVoice.Height, false);
btnVoicePersent.X = seekBarVoiceControl.Right + Application.GetRealWidth(8) - seekBarVoiceControl.SeekBarPadding;
btnVoicePersent.Y = btnVoice.Y;
btnVoicePersent.TextColor = CSS_Color.PromptingColor1;
@@ -209,15 +257,20 @@
seekBarVoiceControl.ProgressChangedEvent += (div, value) =>
{
btnVoicePersent.Text = value + "%";
- if (div == 1)
- {
- }
+ //if (div == 1)
+ //{
+ //}
+ };
+ seekBarVoiceControl.OnStopTrackingTouchEvent = (sender, e) => {
+ var dic = new Dictionary<string, string>();
+ dic.Add("door_volume", e.ToString());
+ Control.Ins.SendWriteCommand(this.device, dic);
};
//鍒濆鍖栧紑閿佽彍鍗�(涓�閿紑閿�,涓存椂瀵嗙爜寮�閿�)
this.InitUnLockMenuControl();
//鍒濆鍖栧簳閮ㄨ彍鍗曞浘鏍�
- this.InitBottomMenuIconControl();
+ //this.InitBottomMenuIconControl();
}
/// <summary>
@@ -226,7 +279,7 @@
private void InitUnLockMenuControl()
{
//濡傛灉鏄垚鍛�,鍒欏彧鏈変竴閿紑閿�
- if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true)
+ if ( DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true)
{
//涓�閿紑閿�
var btnOneKey = new NormalViewControl(100, 25, true);
@@ -514,7 +567,7 @@
this.frameTempPsw.AddChidren(picBack);
//瀵嗙爜鏄剧ず鎺т欢
- var btnPassword = new NormalViewControl(150, 50, true);
+ var btnPassword = new NormalViewControl(258, 50, true);
btnPassword.Gravity = Gravity.CenterHorizontal;
btnPassword.TextSize = CSS_FontSize.SubheadingFontSize;
btnPassword.TextColor = CSS_Color.MainBackgroundColor;
@@ -553,32 +606,34 @@
this.frameTempPsw.AddChidren(btnDelete);
btnDelete.ButtonClickEvent += (sender, e) =>
{
- //娓呴櫎褰撳墠涓存椂瀵嗙爜锛�
- HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.ClearTempPsswordMsg), () =>
+ if (Convert.ToInt64(this.doorLockData.EndTimeTick) < DateTime.Now.Ticks)
{
- //娓呯┖涓存椂瀵嗙爜
- this.doorLockData.TempPassword = string.Empty;
- this.doorLockData.StatrtTime = string.Empty;
- this.doorLockData.EndTime = string.Empty;
- //閲嶆柊鍒濆鍖栦复鏃跺瘑鐮佹帶浠�
- this.InitTempPasswordControl();
- });
+ DelTempPwd();
+ }
+ else
+ {
+ //娓呴櫎褰撳墠涓存椂瀵嗙爜锛�
+ HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.ClearTempPsswordMsg), () =>
+ {
+ DelTempPwd();
+ });
+ }
};
- //澶嶅埗涓存椂瀵嗙爜鍥炬爣
- var btnCopy = new IconViewControl(28);
- btnCopy.UnSelectedImagePath = "FunctionIcon/DoorLock/Shard.png";
- btnCopy.X = this.frameTempPsw.Width - btnCopy.IconSize - btnDelete.X;
- btnCopy.Y = btnDelete.Y;
- this.frameTempPsw.AddChidren(btnCopy);
- btnCopy.ButtonClickEvent += (sender, e) =>
- {
- //涓存椂瀵嗙爜宸茬粡澶嶅埗
- HdlCommonLogic.Current.SetTextToShearPlate(this.doorLockData.TempPassword, Language.StringByID(StringId.TempPsswordHasBeenCopy));
- };
+ ////澶嶅埗涓存椂瀵嗙爜鍥炬爣
+ //var btnCopy = new IconViewControl(28);
+ //btnCopy.UnSelectedImagePath = "FunctionIcon/DoorLock/Shard.png";
+ //btnCopy.X = this.frameTempPsw.Width - btnCopy.IconSize - btnDelete.X;
+ //btnCopy.Y = btnDelete.Y;
+ //this.frameTempPsw.AddChidren(btnCopy);
+ //btnCopy.ButtonClickEvent += (sender, e) =>
+ //{
+ // //涓存椂瀵嗙爜宸茬粡澶嶅埗
+ // HdlCommonLogic.Current.SetTextToShearPlate(this.doorLockData.TempPassword, Language.StringByID(StringId.TempPsswordHasBeenCopy));
+ //};
//鐢熸晥鏃堕棿
- var frameEffective = this.CreatEffectiveTimeControl(this.frameTempPsw, Language.StringByID(StringId.EffectiveTime), this.doorLockData.StatrtTime);
+ var frameEffective = this.CreatEffectiveTimeControl(this.frameTempPsw, Language.StringByID(StringId.EffectiveTime), this.doorLockData.StartTime);
frameEffective.X = Application.GetRealWidth(24);
frameEffective.Y = Application.GetRealHeight(180);
@@ -597,6 +652,61 @@
btnLine.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
this.frameTempPsw.AddChidren(btnLine);
}
+ }
+ /// <summary>
+ /// 鍒犻櫎涓存椂瀵嗙爜
+ /// </summary>
+ private void DelTempPwd()
+ {
+ var waitPage = new Loading();
+ this.AddChidren(waitPage);
+ waitPage.Start("");
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ var pack = Common.ApiUtlis.Ins.HttpRequest.DelDoorTempPassword(device.deviceId, doorLockData.PwdId);
+ if (pack != null)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if (pack.Code == StateCode.SUCCESS)
+ {
+ //娓呯┖涓存椂瀵嗙爜
+ this.doorLockData.TempPassword = string.Empty;
+ this.doorLockData.StartTimeTick = string.Empty;
+ this.doorLockData.EndTimeTick = string.Empty;
+ this.doorLockData.PwdId = string.Empty;
+ //閲嶆柊鍒濆鍖栦复鏃跺瘑鐮佹帶浠�
+ this.InitTempPasswordControl();
+ }
+ else
+ {
+ IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+ }
+ });
+ }
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"鍒犻櫎闂ㄩ攣涓存椂瀵嗙爜寮傚父: {ex.Message}");
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ try
+ {
+ waitPage.Hide();
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ catch { }
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+
}
/// <summary>
@@ -654,12 +764,13 @@
//鐢熸晥鏃堕棿
var effectiveTime = Language.StringByID(StringId.EffectiveTime);
- contr.AddRowMenu(effectiveTime, startTime.ToString("yyyy.MM.dd HH:mm"), (btnView, btnValue) =>
+ contr.AddRowMenu(effectiveTime + ": " + startTime.ToString("yyyy.MM.dd HH:mm"),"", (btnView, btnValue) =>
{
//鍏虫帀鐣岄潰,鐒跺悗閲嶆柊璋冭捣鏉�
contr.Close();
var form = new DoorLockSelectTimePage();
+ form.TimeCheck = true;
form.AddForm(startTime);
form.SelectFinshEvent += (selectTime) =>
{
@@ -670,12 +781,13 @@
//澶辨晥鏃堕棿
var failTime = Language.StringByID(StringId.FailureTime);
- contr.AddRowMenu(failTime, endTime.ToString("yyyy.MM.dd HH:mm"), (btnView, btnValue) =>
+ contr.AddRowMenu(failTime+": "+ endTime.ToString("yyyy.MM.dd HH:mm"),"", (btnView, btnValue) =>
{
//鍏虫帀鐣岄潰,鐒跺悗閲嶆柊璋冭捣鏉�
contr.Close();
var form = new DoorLockSelectTimePage();
+ form.TimeCheck = true;
form.AddForm(endTime);
form.SelectFinshEvent += (selectTime) =>
{
@@ -695,12 +807,26 @@
//鍏虫帀鐣岄潰
contr.Close();
- //鐢熸垚涓存椂瀵嗙爜
- this.doorLockData.TempPassword = "987654";
- this.doorLockData.StatrtTime = startTime.ToString("yyyy.MM.dd HH:mm");
- this.doorLockData.EndTime = endTime.ToString("yyyy.MM.dd HH:mm");
- //閲嶆柊鍒濆鍖栦复鏃跺瘑鐮佹帶浠�
- this.InitTempPasswordControl();
+ new System.Threading.Thread(() =>
+ {
+ var pack = Common.ApiUtlis.Ins.HttpRequest.CreateDoorTempPassword(device.deviceId,
+ Utlis.DateTimeToUnix(startTime).ToString(), Utlis.DateTimeToUnix(endTime).ToString());
+ if (pack != null)
+ {
+ if (pack.Code == StateCode.SUCCESS)
+ {
+ // 鑾峰彇涓存椂瀵嗙爜
+ GetTempPwd();
+ }
+ else
+ {
+ Application.RunOnMainThread(() => {
+ IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+ });
+ }
+ }
+ })
+ { IsBackground = true }.Start();
}
};
@@ -722,6 +848,12 @@
{
//鐢熸晥鏃堕棿蹇呴』澶т簬澶辨晥鏃堕棿
HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.EffectiveTimeMustBeOverFailureTime));
+ return false;
+ }
+ if ((endTime - startTime).TotalHours>=24)
+ {
+ //涓存椂瀵嗙爜鏈夋晥鏈熶笉鑳藉ぇ浜�24灏忔椂
+ HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.TempPwdValidityTip));
return false;
}
return true;
@@ -755,34 +887,43 @@
/// </summary>
private void RefreshFormStatu()
{
- //濡傛灉涓嶅湪绾�
- if (this.doorLockData.IsOnline == false)
+ try
{
- //寮�閿佸浘鐗�
- this.picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue2.png";
- //杩炴帴鐘舵��
- this.btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/UnConnect.png";
- this.btnOnlineView.Text = this.dicText["鏈繛鎺�"];
- this.btnOnlineView.TextColor = CSS_Color.AuxiliaryColor2;
- //甯稿紑妯″紡鍥炬爣
- if (this.btnNormallyOpenIcon != null)
+ //濡傛灉涓嶅湪绾�
+ if (this.doorLockData.IsOnline == false)
{
- this.btnNormallyOpenIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/NormallyOpenIcon2.png";
+ //寮�閿佸浘鐗�
+ this.picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue2.png";
+ //杩炴帴鐘舵��
+ this.btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/UnConnect.png";
+ this.btnOnlineView.Text = this.dicText["鏈繛鎺�"];
+ this.btnOnlineView.TextColor = CSS_Color.AuxiliaryColor2;
+ //甯稿紑妯″紡鍥炬爣
+ if (this.btnNormallyOpenIcon != null)
+ {
+ this.btnNormallyOpenIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/NormallyOpenIcon2.png";
+ }
}
+ else
+ {
+ //寮�閿佸浘鐗�
+ this.picLockControl.UnSelectedImagePath = this.doorLockData.Open == true ? "FunctionIcon/DoorLock/UnLockPictrue3.png" : "FunctionIcon/DoorLock/LockPictrue1.png";
+ //杩炴帴鐘舵��
+ this.btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/Connect.png";
+ this.btnOnlineView.Text = this.dicText["宸茶繛鎺�"];
+ this.btnOnlineView.TextColor = CSS_Color.PromptingColor1;
+ //甯稿紑妯″紡鍥炬爣
+ if (this.btnNormallyOpenIcon != null)
+ {
+ this.btnNormallyOpenIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/NormallyOpenIcon1.png";
+ }
+ }
+ this.seekBarVoiceControl.Progress = this.doorLockData.Voice;
+ this.btnVoicePersent.Text = this.doorLockData.Voice.ToString()+"%";
}
- else
+ catch (Exception ex)
{
- //寮�閿佸浘鐗�
- this.picLockControl.UnSelectedImagePath = this.doorLockData.Open == true ? "FunctionIcon/DoorLock/UnLockPictrue3.png" : "FunctionIcon/DoorLock/LockPictrue1.png";
- //杩炴帴鐘舵��
- this.btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/Connect.png";
- this.btnOnlineView.Text = this.dicText["宸茶繛鎺�"];
- this.btnOnlineView.TextColor = CSS_Color.PromptingColor1;
- //甯稿紑妯″紡鍥炬爣
- if (this.btnNormallyOpenIcon != null)
- {
- this.btnNormallyOpenIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/NormallyOpenIcon1.png";
- }
+ MainPage.Log($"鐣岄潰鏇存柊寮傚父锛岄棬閿�:{ex.Message}");
}
}
@@ -908,6 +1049,17 @@
HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipRemind, Language.StringByID(StringId.DeviceNotOnline), null, null, null, 2);
return;
}
+ if (UserInfo.Current.VerOpenDoorPw || string.IsNullOrEmpty(UserInfo.Current.doorPasswordString))
+ {
+ var page = new DoorLockUnlockPage(this.device);
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadView();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ }
+ else
+ {
+ Control.Ins.OneKeyUnlocking(this.device, UserInfo.Current.doorPasswordString);
+ }
//绗竴娆′娇鐢紝璇峰厛缁戝畾闂ㄩ攣瀵嗙爜
//HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.PleaseBindTheDoorPswFirst), () =>
//{
@@ -921,42 +1073,40 @@
// });
//});
- if (UserInfo.Current.appUnlockPage.Contains("3") == true)
- {
- //璋冭捣瀹夊叏璁よ瘉
- HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
- {
- //閿佸凡鎵撳紑
- if (div == 1)
- {
- HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipSuccess, Language.StringByID(StringId.LockIsOpened), null, null, null, 2);
- }
- else
- {
- //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿�
- HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
- {
- var page = new AppUnlockSettingsPage();
- MainPage.BasePageView.AddChidren(page);
- page.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-
- }, Language.StringByID(StringId.Jump));
- }
- });
- }
- else
- {
- //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿�
- HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
- {
- var page = new AppUnlockSettingsPage();
- MainPage.BasePageView.AddChidren(page);
- page.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-
- }, Language.StringByID(StringId.Jump));
- }
+ //if (UserInfo.Current.appUnlockPage.Contains("3") == true)
+ //{
+ // //璋冭捣瀹夊叏璁よ瘉
+ // HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
+ // {
+ // //閿佸凡鎵撳紑
+ // if (div == 1)
+ // {
+ // HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipSuccess, Language.StringByID(StringId.LockIsOpened), null, null, null, 2);
+ // }
+ // else
+ // {
+ // //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿�
+ // HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
+ // {
+ // var page = new AppUnlockSettingsPage();
+ // MainPage.BasePageView.AddChidren(page);
+ // page.LoadPage();
+ // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ // }, Language.StringByID(StringId.Jump));
+ // }
+ // });
+ //}
+ //else
+ //{
+ // //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿�
+ // HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
+ // {
+ // var page = new AppUnlockSettingsPage();
+ // MainPage.BasePageView.AddChidren(page);
+ // page.LoadPage();
+ // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ // }, Language.StringByID(StringId.Jump));
+ //}
}
#endregion
@@ -968,7 +1118,7 @@
/// </summary>
private void RefreshNowDeviceStatuMemory(Function i_LocalDevice)
{
- this.doorLockData.IsOnline = i_LocalDevice.online;
+ this.doorLockData.IsOnline = i_LocalDevice.isOnline();
for (int i = 0; i < i_LocalDevice.attributes.Count; i++)
{
var data = i_LocalDevice.attributes[i];
@@ -989,7 +1139,7 @@
}
}
//闊抽噺
- else if (data.key == "volume")
+ else if (data.key == "door_volume")
{
var value = data.state;
if (value != string.Empty)
@@ -1053,13 +1203,62 @@
/// <summary>
/// 涓存椂瀵嗙爜鐢熸晥鏃堕棿(2020.03.17 13:27)
/// </summary>
- public string StatrtTime = string.Empty;
+ public string StartTime {
+ get
+ {
+ try
+ {
+ if(string.IsNullOrEmpty(StartTimeTick))
+ {
+ return string.Empty;
+ }
+ return Utlis.UnixToDateTime(Convert.ToInt64(StartTimeTick)).ToString("yyyy.MM.dd HH:mm");
+ }catch(Exception ex)
+ {
+ MainPage.Log($"涓存椂瀵嗙爜鐢熸晥鏃堕棿杞崲寮傚父: {ex.Message}");
+ return string.Empty;
+ }
+ }
+ }
+ public string StartTimeTick = string.Empty;
/// <summary>
/// 涓存椂瀵嗙爜澶辨晥鏃堕棿(2020.03.17 13:27)
/// </summary>
- public string EndTime = string.Empty;
+ public string EndTime {
+ get
+ {
+ try
+ {
+ if (string.IsNullOrEmpty(EndTimeTick))
+ {
+ return string.Empty;
+ }
+ return Utlis.UnixToDateTime(Convert.ToInt64(EndTimeTick)).ToString("yyyy.MM.dd HH:mm");
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"涓存椂瀵嗙爜鐢熸晥鏃堕棿杞崲寮傚父: {ex.Message}");
+ return string.Empty;
+ }
+ }
+ }
+ public string EndTimeTick = string.Empty;
+ /// <summary>
+ /// 涓存椂瀵嗙爜id
+ /// </summary>
+ public string PwdId = string.Empty;
}
+ /// <summary>
+ /// 闂ㄩ攣涓存椂瀵嗙爜
+ /// </summary>
+ private class DoorTempPassword
+ {
+ public string pwdId = string.Empty;
+ public string pwd = string.Empty;
+ public string beginTime = string.Empty;
+ public string endTime = string.Empty;
+ }
#endregion
}
}
--
Gitblit v1.8.0