| | |
| | | Shared.Phone.UserCenter.MemberInfoRes accountObj; |
| | | #endregion |
| | | |
| | | void ReadDoorLockUserInfo() |
| | | { |
| | | System.Threading.Tasks.Task.Run(async () => |
| | | { |
| | | Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); }); |
| | | try |
| | | { |
| | | await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetLocaDoorLocklist(doorLock, accountObj); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | MidFrameLayoutContent(); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /// <summary>
|
| | | /// UI显示
|
| | | /// </summary> |
| | | public void Show() |
| | | { |
| | | this.TopFrameLayout(this, accountObj.Account); |
| | | string accountTitle = ""; |
| | | if (accountObj.UserName != null) |
| | | { |
| | | accountTitle = accountObj.UserName; |
| | | } |
| | | else |
| | | { |
| | | accountTitle = accountObj.Account; |
| | | } |
| | | this.TopFrameLayout(this, accountTitle); |
| | | |
| | | EventHandler<MouseEventArgs> eHandlerBack = (sender, e) => |
| | | { |
| | |
| | | this.btnBack.MouseUpEventHandler += eHandlerBack; |
| | | this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack; |
| | | this.MidFrameLayout(this); |
| | | |
| | | ReadDoorLockUserInfo(); |
| | | |
| | | MidFrameLayoutContent(); |
| | | } |
| | | |
| | | public void MidFrameLayoutContent() |
| | | { |
| | | var bodyView = new VerticalScrolViewLayout() |
| | | var bodyView = new VerticalRefreshLayout() |
| | | { |
| | | }; |
| | | this.midFrameLayout.AddChidren(bodyView); |
| | | bodyView.BeginHeaderRefreshingAction += async () => |
| | | { |
| | | bodyView.BeginHeaderRefreshing(); |
| | | await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockAllAcountUserlist(doorLock); |
| | | bodyView.EndHeaderRefreshing(); |
| | | }; |
| | | |
| | | for (int i = 0; i < 2; i++) |
| | | { |
| | | var RowView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(161), |
| | | Height = Application.GetRealHeight(127 + 23), |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | }; |
| | | bodyView.AddChidren(RowView); |
| | | |
| | |
| | | Y = Application.GetRealHeight(58), |
| | | Height = Application.GetRealHeight(58), |
| | | Width = Application.GetRealWidth(58), |
| | | UnSelectedImagePath = "Item/Next.png", |
| | | UnSelectedImagePath = "Item/RightNext.png", |
| | | SelectedImagePath = "Item/Down.png", |
| | | }; |
| | | RowView.AddChidren(btnRight); |
| | |
| | | else |
| | | { |
| | | btnMemberName.Text = Language.StringByID(R.MyInternationalizationString.LinkageEvent); |
| | | line2.Visible = false; |
| | | } |
| | | |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => |
| | |
| | | unLockMethod.Show(); |
| | | } |
| | | else |
| | | { |
| | | var userDoorLockPage = new UserDoorLockPage(doorLock, accountObj); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | {
|
| | | ///备注:WJC的
|
| | | ///记录当前用户信息
|
| | | Phone.Device.Logic.Send.UserMemberInfoRes = accountObj;
|
| | | Phone.Device.Logic.Send.CurrentDoorLock = doorLock;
|
| | | if (accountObj == null)
|
| | | {
|
| | | ///防止抛异常
|
| | | Phone.Device.Logic.Send.UserMemberInfoRes = new MemberInfoRes();
|
| | | }
|
| | | if (doorLock == null)
|
| | | {
|
| | | ///防止抛异常
|
| | | Phone.Device.Logic.Send.CurrentDoorLock = new ZigBee.Device.DoorLock();
|
| | | }
|
| | | ///进来刷新一次设备列表;
|
| | | Common.Logic.LogicDviceList.Clear();
|
| | | if (Common.Logic.LogicDviceList.Count == 0)
|
| | | {
|
| | | Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
|
| | | }
|
| | | var doorLockLogicList = new Phone.Device.Logic.DoorLockLogic.LockLogicList();
|
| | | UserView.HomePage.Instance.AddChidren(doorLockLogicList);
|
| | | UserView.HomePage.Instance.PageIndex += 1;
|
| | | doorLockLogicList.Show(); |
| | | } |
| | | }; |
| | | btnRight.MouseUpEventHandler += eHandler; |
| | | RowView.MouseUpEventHandler += eHandler; |
| | | RowView.MouseUpEventHandler += eHandler;
|
| | | btnMemberName.MouseUpEventHandler += eHandler; |
| | | } |
| | | } |
| | | |