| | |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor; |
| | | } |
| | | |
| | | #region ◆ 变量申明__________________________ |
| | | ZigBee.Device.DoorLock doorLock;//当前门锁 |
| | | VerticalListRefreshControl bodyView;//刷新View |
| | | Button currentMethod;// 当前选择的方式 |
| | | Shared.Phone.UserCenter.MemberInfoRes curAccountObj;//当前账户 |
| | | #region 变量申明 |
| | | /// <summary> |
| | | /// 当前门锁 |
| | | /// </summary> |
| | | ZigBee.Device.DoorLock doorLock; |
| | | /// <summary> |
| | | /// 刷新View |
| | | /// </summary> |
| | | VerticalListRefreshControl bodyView; |
| | | /// <summary> |
| | | /// 当前选择的方式 |
| | | /// </summary> |
| | | Button currentMethod; |
| | | /// <summary> |
| | | /// 当前账户 |
| | | /// </summary> |
| | | Shared.Phone.UserCenter.MemberInfoRes curAccountObj; |
| | | /// <summary> |
| | | /// 数据为空,UI显示的空图片 |
| | | /// </summary> |
| | | Button entryStatusPic; |
| | | /// <summary> |
| | | /// 数据为空,UI显示的文本提示 |
| | | /// </summary> |
| | | Button btnPicTip; |
| | | /// <summary> |
| | | /// 数据为空,UI显示的文本提示 |
| | | /// </summary> |
| | | Button btnPicTip1; |
| | | bool isSecondDel;//是否二次删除 |
| | | FrameLayout blankFrameLayout;//空数据显示布局 |
| | | /// <summary> |
| | | /// //是否二次删除 |
| | | /// </summary> |
| | | bool isSecondDel; |
| | | /// <summary> |
| | | /// 空数据显示布局 |
| | | /// </summary> |
| | | FrameLayout blankFrameLayout; |
| | | #endregion |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public void Show() |
| | | { |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | doorLock.currentUserDisplayMethod = ""; |
| | | this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.LockMethod)); |
| | | this.btnTitleLine.Visible = false; |
| | |
| | | RefreshList(); |
| | | } |
| | | } |
| | | //中部布局 |
| | | |
| | | /// <summary> |
| | | /// 中部布局 |
| | | /// </summary> |
| | | void MidFrameLayoutContent() |
| | | { |
| | | #region 开锁方式UI |
| | |
| | | TextSize = 12, |
| | | }; |
| | | blankFrameLayout.AddChidren(btnPicTip1); |
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 1) |
| | | { |
| | | btnPicTip1.Width = 0; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | } |
| | | |
| | | // 侧边导航栏 |
| | | /// <summary> |
| | | /// 侧边导航栏 |
| | | /// </summary> |
| | | void SideslipFramelayout() |
| | | { |
| | | #region sidelipFrameLayout UI |
| | | var dialog = new Dialog |
| | | { |
| | | }; |
| | |
| | | Y = Application.GetRealHeight(28), |
| | | }; |
| | | sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout); |
| | | #endregion |
| | | |
| | | Button oldbutton = null; |
| | | Button oldbuttonText = null; |
| | | for (var i = 0; i < 4; i++) |
| | | { |
| | | #region rowFrameLayout UI |
| | | var rowFrameLayout = new RowLayout() |
| | | { |
| | | Height = Application.GetRealHeight(150), |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | rowFrameLayout.AddChidren(btnMethodText); |
| | | #endregion |
| | | |
| | | #region 数据处理 |
| | | EventHandler<MouseEventArgs> hander = (sender, e) => |
| | | { |
| | | if (!btnAllMethod.IsSelected) |
| | |
| | | btnAllMethod.MouseUpEventHandler += hander; |
| | | btnMethodText.MouseUpEventHandler += hander; |
| | | |
| | | switch (i) |
| | | { |
| | | case 0: |
| | | btnAllMethod.UnSelectedImagePath = "DoorLock/AllMethod.png"; |
| | | btnAllMethod.SelectedImagePath = "DoorLock/AllMethodOn.png"; |
| | | btnMethodText.Text = Language.StringByID(R.MyInternationalizationString.AllMethod); |
| | | break; |
| | | case 1: |
| | | btnAllMethod.UnSelectedImagePath = "DoorLock/Password.png"; |
| | | btnAllMethod.SelectedImagePath = "DoorLock/PasswordOn.png"; |
| | | btnMethodText.Text = Language.StringByID(R.MyInternationalizationString.PasswordUnlock); |
| | | break; |
| | | case 2: |
| | | btnAllMethod.UnSelectedImagePath = "DoorLock/Fingerprint.png"; |
| | | btnAllMethod.SelectedImagePath = "DoorLock/FingerprintOn.png"; |
| | | btnMethodText.Text = Language.StringByID(R.MyInternationalizationString.FingerprintUnlock); |
| | | break; |
| | | case 3: |
| | | btnAllMethod.UnSelectedImagePath = "DoorLock/proximityCard.png"; |
| | | btnAllMethod.SelectedImagePath = "DoorLock/proximityCardOn.png"; |
| | | btnMethodText.Text = Language.StringByID(R.MyInternationalizationString.ProximithCardUnlock); |
| | | break; |
| | | } |
| | | DisplayAllUnlockMethod(i, btnAllMethod, btnMethodText); |
| | | |
| | | if (string.IsNullOrEmpty(doorLock.currentUserDisplayMethod) && i == 0) |
| | | { |
| | | btnAllMethod.IsSelected = true; |
| | | btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | btnMethodText.IsBold = true; |
| | | oldbutton = btnAllMethod; |
| | | oldbuttonText = btnMethodText; |
| | | CurrentSelectUnlockMethod(btnAllMethod, btnMethodText, oldbutton, oldbuttonText); |
| | | } |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.AllMethod) && i == 0) |
| | | { |
| | | btnAllMethod.IsSelected = true; |
| | | btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | btnMethodText.IsBold = true; |
| | | oldbutton = btnAllMethod; |
| | | oldbuttonText = btnMethodText; |
| | | CurrentSelectUnlockMethod(btnAllMethod, btnMethodText, oldbutton, oldbuttonText); |
| | | } |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.PasswordUnlock) && i == 1) |
| | | { |
| | | btnAllMethod.IsSelected = true; |
| | | btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | btnMethodText.IsBold = true; |
| | | oldbutton = btnAllMethod; |
| | | oldbuttonText = btnMethodText; |
| | | CurrentSelectUnlockMethod(btnAllMethod, btnMethodText, oldbutton, oldbuttonText); |
| | | } |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.FingerprintUnlock) && i == 2) |
| | | { |
| | | btnAllMethod.IsSelected = true; |
| | | btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | btnMethodText.IsBold = true; |
| | | oldbutton = btnAllMethod; |
| | | oldbuttonText = btnMethodText; |
| | | CurrentSelectUnlockMethod(btnAllMethod, btnMethodText, oldbutton, oldbuttonText); |
| | | } |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.ProximithCardUnlock) && i == 3) |
| | | { |
| | | btnAllMethod.IsSelected = true; |
| | | btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | btnMethodText.IsBold = true; |
| | | oldbutton = btnAllMethod; |
| | | oldbuttonText = btnMethodText; |
| | | CurrentSelectUnlockMethod(btnAllMethod, btnMethodText, oldbutton, oldbuttonText); |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | | |
| | | //类型区分 |
| | | /// <summary> |
| | | /// 类型区分 |
| | | /// </summary> |
| | | void TypeRefresh() |
| | | { |
| | | if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.PasswordUnlock)) |
| | |
| | | /// </summary> |
| | | public override void RemoveFromParent() |
| | | { |
| | | UserView.HomePage.Instance.ScrollEnabled = true; |
| | | ZbGateway.StatusList.Remove(this); |
| | | base.RemoveFromParent(); |
| | | } |