| | |
| | | <Properties StartupConfiguration="{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.5c86e4357d63" /> |
| | | <MonoDevelop.Ide.ItemProperties.GateWay.Ios PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.B2DE3886-169F-4A06-8F62-51254112D190" /> |
| | | <MonoDevelop.Ide.ItemProperties.GateWay.Ios PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.39ab2514bebabc070f31fc17888b031af9b437ba" /> |
| | | <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.M7BBB18B19152766" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/ZigBee/Device/ZbGateway.cs"> |
| | | <Files> |
| | | <File FileName="Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs" Line="189" Column="41" /> |
| | | <File FileName="Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs" Line="64" Column="10" /> |
| | | <File FileName="Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs" Line="69" Column="24" /> |
| | | <File FileName="Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs" Line="169" Column="42" /> |
| | | <File FileName="Shared/Phone/Device/Category/Category.cs" Line="1466" Column="1" /> |
| | | <File FileName="Shared/Phone/Device/Category/Category.cs" Line="1468" Column="26" /> |
| | | <File FileName="Shared/Phone/ZigBee/Device/ZbGateway.cs" Line="3347" Column="16" /> |
| | | </Files> |
| | | <MonoDevelop.Ide.Workbench> |
| | | <Pads> |
| | | <Pad Id="ProjectPad"> |
| | | <State name="__root__"> |
| | | <Node name="GateWay" expanded="True"> |
| | | <Node name="GateWay.Droid" expanded="True"> |
| | | <Node name="Assets" expanded="True" /> |
| | | </Node> |
| | | <Node name="Shared" expanded="True"> |
| | | <Node name="Phone" expanded="True"> |
| | | <Node name="Device" expanded="True" /> |
| | | <Node name="UserCenter" expanded="True" /> |
| | | <Node name="ZigBee" expanded="True"> |
| | | <Node name="Device" expanded="True"> |
| | | <Node name="ZbGateway.cs" selected="True" /> |
| | | <Node name="Light" expanded="True" /> |
| | | </Node> |
| | | <Node name="UserCenter" expanded="True"> |
| | | <Node name="DoorLock" expanded="True"> |
| | | <Node name="UndistributeDoorlockUserPage.cs" selected="True" /> |
| | | </Node> |
| | | </Node> |
| | | <Node name="ZigBee" expanded="True"> |
| | | <Node name="Device" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | |
| | | </Pads> |
| | | </MonoDevelop.Ide.Workbench> |
| | | <MonoDevelop.Ide.DebuggingService.PinnedWatches /> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhoneSimulator" /> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> |
| | | <MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <BreakpointStore> |
| | | <Breakpoint file="/Users/hdl/Desktop/git/HomeApp20191118/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs" relfile="Shared/Phone/ZigBee/Device/ZbGateway.cs" line="3352" column="1" /> |
| | | <Breakpoint file="/Users/hdl/Desktop/git/HomeApp20191118/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs" relfile="Shared/Phone/ZigBee/Device/ZbGateway.cs" line="3350" column="1" /> |
| | | <Breakpoint file="/Users/hdl/Desktop/git/HomeApp20191118/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs" relfile="Shared/Phone/ZigBee/Device/ZbGateway.cs" line="3292" column="1" /> |
| | | </BreakpointStore> |
| | | <BreakpointStore /> |
| | | </MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <MultiItemStartupConfigurations /> |
| | | </Properties> |
| | |
| | | { |
| | | return await System.Threading.Tasks.Task.Run((Func<System.Threading.Tasks.Task<Dictionary<int, LocaDoorLockObj>>>)(async () => |
| | | { |
| | | doorLock.localDoorLockUserList.Clear(); |
| | | //1、读取门锁信息 |
| | | var getDoorLockInfo = await doorLock.GetDoorlockUserInfoAsync(); |
| | | |
| | |
| | | // 用户信息处理 |
| | | if (getDoorLockInfo != null && getDoorLockInfo.doorLockUserDetailData != null) |
| | | { |
| | | doorLock.localDoorLockUserList.Clear(); |
| | | var dataList = getDoorLockInfo.doorLockUserDetailData.UserObjList; |
| | | foreach (var doorData in dataList) |
| | | { |
| | |
| | | /// <param name="action">二次验证的结果成功后的通知</param> |
| | | /// <param name="progressButton">门锁开或关时进度显示</param> |
| | | /// <param name="btnDoorLockPic">门锁图片开/关显示</param> |
| | | public void RemoteUnlockRequest(ZigBee.Device.DoorLock doorLock, Action action, Button progressButton = null, Button btnDoorLockPic = null, Button btnStatus = null) |
| | | public void RemoteUnlockRequest(ZigBee.Device.DoorLock doorLock, Action action, Button progressButton = null, Button btnDoorLockPic = null, Button btnStatus = null, Button btnDoorLockTitle = null) |
| | | { |
| | | if (doorLock.RemoteUnlockPassword == "") |
| | | { |
| | |
| | | { |
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1) |
| | | { |
| | | var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); |
| | | var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | functionSetting.Show(); |
| | | functionSetting.devicNameAction += (deviceRename) => |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | | { |
| | | if (btnDoorLockTitle != null) |
| | | { |
| | | btnDoorLockTitle.Text = deviceRename; |
| | | } |
| | | } |
| | | }; |
| | | dialog.Close(); |
| | | } |
| | | else |
| | | { |
| | | var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); |
| | | var functionSettingSub = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSettingSub); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | functionSettingSub.Show(); |
| | | functionSettingSub.devicNameAction += (deviceRename) => |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | | { |
| | | if (btnDoorLockTitle != null) |
| | | { |
| | | btnDoorLockTitle.Text = deviceRename; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | dialog.Close(); |
| | | } |
| | | }; |
| | |
| | | |
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1) |
| | | { |
| | | var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); |
| | | var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | |
| | | functionSetting.Show(); |
| | | functionSetting.devicNameAction += (deviceRename) => |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | | { |
| | | if (btnDoorLockTitle != null) |
| | | { |
| | | btnDoorLockTitle.Text = deviceRename; |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); |
| | | var functionSettingSub = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSettingSub); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | functionSettingSub.Show(); |
| | | functionSettingSub.devicNameAction += (deviceRename) => |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | | { |
| | | if (btnDoorLockTitle != null) |
| | | { |
| | | btnDoorLockTitle.Text = deviceRename; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | } |
| | |
| | | dialog3.Close(); |
| | | }; |
| | | } |
| | | // 获取到到名称更改回调通知 |
| | | public Action<string> devicNameSecAction; |
| | | } |
| | | } |
| | |
| | | Action action; |
| | | string modifyDeviceName = ""; |
| | | bool IsModifyName = true; |
| | | public Action<string> devicNameAction; |
| | | #endregion |
| | | |
| | | /// <summary>
|
| | |
| | | btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58); |
| | | btnNextFrameLayout.X = Application.GetRealWidth(233); |
| | | btnNext.Text = doorLock.DeviceName; |
| | | var btnDeviceNameEditText = new Button() |
| | | var btnDeviceNameEditText = new EditText() |
| | | { |
| | | Width = Application.GetRealWidth(789 - 58), |
| | | Height = Application.GetRealHeight(58), |
| | | X = Application.GetRealWidth(46), |
| | | Width = Application.GetRealWidth(731), |
| | | Height = Application.GetRealHeight(58), |
| | | TextColor = ZigbeeColor.Current.XMGray3, |
| | | PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | Text = doorLock.DeviceName |
| | | Text = string.IsNullOrEmpty(doorLock.DeviceName) ? Language.StringByID(R.MyInternationalizationString.UNKnown) : doorLock.DeviceName, |
| | | }; |
| | | btnNextFrameLayout.AddChidren(btnDeviceNameEditText); |
| | | //btnDeviceNameEditText.TextChangeEventHandler += (sender, e) => |
| | | //{ |
| | | // modifyDeviceName = btnDeviceNameEditText.Text; |
| | | //}; |
| | | //Action<Shared.View> actionEdit = async (obj) => |
| | | // { |
| | | // try |
| | | // { |
| | | // Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); }); |
| | | // var doorLockDeviceList = new List<CommonDevice> { }; |
| | | // doorLockDeviceList.Add(doorLock); |
| | | // var result = await Common.LocalDevice.Current.ReMacName(doorLockDeviceList, btnDeviceNameEditText.Text); |
| | | // if (result) |
| | | // { |
| | | // IsModifyName = false; |
| | | // } |
| | | // else |
| | | // { |
| | | // IsModifyName = true; |
| | | // } |
| | | // } |
| | | // catch { } |
| | | // finally |
| | | // { |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // CommonPage.Loading.Hide(); |
| | | // }); |
| | | // } |
| | | // }; |
| | | // btnDeviceNameEditText.EditorEnterAction += actionEdit; |
| | | |
| | | btnDeviceNameEditText.TextChangeEventHandler += (sender, e) => |
| | | { |
| | | modifyDeviceName = btnDeviceNameEditText.Text; |
| | | }; |
| | | Action<Shared.View> actionEdit = async (obj) => |
| | | { |
| | | try |
| | | { |
| | | Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); }); |
| | | var doorLockDeviceList = new List<CommonDevice> { }; |
| | | doorLockDeviceList.Add(doorLock); |
| | | var result = await Common.LocalDevice.Current.ReMacName(doorLockDeviceList, btnDeviceNameEditText.Text); |
| | | if (result) |
| | | { |
| | | IsModifyName = false; |
| | | } |
| | | else |
| | | { |
| | | IsModifyName = true; |
| | | } |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | } |
| | | }; |
| | | btnDeviceNameEditText.EditorEnterAction += actionEdit; |
| | | |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(303); |
| | |
| | | } |
| | | |
| | | //保存 |
| | | //var btnFinifh = new Button() |
| | | //{ |
| | | // Width = Application.GetRealWidth(907), |
| | | // Height = Application.GetRealHeight(127), |
| | | // Y = Application.GetRealHeight(1472), |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Radius = (uint)Application.GetRealHeight(127) / 2, |
| | | // TextID = R.MyInternationalizationString.Save, |
| | | // BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | // TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | // TextSize = 16, |
| | | //}; |
| | | //this.midFrameLayout.AddChidren(btnFinifh); |
| | | //btnFinish.MouseUpEventHandler += (sender, e) => |
| | | //{ |
| | | // System.Threading.Tasks.Task.Run(async () => |
| | | // { |
| | | // Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); }); |
| | | // try |
| | | // { |
| | | // if (IsModifyName) |
| | | // { |
| | | // var doorLockDeviceList = new List<CommonDevice> { }; |
| | | // doorLockDeviceList.Add(doorLock); |
| | | // await Common.LocalDevice.Current.ReMacName(doorLockDeviceList, modifyDeviceName); |
| | | // } |
| | | // } |
| | | // catch { } |
| | | // finally |
| | | // { |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // CommonPage.Loading.Hide(); |
| | | // }); |
| | | // } |
| | | // }); |
| | | //}; |
| | | var btnFinifh = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(907), |
| | | Height = Application.GetRealHeight(127), |
| | | Y = Application.GetRealHeight(1472), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Radius = (uint)Application.GetRealHeight(127) / 2, |
| | | TextID = R.MyInternationalizationString.Save, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | TextSize = 16, |
| | | }; |
| | | this.midFrameLayout.AddChidren(btnFinifh); |
| | | btnFinifh.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | System.Threading.Tasks.Task.Run(async () => |
| | | { |
| | | Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); }); |
| | | try |
| | | { |
| | | if (IsModifyName) |
| | | { |
| | | var doorLockDeviceList = new List<CommonDevice> { }; |
| | | doorLockDeviceList.Add(doorLock); |
| | | var result = await Common.LocalDevice.Current.ReMacName(doorLockDeviceList, modifyDeviceName); |
| | | if (result) |
| | | { |
| | | if (devicNameAction != null) |
| | | { |
| | | devicNameAction(modifyDeviceName); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | var mess = ex.Message; |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | } |
| | | |
| | | #region ◆ 接口实现__________________________ |
old mode 100755
new mode 100644
| | |
| | | |
| | | #region ◆ 变量申明__________________________ |
| | | ZigBee.Device.DoorLock doorLock; |
| | | public Action<string> devicNameAction; |
| | | bool IsModifyName = true; |
| | | string modifyDeviceName = ""; |
| | | #endregion |
| | | |
| | | /// <summary>
|
| | |
| | | if (i == 0) |
| | | { |
| | | bottomRowLayout.Y = Application.GetRealHeight(220); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.DeviceRemarkXm) + ":"; |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.DeviceRemarkXm); |
| | | btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58); |
| | | btnNextFrameLayout.X = Application.GetRealWidth(233); |
| | | btnNext.TextAlignment = TextAlignment.CenterLeft; |
| | | btnNext.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3; |
| | | btnNext.Text = doorLock.DeviceName; |
| | | var btnDeviceNameEditText = new EditText() |
| | | { |
| | | X = Application.GetRealWidth(46), |
| | | Width = Application.GetRealWidth(731), |
| | | Height = Application.GetRealHeight(58), |
| | | TextColor = ZigbeeColor.Current.XMGray3, |
| | | PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = string.IsNullOrEmpty(doorLock.DeviceName) ? Language.StringByID(R.MyInternationalizationString.UNKnown) : doorLock.DeviceName, |
| | | }; |
| | | btnNextFrameLayout.AddChidren(btnDeviceNameEditText); |
| | | |
| | | btnDeviceNameEditText.TextChangeEventHandler += (sender, e) => |
| | | { |
| | | modifyDeviceName = btnDeviceNameEditText.Text; |
| | | }; |
| | | Action<Shared.View> actionEdit = async (obj) => |
| | | { |
| | | try |
| | | { |
| | | Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); }); |
| | | var doorLockDeviceList = new List<CommonDevice> { }; |
| | | doorLockDeviceList.Add(doorLock); |
| | | var result = await Common.LocalDevice.Current.ReMacName(doorLockDeviceList, btnDeviceNameEditText.Text); |
| | | if (result) |
| | | { |
| | | IsModifyName = false; |
| | | } |
| | | else |
| | | { |
| | | IsModifyName = true; |
| | | } |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | } |
| | | }; |
| | | btnDeviceNameEditText.EditorEnterAction += actionEdit; |
| | | |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(303); |
| | | } |
| | |
| | | btnNextFrameLayout.MouseDownEventHandler += eHandler; |
| | | #endregion |
| | | } |
| | | |
| | | //保存 |
| | | var btnFinifh = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(907), |
| | | Height = Application.GetRealHeight(127), |
| | | Y = Application.GetRealHeight(1472), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Radius = (uint)Application.GetRealHeight(127) / 2, |
| | | TextID = R.MyInternationalizationString.Save, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | TextSize = 16, |
| | | }; |
| | | this.midFrameLayout.AddChidren(btnFinifh); |
| | | btnFinifh.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | System.Threading.Tasks.Task.Run(async () => |
| | | { |
| | | Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); }); |
| | | try |
| | | { |
| | | if (IsModifyName) |
| | | { |
| | | var doorLockDeviceList = new List<CommonDevice> { }; |
| | | doorLockDeviceList.Add(doorLock); |
| | | var result = await Common.LocalDevice.Current.ReMacName(doorLockDeviceList, modifyDeviceName); |
| | | if (result) |
| | | { |
| | | if (devicNameAction != null) |
| | | { |
| | | devicNameAction(modifyDeviceName); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | } |
| | | |
| | | #region ◆ 接口实现__________________________ |
old mode 100755
new mode 100644
| | |
| | | { |
| | | if (curIndex == 0) |
| | | { |
| | | if (string.IsNullOrEmpty(doorLock.LocalTempPassword)) |
| | | { |
| | | //请"点击生成"临时密码; |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip1), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); |
| | | }); |
| | | return; |
| | | } |
| | | var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "ValidTime"); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | |
| | | } |
| | | if (curIndex == 1) |
| | | { |
| | | if (string.IsNullOrEmpty(doorLock.LocalTempPassword)) |
| | | { |
| | | //请"点击生成"临时密码; |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip1), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); |
| | | }); |
| | | return; |
| | | } |
| | | var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "InValidTime"); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
old mode 100755
new mode 100644
| | |
| | | CurentDoorLockTime = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetLocalTime(dataReport.AttriButeData); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitGetDoorLockTime = DateTime.MaxValue; |
| | | textDisplayDate.Text = CurentDoorLockTime.Year + Language.StringByID(R.MyInternationalizationString.Year) + CurentDoorLockTime.Month + Language.StringByID(R.MyInternationalizationString.Month) + CurentDoorLockTime.Day + Language.StringByID(R.MyInternationalizationString.Day); |
| | | if (CurentDoorLockTime.Minute < 10) |
| | | { |
| | |
| | | { |
| | | textDisplayTime.Text = CurentDoorLockTime.Hour + ":" + CurentDoorLockTime.Minute; |
| | | } |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | } |
| | | } |
| | |
| | | int curMin = 0; |
| | | int curSec = 0; |
| | | public Action timeSetAction; |
| | | DateTime waitGetDoorLockTime = DateTime.MaxValue; |
| | | #endregion |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | if (setTimeType == "DoorLockTime") |
| | | { |
| | | CommonPage.Loading.Start(""); |
| | | // 只有重新启动时会慢,然后其他时刻都是有值的 |
| | | new System.Threading.Thread(() => |
| | | { |
| | | while (this.Parent != null) |
| | | { |
| | | if (DateTime.Now > waitGetDoorLockTime) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | } |
| | | //读门锁时间 |
| | | //等待10秒,没有收到提示超时退出 |
| | | waitGetDoorLockTime = DateTime.Now.AddSeconds(+5); |
| | | doorLock.ReadAttri(ZigBee.Device.Cluster_ID.DoorLock, ZigBee.Device.AttriButeId.DoorLock); |
| | | System.Threading.Thread.Sleep(5 * 1000); |
| | | } |
| | |
| | | }; |
| | | MidTopFrameLayout.AddChidren(btnLine); |
| | | |
| | | if (setTimeType != "DoorLockTime") |
| | | { |
| | | textDisplayDateFrameLayout.Width = 0; |
| | | } |
| | | |
| | | if (i == 0) |
| | | { |
| | | btnDateTime.Y = textDisplayDateFrameLayout.Y = btnNextFrameLayout.Y = Application.GetRealHeight(50); |
| | |
| | | Text = "_" + Language.StringByID(R.MyInternationalizationString.Year) + "_" + Language.StringByID(R.MyInternationalizationString.Month) + "_" + Language.StringByID(R.MyInternationalizationString.Day), |
| | | }; |
| | | textDisplayDateFrameLayout.AddChidren(textDisplayDate); |
| | | //textDisplayDateFrameLayout.Y = btnNextFrameLayout.Y = btnDateTime.Y; |
| | | |
| | | if (setTimeType != "DoorLockTime") |
| | | { |
| | | btnDateTime.Text = Language.StringByID(R.MyInternationalizationString.Date); |
| | | if (setTimeType == "ValidTime") |
| | | { |
| | | //if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth == 0) |
| | | //{ |
| | | // var cur = DateTime.Now; |
| | | // Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth = cur.Month; |
| | | // Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateDay = cur.Day; |
| | | //} |
| | | textDisplayDate.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth + Language.StringByID(R.MyInternationalizationString.Month) + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateDay + Language.StringByID(R.MyInternationalizationString.Day); |
| | | } |
| | | else if (setTimeType == "InValidTime") |
| | | { |
| | | //if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth == 0) |
| | | //{ |
| | | // var cur = DateTime.Now; |
| | | // Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth = cur.Month; |
| | | // Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateDay = cur.Day; |
| | | //} |
| | | textDisplayDate.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth + Language.StringByID(R.MyInternationalizationString.Month) + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateDay + Language.StringByID(R.MyInternationalizationString.Day); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | Text = "00:00", |
| | | }; |
| | | textDisplayDateFrameLayout.AddChidren(textDisplayTime); |
| | | //textDisplayDateFrameLayout.Y = btnNextFrameLayout.Y = btnDateTime.Y; |
| | | |
| | | if (setTimeType != "DoorLockTime") |
| | | { |
| | | btnDateTime.Text = Language.StringByID(R.MyInternationalizationString.Time); |
| | | if (setTimeType == "ValidTime") |
| | | { |
| | | //if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour == 100) |
| | | //{ |
| | | // var cur = DateTime.Now; |
| | | // Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour = cur.Hour; |
| | | // Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute = cur.Minute; |
| | | //} |
| | | if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute < 10) |
| | | { |
| | | textDisplayTime.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour + ":" + "0" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute; |
| | | } |
| | | else |
| | | { |
| | | textDisplayTime.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour + ":" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute; |
| | | } |
| | | } |
| | | else if (setTimeType == "InValidTime") |
| | | { |
| | | //if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour == 100) |
| | | //{ |
| | | // var cur = DateTime.Now; |
| | | // Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour = cur.Hour; |
| | | // Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute = cur.Minute; |
| | | //} |
| | | if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute < 10) |
| | | { |
| | | textDisplayTime.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour + ":" + "0" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute; |
| | | } |
| | | else |
| | | { |
| | | textDisplayTime.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour + ":" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | timeSetAction(); |
| | | } |
| | | this.shadowRadiusFrameLayout.RemoveFromParent(); |
| | | MidFrameLayoutContent(); |
| | | }; |
| | | } |
| | | else |
| | |
| | | timeSetAction(); |
| | | } |
| | | this.shadowRadiusFrameLayout.RemoveFromParent(); |
| | | MidFrameLayoutContent(); |
| | | }; |
| | | } |
| | | } |
| | |
| | | this.shadowRadiusFrameLayout.RemoveFromParent(); |
| | | }; |
| | | |
| | | //等待从门锁上面加载出的时间 |
| | | //System.Threading.Thread.Sleep(1500); |
| | | //CommonPage.Loading.Hide(); |
| | | |
| | | if (setTimeType == "DoorLockTime") |
| | | { |
| | | if (CurentDoorLockTime != null && CurentDoorLockTime.Year != 1) |
| | | { |
| | | waitGetDoorLockTime = DateTime.MaxValue; |
| | | CommonPage.Loading.Hide(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | #region ◆ 接口实现__________________________ |
| | |
| | | Button btnPicTip; |
| | | Button btnPicTip1; |
| | | bool isSecondDel; |
| | | FrameLayout blankFrameLayout; |
| | | #endregion |
| | | |
| | | void ReadDoorLockUserInfo() |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | RefreshList(); |
| | | // 类型区分 |
| | | TypeRefresh(); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | } |
| | |
| | | this.midFrameLayout.AddChidren(btnLine); |
| | | #endregion |
| | | |
| | | bodyView = new VerticalRefreshLayout() |
| | | { |
| | | Y = btnLine.Bottom, |
| | | Height = Application.GetRealHeight(1921 - 184 - 116), |
| | | }; |
| | | this.midFrameLayout.AddChidren(bodyView); |
| | | bodyView.BeginHeaderRefreshingAction += () => |
| | | { |
| | | bodyView.BeginHeaderRefreshing(); |
| | | ReadDoorLockUserInfo(); |
| | | bodyView.EndHeaderRefreshing(); |
| | | }; |
| | | BlankPicUI(); |
| | | } |
| | | |
| | | void BlankPicUI() |
| | | { |
| | | blankFrameLayout = new FrameLayout |
| | | { |
| | | }; |
| | | bodyView.AddChidren(blankFrameLayout); |
| | | |
| | | entryStatusPic = new Button |
| | | { |
| | | X = Application.GetRealWidth(164), |
| | | Y = Application.GetRealHeight(377), |
| | | Height = Application.GetRealHeight(435), |
| | | Width = Application.GetRealHeight(757), |
| | | Visible = false, |
| | | UnSelectedImagePath = "DoorLock/UnLockBlankPic.png", |
| | | }; |
| | | this.midFrameLayout.AddChidren(entryStatusPic); |
| | | blankFrameLayout.AddChidren(entryStatusPic); |
| | | |
| | | #region 空图片 |
| | | btnPicTip = new Button |
| | | { |
| | | X = Application.GetRealWidth(397), |
| | | Y = Application.GetRealHeight(844), |
| | | Text = Language.StringByID(R.MyInternationalizationString.NoPasswordInformation), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Visible = false, |
| | | Y = Application.GetRealHeight(844), |
| | | }; |
| | | this.midFrameLayout.AddChidren(btnPicTip); |
| | | blankFrameLayout.AddChidren(btnPicTip); |
| | | |
| | | btnPicTip1 = new Button |
| | | { |
| | |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Visible = false, |
| | | BackgroundColor = 0xff00ff00, |
| | | }; |
| | | this.midFrameLayout.AddChidren(btnPicTip1); |
| | | #endregion |
| | | |
| | | bodyView = new VerticalRefreshLayout() |
| | | { |
| | | Y = btnLine.Bottom, |
| | | }; |
| | | this.midFrameLayout.AddChidren(bodyView); |
| | | bodyView.BeginHeaderRefreshingAction += () => |
| | | { |
| | | bodyView.BeginHeaderRefreshing(); |
| | | ReadDoorLockUserInfo(); |
| | | bodyView.EndHeaderRefreshing(); |
| | | }; |
| | | blankFrameLayout.AddChidren(btnPicTip1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="key"></param> |
| | | public void RefreshList(int unlockMethod = -1) |
| | | { |
| | | bodyView.RemoveAll(); |
| | | this.midFrameLayout.RemoveAll(); |
| | | MidFrameLayoutContent(); |
| | | bodyView.RemoveAll(); |
| | | var curAccountDoorLockUserList = new Dictionary<int, ZigBee.Device.DoorLock.LocaDoorLockObj>(); |
| | | foreach (var curUserId in doorLock.localDoorLockUserList.Keys) |
| | | { |
| | |
| | | entryStatusPic.Visible = true; |
| | | btnPicTip.Visible = true; |
| | | btnPicTip1.Visible = true; |
| | | blankFrameLayout.Visible = true; |
| | | entryStatusPic.Height = Application.GetRealHeight(435); |
| | | entryStatusPic.Width = Application.GetRealHeight(757); |
| | | btnPicTip.Height = Application.GetRealHeight(98 / 2); |
| | | btnPicTip1.Height = Application.GetRealHeight(98 / 2); |
| | | bodyView.Height = Application.GetRealHeight(0); |
| | | blankFrameLayout.Height = bodyView.Height; |
| | | } |
| | | else |
| | | { |
| | | bodyView.Height = Application.GetRealHeight(1921 - 184 - 116); |
| | | entryStatusPic.Visible = false; |
| | | btnPicTip.Visible = false; |
| | | btnPicTip1.Visible = false; |
| | | blankFrameLayout.Visible = false; |
| | | entryStatusPic.Height = Application.GetRealHeight(0); |
| | | entryStatusPic.Width = Application.GetRealHeight(0); |
| | | btnPicTip.Height = Application.GetRealHeight(0); |
| | | btnPicTip1.Height = Application.GetRealHeight(0); |
| | | blankFrameLayout.Height = Application.GetRealHeight(0); |
| | | var frameLayoutRow = new FrameLayout() |
| | | { |
| | | Height = Application.GetMinRealAverage(0), |
| | |
| | | localDoorLockObj.UserName = refreshDoorLockData.UserIdRemarks; |
| | | localDoorLockObj.ConnectedAccount = curAccountObj.SubAccountDistributedMark; |
| | | doorLock.localDoorLockUserList.Add(curDoorLockUser.UserID, localDoorLockObj); |
| | | RefreshList(); |
| | | TypeRefresh(); |
| | | } |
| | | } |
| | | else |
| | |
| | | localDoorLockObj.UserID = curDoorLockUser.UserID; |
| | | doorLock.localDoorLockUserList.Remove(curUserId); |
| | | doorLock.ReSave(); |
| | | RefreshList(); |
| | | TypeRefresh(); |
| | | } |
| | | } |
| | | else |
| | |
| | | var localDoorLockObj = new ZigBee.Device.DoorLock.LocaDoorLockObj() { }; |
| | | localDoorLockObj.UserID = curDoorLockUser.UserID; |
| | | doorLock.localDoorLockUserList.Remove(curUserId); |
| | | RefreshList(); |
| | | TypeRefresh(); |
| | | } |
| | | } |
| | | else |
| | |
| | | doorLock.ReSave(); |
| | | btnAllMethod.IsSelected = true; |
| | | oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | |
| | | // 类型区分 |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.AllMethod)) |
| | | { |
| | | RefreshList(); |
| | | } |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.PasswordUnlock)) |
| | | { |
| | | RefreshList(0); |
| | | } |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.FingerprintUnlock)) |
| | | { |
| | | RefreshList(15); |
| | | } |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.ProximithCardUnlock)) |
| | | { |
| | | RefreshList(3); |
| | | } |
| | | TypeRefresh(); |
| | | } |
| | | dialog.Close(); |
| | | }; |
| | |
| | | } |
| | | } |
| | | |
| | | //类型区分 |
| | | void TypeRefresh() |
| | | { |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.PasswordUnlock)) |
| | | { |
| | | RefreshList(0); |
| | | } |
| | | else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.FingerprintUnlock)) |
| | | { |
| | | RefreshList(15); |
| | | } |
| | | else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.ProximithCardUnlock)) |
| | | { |
| | | RefreshList(3); |
| | | } |
| | | else |
| | | { |
| | | RefreshList(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 重写移除方法 |
| | | /// </summary> |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | RefreshList(); |
| | | TypeRefresh(); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | } |
| | |
| | | var d = uList.Find((value) => { return value == curDoorLockUser.UserID; }); |
| | | if (d != null) |
| | | { |
| | | // 类型区分 |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.AllMethod)) |
| | | { |
| | | RefreshList(); |
| | | } |
| | | else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.PasswordUnlock)) |
| | | { |
| | | RefreshList(0); |
| | | } |
| | | else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.FingerprintUnlock)) |
| | | { |
| | | RefreshList(15); |
| | | } |
| | | else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.ProximithCardUnlock)) |
| | | { |
| | | RefreshList(3); |
| | | } |
| | | else if (doorLock.currentUserDisplayMethod == "") |
| | | { |
| | | RefreshList(); |
| | | } |
| | | TypeRefresh(); |
| | | flMain.RemoveFromParent(); |
| | | bottomFrameLayout.RemoveAll(); |
| | | } |
| | |
| | | doorLock.currentUserDisplayMethod = btnMethodText.Text; |
| | | btnAllMethod.IsSelected = true; |
| | | oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | |
| | | // 类型区分 |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.AllMethod)) |
| | | { |
| | | RefreshList(); |
| | | } |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.PasswordUnlock)) |
| | | { |
| | | RefreshList(0); |
| | | } |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.FingerprintUnlock)) |
| | | { |
| | | RefreshList(15); |
| | | } |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.ProximithCardUnlock)) |
| | | { |
| | | RefreshList(3); |
| | | } |
| | | TypeRefresh(); |
| | | } |
| | | dialog.Close(); |
| | | }; |
| | |
| | | } |
| | | } |
| | | |
| | | //类型区分 |
| | | void TypeRefresh() |
| | | { |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.PasswordUnlock)) |
| | | { |
| | | RefreshList(0); |
| | | } |
| | | else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.FingerprintUnlock)) |
| | | { |
| | | RefreshList(15); |
| | | } |
| | | else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.ProximithCardUnlock)) |
| | | { |
| | | RefreshList(3); |
| | | } |
| | | else |
| | | { |
| | | RefreshList(); |
| | | } |
| | | } |
| | | #region ◆ 接口实现__________________________ |
| | | /// <summary> |
| | | /// 处理变化事件 --将弃用 改用DeviceInfoChange() |
| | |
| | | Shared.Common.Room currentRoom; |
| | | DeviceUI deviceUI; |
| | | Action action; |
| | | Button btnDoorLockTitle; |
| | | #endregion |
| | | |
| | | /// <summary>
|
| | |
| | | /// </summary> |
| | | public void Show() |
| | | { |
| | | this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.DoorLock)); |
| | | this.TopFrameLayout(this, ""); |
| | | |
| | | EventHandler<MouseEventArgs> eHandlerBack = (sender, e) => |
| | | { |
| | |
| | | }; |
| | | this.btnBack.MouseUpEventHandler += eHandlerBack; |
| | | this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack; |
| | | this.MidFrameLayout(this); |
| | | |
| | | this.MidFrameLayout(this); |
| | | var btnShare = new Button |
| | | { |
| | | X = Application.GetRealWidth(850 - 116), |
| | |
| | | { |
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1) |
| | | { |
| | | var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); |
| | | var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | functionSetting.Show(); |
| | | functionSetting.devicNameAction += (deviceRename) => |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | | { |
| | | btnDoorLockTitle.Text = deviceRename; |
| | | //改房间 |
| | | Shared.Common.Room.CurrentRoom.ChangedRoom(deviceUI.CommonDevice, currentRoom.Id); |
| | | deviceUI.CommonDevice.ReSave(); |
| | | } |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); |
| | | var functionSettingSub = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSettingSub); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | functionSettingSub.Show(); |
| | | functionSettingSub.devicNameAction += (deviceRename) => |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | | { |
| | | btnDoorLockTitle.Text = deviceRename; |
| | | } |
| | | }; |
| | | } |
| | | }; |
| | | |
| | |
| | | }; |
| | | this.midFrameLayout.AddChidren(midTopFrameLayout); |
| | | |
| | | var btnDoorLockTitle = new Button() |
| | | btnDoorLockTitle = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(250), |
| | | Height = Application.GetRealHeight(60), |
| | | X = Application.GetRealWidth(372), |
| | | Y = Application.GetRealHeight(46), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | Text = Language.StringByID(R.MyInternationalizationString.SmartDoorLock), |
| | | Text = string.IsNullOrEmpty(doorLock.DeviceName) ? Language.StringByID(R.MyInternationalizationString.UNKnown) : doorLock.DeviceName, |
| | | TextSize = 15, |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | |
| | | var result1 = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockUnlockAccess(doorLock, Shared.Common.Config.Instance.Guid); |
| | | if (result1 == true) |
| | | { |
| | | RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus); |
| | | RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle); |
| | | devicNameSecAction += (deviceRename) => |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | | { |
| | | btnDoorLockTitle.Text = deviceRename; |
| | | //改房间 |
| | | Shared.Common.Room.CurrentRoom.ChangedRoom(deviceUI.CommonDevice, currentRoom.Id); |
| | | deviceUI.CommonDevice.ReSave(); |
| | | } |
| | | }; |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus); |
| | | RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle); |
| | | devicNameSecAction += (deviceRename) => |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | | { |
| | | btnDoorLockTitle.Text = deviceRename; |
| | | //改房间 |
| | | Shared.Common.Room.CurrentRoom.ChangedRoom(deviceUI.CommonDevice, currentRoom.Id); |
| | | deviceUI.CommonDevice.ReSave(); |
| | | } |
| | | }; |
| | | } |
| | | }; |
| | | openFrameLayout.MouseUpEventHandler += hander1; |
| | |
| | | VerticalRefreshLayout midVerticalScrolViewLayout; |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 数据刷新 |
| | | /// </summary> |
| | | void ReadAccountDoorLockInfoList() |
| | | { |
| | | System.Threading.Tasks.Task.Run(async () => |
| | |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示界面 |
| | | /// </summary> |
| | | public void Show() |
| | | { |
| | | this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.UserManagement)); |
| | |
| | | ReadAccountDoorLockInfoList(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 中部布局显示 |
| | | /// </summary> |
| | | async void MidFrameLayoutContent() |
| | | { |
| | | midVerticalScrolViewLayout.RemoveAll(); |