| | |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | using HDL_ON.UI.UI2.Intelligence.Automation; |
| | | using System.Linq; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks |
| | | { |
| | |
| | | public class AksPage : FrameLayout |
| | | { |
| | | #region ■ 变量声明___________________________ |
| | | /// <summary> |
| | | /// 遥控器列表 |
| | | /// </summary> |
| | | private List<RemoteControlEntity> remoteControlList; |
| | | /// <summary> |
| | | /// 设备 |
| | | /// </summary> |
| | |
| | | /// 记录当前设备 |
| | | /// </summary> |
| | | public IntType currnetIntType= IntType.none; |
| | | |
| | | |
| | | |
| | | public VerticalScrolViewLayout vv; |
| | | #endregion |
| | |
| | | }; |
| | | this.AddChidren(vv); |
| | | //进来默认播放器界面 |
| | | this.SwitchUI(IntType.Player); |
| | | //this.SwitchUI(IntType.Player); |
| | | } |
| | | /// <summary> |
| | | /// 注册事件 |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | this.remoteControlList = SendMethod.Current.GetRemoteControlLits(this.device.deviceId); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | CommonMethod.Current.Loading.Hide(); |
| | | |
| | | if (this.remoteControlList.Count > 0) |
| | | { |
| | | if (string.IsNullOrEmpty(this.GetValueString(IntType.Player))) |
| | | { |
| | | //默认取第一位 |
| | | this.SwitchUI((IntType)this.remoteControlList[0].type); |
| | | } |
| | | else |
| | | { |
| | | //有播放类型遥控器优先显示 |
| | | this.SwitchUI(IntType.Player); |
| | | } |
| | | } |
| | | |
| | | }); |
| | | } |
| | | }); |
| | |
| | | { |
| | | return; |
| | | } |
| | | if (vv != null) |
| | | if (this.vv == null) |
| | | { |
| | | vv.RemoveAll(); |
| | | return; |
| | | } |
| | | this.vv.RemoveAll(); |
| | | this.currnetIntType = type; |
| | | switch (type) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | private Dictionary<IntType, string> GetTypeDictionary() |
| | | { |
| | | if (this.remoteControlList == null || this.remoteControlList.Count == 0) |
| | | { |
| | | return new Dictionary<IntType, string>(); |
| | | } |
| | | var dic = new Dictionary<IntType, string>(); |
| | | dic.Add(IntType.Player, Language.StringByID(StringId.bofangqi)); |
| | | dic.Add(IntType.HiFi, Language.StringByID(StringId.gongfan)); |
| | | dic.Add(IntType.TV, Language.StringByID(StringId.dianshi)); |
| | | dic.Add(IntType.STB, Language.StringByID(StringId.jidinghe)); |
| | | dic.Add(IntType.Projector, Language.StringByID(StringId.touyingyi)); |
| | | dic.Add(IntType.Control, Language.StringByID(StringId.xuniyaokongqi)); |
| | | foreach (var o in this.remoteControlList) |
| | | { |
| | | switch (o.type) |
| | | { |
| | | case (int)IntType.Player: |
| | | { |
| | | dic.Add(IntType.Player, Language.StringByID(StringId.bofangqi)); |
| | | } |
| | | break; |
| | | case (int)IntType.HiFi: |
| | | { |
| | | dic.Add(IntType.HiFi, Language.StringByID(StringId.gongfan)); |
| | | } |
| | | break; |
| | | case (int)IntType.TV: |
| | | { |
| | | dic.Add(IntType.TV, Language.StringByID(StringId.dianshi)); |
| | | } |
| | | break; |
| | | |
| | | case (int)IntType.STB: |
| | | { |
| | | dic.Add(IntType.STB, Language.StringByID(StringId.jidinghe)); |
| | | } |
| | | break; |
| | | case (int)IntType.Projector: |
| | | { |
| | | dic.Add(IntType.Projector, Language.StringByID(StringId.touyingyi)); |
| | | } |
| | | break; |
| | | case (int)IntType.Control: |
| | | { |
| | | dic.Add(IntType.Control, Language.StringByID(StringId.xuniyaokongqi)); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | return dic; |
| | | } |
| | | /// <summary> |