From fd1f19e8479c764fa28b0da3a2f9b34a3debe772 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 03 八月 2023 21:47:04 +0800
Subject: [PATCH] 2023年08月03日21:47:02

---
 HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs |   84 +++++++++++++++++++++++++++---------------
 1 files changed, 54 insertions(+), 30 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
index edf4f5d..66d07bd 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
@@ -48,8 +48,10 @@
         /// 鍒犻櫎璁惧鍚庨渶瑕佹洿鏂扮晫闈㈢殑鍥炶皟
         /// </summary>
         public Action action;
-
-        public IntType currnetIntType;
+        /// <summary>
+        /// 璁板綍褰撳墠璁惧
+        /// </summary>
+        public IntType currnetIntType= IntType.none;
 
         public VerticalScrolViewLayout vv;
         #endregion
@@ -179,20 +181,10 @@
             });
         }
         /// <summary>
-        /// 鍒囨崲鐣岄潰
-        ///1 = 鎾斁鍣�
-        ///2 = 鍔熸斁
-        ///3 = 鐢佃
-        ///4 = 鏈洪《鐩�
-        ///5 = 鎶曞奖浠�
-        ///6 = 涓囪兘閬ユ帶鍣�
+        /// 鍒囨崲鐣岄潰(1 = 鎾斁鍣�,2 = 鍔熸斁,3 = 鐢佃,4 = 鏈洪《鐩�,5 = 鎶曞奖浠�,6 = 涓囪兘閬ユ帶鍣�)
         /// </summary>
         private void SwitchUI(IntType type)
         {
-            if (vv != null)
-            {
-                vv.RemoveAll();
-            }
             if (this.currnetIntType == type)
             {
                 return;
@@ -200,6 +192,10 @@
             if (IntType.none == type)
             {
                 return;
+            }
+            if (vv != null)
+            {
+                vv.RemoveAll();
             }
             this.currnetIntType = type;
             switch (type)
@@ -215,37 +211,55 @@
                         };
                     }
                     break;
-                case IntType.HiFi: { } break;
-                case IntType.TV: { } break;
+                case IntType.HiFi: {
+                        GFPage gFPage = new GFPage();
+                        this.vv.AddChidren(gFPage);
+                        gFPage.Show();
+                        gFPage.action += (type) =>
+                        {
+                            SelectedType();
+                        };
+
+                    } break;
+                case IntType.TV: {
+
+                        TvPage tvPage = new TvPage();
+                        this.vv.AddChidren(tvPage);
+                        tvPage.Show();
+                        tvPage.action += (type) =>
+                        {
+                            SelectedType();
+                        };
+                    } break;
                 case IntType.STB: { } break;
-                case IntType.Projector: { } break;
+                case IntType.Projector: {
+                        TYYPage tYYPage = new TYYPage();
+                        this.vv.AddChidren(tYYPage);
+                        tYYPage.Show();
+                        tYYPage.action += (type) =>
+                        {
+                            SelectedType();
+                        };
+                    } break;
                 case IntType.Control: { } break;
 
             }
 
         }
         /// <summary>
-        /// 閫変腑绫诲瀷
-        ///1 = 鎾斁鍣�
-        ///2 = 鍔熸斁
-        ///3 = 鐢佃
-        ///4 = 鏈洪《鐩�
-        ///5 = 鎶曞奖浠�
-        ///6 = 涓囪兘閬ユ帶鍣�
+        /// 閫変腑绫诲瀷寮规(1 = 鎾斁鍣�,2 = 鍔熸斁,3 = 鐢佃,4 = 鏈洪《鐩�,5 = 鎶曞奖浠�,6 = 涓囪兘閬ユ帶鍣�)
         /// </summary>
-        /// <param name="button">鏄剧ず鏂囨湰</param>
         private void SelectedType()
         {
             var deviceTypeList = GetTypeDictionary().Values.ToList();
             ///涔嬪墠鐨勭姸鎬佹枃鏈�
-            string currCondition = Language.StringByID(StringId.bofangqi);
+            string ccurrnetDeviceStr= this.GetValueString(this.currnetIntType);
             PublicInterface conditionView = new PublicInterface();
-            conditionView.SingleSelectionShow(this, deviceTypeList, "璁惧閫夋嫨", currCondition
-               , (stateValue) =>
+            conditionView.SingleSelectionShow(this, deviceTypeList, "璁惧閫夋嫨", ccurrnetDeviceStr
+               , (valueStr) =>
                {
                    //鐣岄潰鏄剧ず閫変腑鍊�
-                   //button.Text = stateValue;
-                   var intType = this.GetKeyIntType(stateValue);
+                   var intType = this.GetKeyIntType(valueStr);
                    this.SwitchUI(intType);
 
                });
@@ -284,7 +298,7 @@
         }
 
         /// <summary>
-        /// 
+        /// 鍒濆鍖栧瓧鍏�
         /// </summary>
         /// <returns></returns>
         private Dictionary<IntType, string> GetTypeDictionary()
@@ -298,6 +312,11 @@
             dic.Add(IntType.Control, Language.StringByID(StringId.xuniyaokongqi));
             return dic;
         }
+        /// <summary>
+        /// 鑾峰彇璁惧
+        /// </summary>
+        /// <param name="value">(1 = 鎾斁鍣�,2 = 鍔熸斁,3 = 鐢佃,4 = 鏈洪《鐩�,5 = 鎶曞奖浠�,6 = 涓囪兘閬ユ帶鍣�)</param>
+        /// <returns></returns>
         private IntType GetKeyIntType(string value)
         {
             var dic = this.GetTypeDictionary();
@@ -310,6 +329,11 @@
             }
             return IntType.none;
         }
+        /// <summary>
+        /// 鑾峰彇璁惧鍚嶇О
+        /// </summary>
+        /// <param name="key">(1 = 鎾斁鍣�,2 = 鍔熸斁,3 = 鐢佃,4 = 鏈洪《鐩�,5 = 鎶曞奖浠�,6 = 涓囪兘閬ユ帶鍣�)</param>
+        /// <returns></returns>
         private string GetValueString(IntType key)
         {
             var dic = this.GetTypeDictionary();

--
Gitblit v1.8.0