From ae86b09b30621e1a8512c6bcdd7e22e9c67a5402 Mon Sep 17 00:00:00 2001 From: lss <lsc@hdlchina.com.cn> Date: 星期二, 17 五月 2022 14:02:06 +0800 Subject: [PATCH] Merge branch 'dev' into lss --- HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs | 206 +++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 148 insertions(+), 58 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs index e511612..3e639fb 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs @@ -3,6 +3,7 @@ using HDL_ON.UI; using HDL_ON.UI.CSS; using Shared; +using Foundation; namespace HDL_ON.UI { @@ -174,6 +175,17 @@ Button btnFaceManagementText; #endregion + #region 涓汉閫夐」-璁垮绠$悊 + /// <summary> + /// 涓汉閫夐」-璁垮绠$悊 + /// + /// </summary> + FrameLayout visitorManagementView; + /// <summary> + /// 浜鸿劯閫氳绠$悊鏂囨湰isitor + /// </summary> + Button btnisitorVManagementText; + #endregion #endregion @@ -183,10 +195,10 @@ /// <summary> /// 瑙i攣璁剧疆鍖哄煙 /// </summary> - FrameLayout interpretationSettingsView; - Button btnInterpretationSettingsTitle; - Button btnInterpretationSettingsTip; - Button btnInterpretationSettingsRight; + //FrameLayout interpretationSettingsView; + //Button btnInterpretationSettingsTitle; + //Button btnInterpretationSettingsTip; + //Button btnInterpretationSettingsRight; #endregion /// <summary> @@ -266,10 +278,21 @@ }; bodyScrolView.AddChidren(optionListView); + //鏍规嵁闇�瑕佹坊鍔犺 + int addRow = 0; if(Entity.DB_ResidenceData.Instance.SupportFacePass) { - optionListView.Height = Application.GetRealHeight(51 * (6 + 1)); + addRow += 1; } + + if (Entity.DB_ResidenceData.Instance.SupportVisitorManage) + { + addRow += 1; + } + + //鏈夊叏瑙嗛�氱殑鎯呭喌 + optionListView.Height = Application.GetRealHeight(51 * (6 + addRow)); + #region 涓汉閫夐」-鍚嶅瓧鍖哄煙 /// <summary> @@ -560,7 +583,7 @@ btnAddResidenceText.MouseUpEventHandler = (sender, e) => { - Scan.OpenScan((scanString) => + Scan.Ins.OpenScan((scanString) => { if (string.IsNullOrEmpty(scanString)) { @@ -678,66 +701,113 @@ } - #endregion + //璁垮绠$悊 + #region 涓汉閫夐」-璁垮绠$悊 + if (!Entity.DB_ResidenceData.Instance.SupportVisitorManage)//鍒ゆ柇鏄惁鏀寔璁垮绠$悊 + { + optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); - #region 瑙i攣璁剧疆鍖哄煙 + visitorManagementView = new FrameLayout() + { + Height = Application.GetRealHeight(50), + }; + optionListView.AddChidren(visitorManagementView); + + + var btnVisitorManagementRight = new Button() + { + X = Application.GetRealWidth(339), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/Right.png", + }; + visitorManagementView.AddChidren(btnVisitorManagementRight); + + btnisitorVManagementText = new Button() + { + X = Application.GetRealWidth(16), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = StringId.VisitorManage, + }; + visitorManagementView.AddChidren(btnisitorVManagementText); + + btnisitorVManagementText.MouseUpEventHandler = (sender, e) => + { +#if __IOS__ + //鍒锋柊鎺ュ彛璇锋眰鎵�闇�瑕佺殑鍙傛暟 + NSDictionary info = new NSDictionary("regionUrl", HttpUtil.GlobalRequestHttpsHost, "token", UserInfo.Current.LoginTokenString, "appkey", "HDL-HOME-APP-TEST", "secret", "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss", "refreshToken", UserInfo.Current.RefreshToken); + Shared.IOS.HDLFVSDK.Video.RefreshInfo(info); + //璺宠浆璁垮绠$悊鐣岄潰 + Shared.IOS.HDLFVSDK.Video.ShowVisitorManager(); +#endif + }; + } + + +#endregion +#endregion var topPaddingView2 = new FrameLayout() { Height = Application.GetRealHeight(8) }; bodyScrolView.AddChidren(topPaddingView2); - /// <summary> - /// 瑙i攣璁剧疆鍖哄煙 - /// </summary> - interpretationSettingsView = new FrameLayout() - { - BackgroundColor = CSS_Color.MainBackgroundColor, - Height = Application.GetRealHeight(70), - }; - bodyScrolView.AddChidren(interpretationSettingsView); - if(Language.CurrentLanguage != "Chinese") - { - interpretationSettingsView.Height = Application.GetRealHeight(80); - } - btnInterpretationSettingsTitle = new Button() - { - X = Application.GetRealWidth(16), - Height = Application.GetRealHeight(32), - TextAlignment = TextAlignment.BottomLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.SubheadingFontSize, - TextID = StringId.InterpretationSettings, - }; - interpretationSettingsView.AddChidren(btnInterpretationSettingsTitle); +#region 瑙i攣璁剧疆鍖哄煙 + ///// <summary> + ///// 瑙i攣璁剧疆鍖哄煙 + ///// </summary> + //interpretationSettingsView = new FrameLayout() + //{ + // BackgroundColor = CSS_Color.MainBackgroundColor, + // Height = Application.GetRealHeight(70), + //}; + //bodyScrolView.AddChidren(interpretationSettingsView); + //if(Language.CurrentLanguage != "Chinese") + //{ + // interpretationSettingsView.Height = Application.GetRealHeight(80); + //} - btnInterpretationSettingsTip = new Button() - { - X = Application.GetRealWidth(16), - Y = btnInterpretationSettingsTitle.Bottom, - Height = Application.GetRealHeight(32), - Width = Application.GetRealWidth(310), - TextAlignment = TextAlignment.TopLeft, - TextColor = CSS_Color.PromptingColor1, - TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.AppUnlockSettingsTip, - IsMoreLines = true, - }; - interpretationSettingsView.AddChidren(btnInterpretationSettingsTip); + //btnInterpretationSettingsTitle = new Button() + //{ + // X = Application.GetRealWidth(16), + // Height = Application.GetRealHeight(32), + // TextAlignment = TextAlignment.BottomLeft, + // TextColor = CSS_Color.FirstLevelTitleColor, + // TextSize = CSS_FontSize.SubheadingFontSize, + // TextID = StringId.InterpretationSettings, + //}; + //interpretationSettingsView.AddChidren(btnInterpretationSettingsTitle); - btnInterpretationSettingsRight = new Button() - { - X = Application.GetRealWidth(339), - Gravity = Gravity.CenterVertical, - Width = Application.GetMinRealAverage(16), - Height = Application.GetMinRealAverage(16), - UnSelectedImagePath = "Public/Right.png", - }; - interpretationSettingsView.AddChidren(btnInterpretationSettingsRight); - interpretationSettingsView.AddChidren(new LineView(interpretationSettingsView.Height)); - #endregion + //btnInterpretationSettingsTip = new Button() + //{ + // X = Application.GetRealWidth(16), + // Y = btnInterpretationSettingsTitle.Bottom, + // Height = Application.GetRealHeight(32), + // Width = Application.GetRealWidth(310), + // TextAlignment = TextAlignment.TopLeft, + // TextColor = CSS_Color.PromptingColor1, + // TextSize = CSS_FontSize.TextFontSize, + // TextID = StringId.AppUnlockSettingsTip, + // IsMoreLines = true, + //}; + //interpretationSettingsView.AddChidren(btnInterpretationSettingsTip); - #region 鏈嶅姟鍣ㄤ俊鎭� + //btnInterpretationSettingsRight = new Button() + //{ + // X = Application.GetRealWidth(339), + // Gravity = Gravity.CenterVertical, + // Width = Application.GetMinRealAverage(16), + // Height = Application.GetMinRealAverage(16), + // UnSelectedImagePath = "Public/Right.png", + //}; + //interpretationSettingsView.AddChidren(btnInterpretationSettingsRight); + //interpretationSettingsView.AddChidren(new LineView(interpretationSettingsView.Height)); +#endregion + +#region 鏈嶅姟鍣ㄤ俊鎭� ListCellView myServerInfoCellView = new ListCellView() { }; @@ -752,9 +822,29 @@ }; myServerInfoCellView.GoAction = selectAction; myServerInfoCellView.BtnTilte.Text = Language.StringByID(StringId.ServerInformation); - myServerInfoCellView.LineView.RemoveFromParent(); + //myServerInfoCellView.LineView.RemoveFromParent(); - #endregion +#endregion + + +#region 娉ㄩ攢璐﹀彿 + ListCellView logOffView = new ListCellView() + { + }; + bodyScrolView.AddChidren(logOffView); + //娉ㄩ攢璐﹀彿鐣岄潰 + Action logOffAction = () => + { + var myServerInfoPage = new CancelAccountPage(); + MainPage.BasePageView.AddChidren(myServerInfoPage); + myServerInfoPage.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + logOffView.GoAction = logOffAction; + logOffView.BtnTilte.Text = Language.StringByID(StringId.CancelAccount); + logOffView.LineView.RemoveFromParent(); + +#endregion btnLogout = new Button() { -- Gitblit v1.8.0