| | |
| | | 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 |
| | | { |
| | |
| | | /// </summary> |
| | | private Dictionary<string, string> dicText = new Dictionary<string, string>(); |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 初始化_____________________________ |
| | |
| | | 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> |
| | |
| | | //它有个最小的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,弄不准到底谁更高,因为计算方法不一样 |
| | |
| | | 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); |
| | |
| | | btnOnlineView.TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel; |
| | | btnOnlineView.TextColor = CSS_Color.PromptingColor1; |
| | | btnOnlineView.TextID = StringId.Connected; |
| | | FrameWhiteCentet1.AddChidren(btnOnlineView); |
| | | //FrameWhiteCentet1.AddChidren(btnOnlineView); |
| | | //右上角配置结束的事件 |
| | | base.SettionFinishEvent += () => |
| | | { |
| | |
| | | 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) => |
| | | { |
| | |
| | | frameTempPsw.Visible = false; |
| | | FrameWhiteCentet1.AddChidren(frameTempPsw); |
| | | |
| | | |
| | | //声音 |
| | | this.btnVoice = new IconViewControl(24); |
| | | btnVoice.UnSelectedImagePath = "FunctionIcon/DoorLock/Voice.png"; |
| | |
| | | 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> |
| | |
| | | private void InitUnLockMenuControl() |
| | | { |
| | | //如果是成员,则只有一键开锁 |
| | | if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true) |
| | | if ( DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true) |
| | | { |
| | | //一键开锁 |
| | | var btnOneKey = new NormalViewControl(100, 25, true); |
| | |
| | | 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); |
| | | |
| | |
| | | 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> |
| | |
| | | |
| | | //生效时间 |
| | | 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) => |
| | | { |
| | |
| | | |
| | | //失效时间 |
| | | 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) => |
| | | { |
| | |
| | | //关掉界面 |
| | | 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(); |
| | | ////生成临时密码 |
| | | //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(); |
| | | } |
| | | }; |
| | | |
| | |
| | | { |
| | | //生效时间必须大于失效时间 |
| | | 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; |
| | |
| | | /// </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}"); |
| | | } |
| | | } |
| | | |
| | |
| | | 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), () => |
| | | //{ |
| | |
| | | // }); |
| | | //}); |
| | | |
| | | 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 |
| | |
| | | } |
| | | } |
| | | //音量 |
| | | else if (data.key == "volume") |
| | | else if (data.key == "door_volume") |
| | | { |
| | | var value = data.state; |
| | | if (value != string.Empty) |
| | |
| | | /// <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 |
| | | } |
| | | } |