mac
2024-07-25 3f6685c77beeb12baf840733fb890860f4c26e7c
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>
@@ -127,8 +128,10 @@
            {
                Y = topView.fLayout.Bottom,
                Height = Application.GetRealHeight(H_W.H - H_W.T_Height),
            };
            this.AddChidren(vv);
            //进来默认播放器界面
            //this.SwitchUI(IntType.Player);
        }
@@ -191,6 +194,7 @@
                {
                    this.remoteControlList = SendMethod.Current.GetRemoteControlLits(this.device.deviceId);
                    this.sequencerList = SendMethod.Current.GetSequencerLits(this.device.deviceId);
                    //TestData(this.remoteControlList);
                }
                catch { }
                finally
@@ -213,7 +217,7 @@
                                var type = (IntType)this.remoteControlList[this.indexValue].type;
                                this.SwitchUI(type);
                            }
                        }
                    });
@@ -324,13 +328,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 +349,7 @@
               });
        }
        public enum IntType
@@ -392,9 +402,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 +420,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 = "万能遥控器" });
        }
    }
}