From 0f2e0147e8990e913d16d99bc1b94fb6bc53abd7 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期四, 03 十二月 2020 15:35:42 +0800 Subject: [PATCH] 2020-12-03-1 --- HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/ComplaintsPage.cs | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 175 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/ComplaintsPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/ComplaintsPage.cs new file mode 100644 index 0000000..e17cc43 --- /dev/null +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/ComplaintsPage.cs @@ -0,0 +1,175 @@ +锘縰sing System; +using Shared; +using HDL_ON.UI.CSS; +using Xamarin.Essentials; + +namespace HDL_ON.UI +{ + /// <summary> + /// 鎶曡瘔椤甸潰 + /// </summary> + public class ComplaintsPage : FrameLayout + { + FrameLayout bodyView; + + /// <summary> + /// 褰撳墠 + /// </summary> + VerticalScrolViewLayout bodyScrolView; + + public ComplaintsPage() + { + bodyView = this; + BackgroundColor = CSS_Color.MainBackgroundColor; + } + + public void LoadPage() + { + new TopViewDiv(bodyView, Language.StringByID(StringId.Complaints)).LoadTopView(); + + int bodyY = Application.GetRealHeight(64); + bodyScrolView = new VerticalScrolViewLayout() + { + Y = bodyY, + Height = bodyView.Height - bodyY, + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + + #region 鎶曡瘔鑱旂郴 + FrameLayout phoneRow = new FrameLayout() + { + Y = Application.GetRealHeight(64), + Height = Application.GetRealHeight(50), + }; + bodyView.AddChidren(phoneRow); + + Button btnPhoneTitle = new Button() + { + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(48), + TextID = StringId.Telephone, + TextSize = CSS_FontSize.SubheadingFontSize, + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + }; + phoneRow.AddChidren(btnPhoneTitle); + + Button btnPhoneText = new Button() + { + X = btnPhoneTitle.Right, + Width = Application.GetRealWidth(200), + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.TextFontSize, + TextColor = CSS_Color.FirstLevelTitleColor, + Text = "400 855 8535", + }; + phoneRow.AddChidren(btnPhoneText); + /// <summary> + /// 鍓嶈繘鍥炬爣 + /// </summary> + var btnImage = new Button() + { + X = Application.GetRealWidth(339), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/Right.png", + }; + phoneRow.AddChidren(btnImage); + phoneRow.AddChidren(new Button() { X = Application.GetRealWidth(16), Y = Application.GetRealWidth(49), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor }); + + EventHandler<MouseEventArgs> eventHandler = (sender, e) => + { + PhoneDialer.Open(Constant.SUPPORT_TELEPHONENUMBER); + }; + + phoneRow.MouseUpEventHandler = eventHandler; + btnPhoneText.MouseUpEventHandler = eventHandler; + btnImage.MouseUpEventHandler = eventHandler; + #endregion + + #region 鑱旂郴閭 + FrameLayout emailRow = new FrameLayout() + { + Y = phoneRow.Bottom, + Height = Application.GetRealHeight(54), + }; + bodyView.AddChidren(emailRow); + + Button btnEmailTitle = new Button() + { + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(48), + TextID = StringId.Email_, + TextSize = CSS_FontSize.SubheadingFontSize, + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + }; + emailRow.AddChidren(btnEmailTitle); + + Button btnEmailText = new Button() + { + X = btnEmailTitle.Right, + Y = Application.GetRealHeight(8), + Height = Application.GetRealHeight(20), + Width = Application.GetRealWidth(200), + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.TextFontSize, + TextColor = CSS_Color.FirstLevelTitleColor, + Text = Constant.SUPPORT_EMAIL, + }; + emailRow.AddChidren(btnEmailText); + + Button btnEmailTipText = new Button() + { + X = btnEmailTitle.Right, + Y = btnEmailText.Bottom + Application.GetRealHeight(4), + Height = Application.GetRealHeight(20), + Width = Application.GetRealWidth(200), + TextAlignment = TextAlignment.TopLeft, + TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, + TextColor = CSS_Color.PromptingColor1, + TextID = StringId.WillGivePriorityToTheTreatmen, + }; + emailRow.AddChidren(btnEmailTipText); + /// <summary> + /// 鍓嶈繘鍥炬爣 + /// </summary> + var btnImage2 = new Button() + { + X = Application.GetRealWidth(339), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/Right.png", + }; + emailRow.AddChidren(btnImage2); + + emailRow.AddChidren(new Button() { X = Application.GetRealWidth(16), Y = emailRow.Height - Application.GetRealHeight(1), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor }); + + EventHandler<MouseEventArgs> eventHandler2 = (sender, e) => + { + CopyToClipboard(Constant.SUPPORT_EMAIL); + }; + + emailRow.MouseUpEventHandler = eventHandler2; + btnEmailText.MouseUpEventHandler = eventHandler2; + btnImage2.MouseUpEventHandler = eventHandler2; + #endregion + } + + + + /// <summary> + /// 澶嶅埗鍒板壀鍒囨澘 + /// </summary> + /// <param name="text"></param> + void CopyToClipboard(string text) + { + Clipboard.SetTextAsync(text); + Utlis.ShowTip(text + "\n" + Language.StringByID(StringId.CopySuccess)); + } + + } + +} -- Gitblit v1.8.0