From eda3fb873e59544ff36301b51e05aef64f87b0f9 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 27 八月 2021 13:21:21 +0800
Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into newBranch1

---
 HDL_ON/UI/UI2/4-PersonalCenter/GetSupport/FAQHelpPage.cs |  287 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 287 insertions(+), 0 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/GetSupport/FAQHelpPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/GetSupport/FAQHelpPage.cs
new file mode 100644
index 0000000..2ceb268
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/GetSupport/FAQHelpPage.cs
@@ -0,0 +1,287 @@
+锘縰sing System;
+using Shared;
+using HDL_ON.UI.CSS;
+
+namespace HDL_ON.UI
+{
+    /// <summary>
+    /// 鑾峰彇鏀寔-甯歌闂椤甸潰
+    /// </summary>
+    public class FAQHelpPage : FrameLayout
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        FrameLayout bodyView;
+        /// <summary>
+        /// 鎼滅储椤甸潰
+        /// </summary>
+        FrameLayout searchView;
+        /// <summary>
+        /// 鑿滃崟鎸夐挳
+        /// </summary>
+        Button btnMenu;
+        /// <summary>
+        /// 鐢佃瘽鎸夐挳
+        /// </summary>
+        Button btnTelephone;
+        /// <summary>
+        /// 鍙戦�佷俊鎭寜閽�
+        /// </summary>
+        Button btnSendMes;
+
+
+        /// <summary>
+        /// 鑿滃崟鎸夐挳鏄惁灞曞紑
+        /// </summary>
+        bool isbtnMenuOpen;
+
+        public FAQHelpPage()
+        {
+            bodyView = this;
+        }
+
+        public void LoadPage()
+        {
+            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+            new TopViewDiv(bodyView, Language.StringByID(StringId.GetSupport)).LoadTopView();
+
+            //鎼滅储鎸夐挳
+            searchView = new FrameLayout()
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(76),
+                Height = Application.GetRealHeight(28),
+                Width = Application.GetRealWidth(343),
+                Radius = (uint)Application.GetRealHeight(6),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+            };
+            bodyView.AddChidren(searchView);
+
+            ImageView searchImage = new ImageView()
+            {
+                Width = Application.GetRealWidth(20),
+                Height = Application.GetRealWidth(20),
+                Gravity = Gravity.Center,
+                ImagePath = "PersonalCenter/Support/Search.png"
+            };
+            searchView.AddChidren(searchImage);
+
+            #region Help
+            var helpView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(112),
+                Height = Application.GetRealHeight(208),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+
+            };
+            bodyView.AddChidren(helpView);
+
+            var helpTip = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(10),
+                Height = Application.GetRealHeight(28),
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                Width = Application.GetRealWidth(200),
+                TextID = StringId.WhatCanWeDoForYou
+            };
+            helpView.AddChidren(helpTip);
+
+            #region 鍔熻兘闂
+            var functionView = new ListIconCellView()
+            {
+                Y = Application.GetRealHeight(58),
+            };
+            helpView.AddChidren(functionView);
+            functionView.BtnTilte.TextID = StringId.FunctionalQuestion;
+            functionView.BtnIcon.UnSelectedImagePath = "PersonalCenter/Support/Function.png";
+
+            Action functionAction = () =>
+            {
+                OpenQuestionListPage(1);
+            };
+            functionView.GoAction = functionAction;
+            #endregion
+
+            #region 鍦烘櫙闂
+            var sceneView = new ListIconCellView()
+            {
+                Y = functionView.Bottom,
+            };
+            helpView.AddChidren(sceneView);
+            sceneView.BtnTilte.TextID = StringId.SceneQuestion;
+            sceneView.BtnIcon.UnSelectedImagePath = "PersonalCenter/Support/Scene.png";
+
+            Action sceneAction = () =>
+            {
+                OpenQuestionListPage(2);
+            };
+            sceneView.GoAction = functionAction;
+            #endregion
+
+            #region APP浣跨敤闂
+            var appUseView = new ListIconCellView()
+            {
+                Y = sceneView.Bottom,
+            };
+            helpView.AddChidren(appUseView);
+            appUseView.BtnTilte.TextID = StringId.AppUsageAssistance;
+            appUseView.BtnIcon.UnSelectedImagePath = "PersonalCenter/Support/Help.png";
+            appUseView.LineView.RemoveFromParent();
+
+            Action appUseAction = () =>
+            {
+                OpenQuestionListPage(3);
+            };
+            appUseView.GoAction = appUseAction;
+            #endregion
+            #endregion
+
+
+            #region question View
+            int qY = Application.GetRealHeight(328);
+            var questionView = new FrameLayout()
+            {
+                Y = qY,
+                Height = bodyView.Height - qY,
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+            };
+            bodyView.AddChidren(questionView);
+
+            var questionTitle = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(10),
+                Height = Application.GetRealHeight(28),
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                Width = Application.GetRealWidth(300),
+                Text = Language.StringByID(StringId.CommonQuestion) + ":"
+            };
+            questionView.AddChidren(questionTitle);
+            #endregion
+
+            #region 鍔熻兘鎸夐挳
+            btnMenu = new Button()
+            {
+                Y = Application.GetRealHeight(542),
+                X = Application.GetRealWidth(302),
+                Width = Application.GetRealWidth(58),
+                Height = Application.GetRealWidth(58),
+                UnSelectedImagePath = "PersonalCenter/Support/Menu.png",
+                SelectedImagePath = "PersonalCenter/Support/Close.png",
+            };
+            bodyView.AddChidren(btnMenu);
+
+            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+            {
+                isbtnMenuOpen = !isbtnMenuOpen;
+                SetMenuButtonState(isbtnMenuOpen);
+            };
+            btnMenu.MouseUpEventHandler = eventHandler;
+
+            btnTelephone = new Button()
+            {
+                Y = Application.GetRealHeight(494),
+                X = Application.GetRealWidth(274),
+                Width = Application.GetRealWidth(58),
+                Height = Application.GetRealWidth(58),
+                UnSelectedImagePath = "PersonalCenter/Support/Telephone.png",
+                Visible = false,
+            };
+            bodyView.AddChidren(btnTelephone);
+
+            btnTelephone.MouseUpEventHandler = (sender, e) =>
+            {
+                OpenGetSupportPage();
+            };
+
+            btnSendMes = new Button()
+            {
+                Y = Application.GetRealHeight(590),
+                X = Application.GetRealWidth(274),
+                Width = Application.GetRealWidth(58),
+                Height = Application.GetRealWidth(58),
+                UnSelectedImagePath = "PersonalCenter/Support/SendMessage.png",
+                Visible = false,
+            };
+            bodyView.AddChidren(btnSendMes);
+
+            btnSendMes.MouseUpEventHandler = (sender, e) =>
+            {
+                OpenGetSupportPage();
+            };
+
+            #endregion
+
+
+        }
+
+
+
+        /// <summary>
+        /// 鏄惁灞曞紑
+        /// </summary>
+        /// <param name="isOpen"></param>
+        void SetMenuButtonState(bool isOpen)
+        {
+            btnMenu.IsSelected = isOpen;
+            btnTelephone.Visible = isOpen;
+            btnSendMes.Visible = isOpen;
+
+
+            if (isOpen)
+            {
+                //灞曞紑
+
+            }
+            else
+            {
+                //鍏抽棴闅愯棌
+
+            }
+
+        }
+
+        /// <summary>
+        /// 鎵撳紑闂鍒楄〃椤甸潰
+        /// </summary>
+        /// <param name="questionType">1:鍔熻兘闂 2:鍦烘櫙闂 3:APP浣跨敤杈呭姪</param>
+        void OpenQuestionListPage(int questionType)
+        {
+            int titleId = 0;
+            if (questionType == 1)
+            {
+                titleId = StringId.FunctionalQuestion;
+            }
+            else if (questionType == 2)
+            {
+                titleId = StringId.SceneQuestion;
+            }
+            else if (questionType == 3)
+            {
+                titleId = StringId.AppUsageAssistance;
+            }
+
+            var mPage = new QuestionListPage();
+            MainPage.BasePageView.AddChidren(mPage);
+            mPage.LoadPage(titleId);
+            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+        }
+
+        /// <summary>
+        /// 鎵撳紑鑾峰彇鏀寔鐢佃瘽椤甸潰
+        /// </summary>
+        void OpenGetSupportPage()
+        {
+            var mPage = new GetSupportPage();
+            MainPage.BasePageView.AddChidren(mPage);
+            mPage.LoadPage();
+            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+        }
+    }
+}

--
Gitblit v1.8.0