From 5ec581e5d37b108fc9d59e89afd8e94e21b32080 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期二, 17 十月 2023 17:33:36 +0800
Subject: [PATCH] 2023年10月17日17:33:33

---
 HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs |   35 +++++++++++++++++++++++++++--------
 1 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
index 1642d9c..e0333ce 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
@@ -11,6 +11,7 @@
 using System.Linq;
 using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity;
 using System.Reflection;
+using System.Collections;
 
 namespace HDL_ON.UI.UI2.FuntionControlView.Aks
 {
@@ -64,7 +65,7 @@
         /// <summary>
         /// 璁板綍褰撳墠璁惧
         /// </summary>
-        public IntType currnetIntType= IntType.none;
+        public IntType currnetIntType = IntType.none;
         /// <summary>
         /// 璁板綍褰撳墠閫夋嫨鐨勭储寮曞��
         /// </summary>
@@ -191,6 +192,7 @@
                 {
                     this.remoteControlList = SendMethod.Current.GetRemoteControlLits(this.device.deviceId);
                     this.sequencerList = SendMethod.Current.GetSequencerLits(this.device.deviceId);
+                    //TestData(this.remoteControlList);
                 }
                 catch { }
                 finally
@@ -213,7 +215,7 @@
                                 var type = (IntType)this.remoteControlList[this.indexValue].type;
                                 this.SwitchUI(type);
                             }
-                           
+
                         }
 
                     });
@@ -324,13 +326,19 @@
             var deviceTypeList = GetRemoteControlList();
             ///涔嬪墠鐨勭姸鎬佹枃鏈�
             string ccurrnetDeviceStr = "";
-            if (indexValue!=-1&& indexValue< deviceTypeList.Count) {
-                ccurrnetDeviceStr= deviceTypeList[indexValue].name;
+            if (indexValue != -1 && indexValue < deviceTypeList.Count)
+            {
+                ccurrnetDeviceStr = deviceTypeList[indexValue].name;
             }
             PublicInterface conditionView = new PublicInterface();
-            conditionView.SingleSelectionShow(this, deviceTypeList,"璁惧閫夋嫨", ccurrnetDeviceStr
+            conditionView.SingleSelectionShow(this, deviceTypeList, "璁惧閫夋嫨", ccurrnetDeviceStr
                , (index) =>
                {
+                   if (this.indexValue == index)
+                   {
+                       //鍚屼竴涓澶囦笉澶勭悊;
+                       return;
+                   }
                    var remoteControl = deviceTypeList[index];
                    this.indexValue = index;
                    this.currnetIntType = (IntType)remoteControl.type;
@@ -339,7 +347,7 @@
                });
         }
 
-       
+
 
 
         public enum IntType
@@ -392,9 +400,9 @@
         /// </summary>
         /// <param name="type">(1 = 鎾斁鍣�,2 = 鍔熸斁,3 = 鐢佃,4 = 鏈洪《鐩�,5 = 鎶曞奖浠�,6 = 涓囪兘閬ユ帶鍣�)</param>
         /// <returns></returns>
-        private bool isExistType(IntType type)  
+        private bool isExistType(IntType type)
         {
-          
+
             var remoteControls = this.GetRemoteControlList();
             for (int i = 0; i < remoteControls.Count; i++)
             {
@@ -410,5 +418,16 @@
         }
 
 
+        private void TestData(List<RemoteControlEntity> list)
+        {
+            list.Add(new RemoteControlEntity { deviceId = "33331", rcId = "1", type = 1, name = "鎾斁鍣�" });
+            list.Add(new RemoteControlEntity { deviceId = "33332", rcId = "2", type = 2, name = "鍔熸斁" });
+            list.Add(new RemoteControlEntity { deviceId = "33333", rcId = "3", type = 3, name = "鐢佃" });
+            list.Add(new RemoteControlEntity { deviceId = "33334", rcId = "4", type = 4, name = "鏈洪《鐩�" });
+            list.Add(new RemoteControlEntity { deviceId = "33335", rcId = "5", type = 5, name = "鎶曞奖浠�" });
+            list.Add(new RemoteControlEntity { deviceId = "33336", rcId = "6", type = 6, name = "涓囪兘閬ユ帶鍣�" });
+        }
+
+
     }
 }

--
Gitblit v1.8.0