| | |
| | | <AndroidAsset Include="Assets\Phone\AksIcon\ykq_qian_selected.png" /> |
| | | <AndroidAsset Include="Assets\Phone\AksIcon\ykq_right_selected.png" /> |
| | | <AndroidAsset Include="Assets\Phone\AksIcon\ykq_hou_selected.png" /> |
| | | <AndroidAsset Include="Assets\Phone\AksIcon\hdmi.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidResource Include="Resources\values\colors.xml" /> |
| | |
| | | FunctionList.List.ClearDatas(); |
| | | //MainPage.Log($"============设备============开始" + FunctionList.List.Functions.Count); |
| | | //MainPage.Log($"读取设备信息成功"); |
| | | MainPage.Log($"sid列表获取====" + deviceResult.Data.ToString()); |
| | | MainPage.Log($"sid列表获取====\r\n" , deviceResult.Data.ToString()); |
| | | var deviceList = JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); |
| | | if (deviceList == null) |
| | | { |
| | |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm |
| | | //const string APP_KEY = "CPEVRLRT"; |
| | | //const string SECRET_KEY = "CPEVRLSJCPEVRLSZ"; |
| | | |
| | | public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//开发环境 |
| | | //const string APP_KEY = "CPEVRLRT";//开发环境APP_KEY |
| | | //const string SECRET_KEY = "CPEVRLSJCPEVRLSZ";//开发环境SECRET_KEY |
| | | /// <summary> |
| | | /// RegionMark |
| | | /// </summary> |
| | |
| | | /// <returns></returns> |
| | | public List<Function> GetVideoControlsList() |
| | | { |
| | | var spkList = SPK.GetVideoDoorLockSPKList(); |
| | | var spkList = SPK.GetVideoControlsSPKList(); |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | |
| | |
| | | using System.Collections.Generic; |
| | | using Shared; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks |
| | | { |
| | | /// <summary> |
| | |
| | | { |
| | | var list = FunctionList.List.GetVideoControlsList(); |
| | | #if DEBUG |
| | | list.Add(new Function { name = "影音中控屏一", sid = "11111111", spk = SPK.AvZkAiks }); |
| | | list.Add(new Function { name = "影音中控屏二", sid = "22222222", spk = SPK.AvZkAiks }); |
| | | //list.Add(new Function { name = "影音中控屏一", sid = "11111111", spk = SPK.AvZkAiks }); |
| | | //list.Add(new Function { name = "影音中控屏二", sid = "22222222", spk = SPK.AvZkAiks }); |
| | | #endif |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取【音乐】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetMusicKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "on", name = "开", localIconAddress = $"{aksIcon}kai" }); |
| | | keypads.Add(new KeypadEntity { keypad = "off", name = "关", localIconAddress = $"{aksIcon}guan" }); |
| | | keypads.Add(new KeypadEntity { keypad = "menu", name = "菜单", localIconAddress = $"{aksIcon}caidan" }); |
| | | keypads.Add(new KeypadEntity { keypad = "return", name = "返回", localIconAddress = $"{aksIcon}fanhui" }); |
| | | keypads.Add(new KeypadEntity { keypad = "sound_channel", name = "声道", localIconAddress = $"{aksIcon}shengdao" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_up", name = "音量+", localIconAddress = $"{aksIcon}yinliangjia" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_down", name = "音量-", localIconAddress = $"{aksIcon}yinliangjian" }); |
| | | keypads.Add(new KeypadEntity { keypad = "mute", name = "静音", localIconAddress = $"{aksIcon}jingyin" }); |
| | | keypads.Add(new KeypadEntity { keypad = "part_up", name = "上一部", localIconAddress = $"{aksIcon}shangyibu" }); |
| | | keypads.Add(new KeypadEntity { keypad = "part_down", name = "下一部", localIconAddress = $"{aksIcon}xiayibu" }); |
| | | keypads.Add(new KeypadEntity { keypad = "fast_rewind", name = "快退", localIconAddress = $"{aksIcon}kuaitui" }); |
| | | keypads.Add(new KeypadEntity { keypad = "fast_forward", name = "快进", localIconAddress = $"{aksIcon}kuaijin" }); |
| | | keypads.Add(new KeypadEntity { keypad = "stop", name = "停止", localIconAddress = $"{aksIcon}tingzhi" }); |
| | | keypads.Add(new KeypadEntity { keypad = "pause", name = "暂停", localIconAddress = $"{aksIcon}zanting" }); |
| | | keypads.Add(new KeypadEntity { keypad = "play", name = "播放", localIconAddress = $"{aksIcon}bofang" }); |
| | | keypads.Add(new KeypadEntity { keypad = "in_out_warehouse", name = "进出仓", localIconAddress = $"{aksIcon}jinchucang" }); |
| | | keypads.Add(new KeypadEntity { keypad = "subtitle", name = "字幕", localIconAddress = $"{aksIcon}zimu" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_up", name = "上", localIconAddress = $"{aksIcon}shang" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_down", name = "下", localIconAddress = $"{aksIcon}xia" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_left", name = "左", localIconAddress = $"{aksIcon}zuo" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_right", name = "右", localIconAddress = $"{aksIcon}you" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_ok", name = "确认", localIconAddress = $"{aksIcon}ok" }); |
| | | return keypads; |
| | | } |
| | | /// <summary> |
| | | /// 获取【功放】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetGFKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "on", name = "开", localIconAddress = $"{aksIcon}kai" }); |
| | | keypads.Add(new KeypadEntity { keypad = "off", name = "关", localIconAddress = $"{aksIcon}guan" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_up", name = "音量+", localIconAddress = $"{aksIcon}yinliangjia" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_down", name = "音量-", localIconAddress = $"{aksIcon}yinliangjian" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_2", name = "HDMI 2", localIconAddress = $"{aksIcon}hdmi" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_3", name = "HDMI 3", localIconAddress = $"{aksIcon}hdmi" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_4", name = "HDMI 4", localIconAddress = $"{aksIcon}hdmi" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_1", name = "自定义按键1", localIconAddress = $"{aksIcon}zdyanjian" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_2", name = "自定义按键2", localIconAddress = $"{aksIcon}zdyanjian" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_3", name = "自定义按键3", localIconAddress = $"{aksIcon}zdyanjian" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_4", name = "自定义按键4", localIconAddress = $"{aksIcon}zdyanjian" }); |
| | | return keypads; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取【投影仪】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetTYYKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "on", name = "开", localIconAddress = $"{aksIcon}kai" }); |
| | | keypads.Add(new KeypadEntity { keypad = "off", name = "关", localIconAddress = $"{aksIcon}guan" }); |
| | | keypads.Add(new KeypadEntity { keypad = "signal_source", name = "信号源", localIconAddress = $"{aksIcon}xinhaoyuan" }); |
| | | keypads.Add(new KeypadEntity { keypad = "curtain_up", name = "幕布升", localIconAddress = $"{aksIcon}mubusheng" }); |
| | | keypads.Add(new KeypadEntity { keypad = "curtain_down", name = "幕布降", localIconAddress = $"{aksIcon}mubujiang.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_2", name = "HDMI 2", localIconAddress = $"{aksIcon}hdmi" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_3", name = "HDMI 3", localIconAddress = $"{aksIcon}hdmi" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_4", name = "HDMI 4", localIconAddress = $"{aksIcon}hdmi" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_up", name = "音量+", localIconAddress = $"{aksIcon}yinliangjia" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_down", name = "音量-", localIconAddress = $"{aksIcon}yinliangjian" }); |
| | | keypads.Add(new KeypadEntity { keypad = "menu", name = "菜单", localIconAddress = $"{aksIcon}caidan" }); |
| | | keypads.Add(new KeypadEntity { keypad = "return", name = "返回", localIconAddress = $"{aksIcon}fanhui" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_1", name = "自定义按键1", localIconAddress = $"{aksIcon}zdyanjian" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_2", name = "自定义按键2", localIconAddress = $"{aksIcon}zdyanjian" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_3", name = "自定义按键3", localIconAddress = $"{aksIcon}zdyanjian" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_4", name = "自定义按键4", localIconAddress = $"{aksIcon}zdyanjian" }); |
| | | return keypads; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取【数字】按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetNumberKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | keypads.Add(new KeypadEntity { keypad = "number_1", name = "1" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_2", name = "2" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_3", name = "3" }); |
| | | keypads.Add(new KeypadEntity { keypad = "ch_up", name = Language.StringByID(StringId.pindaojia) }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_4", name = "4" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_5", name = "5" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_6", name = "6" }); |
| | | keypads.Add(new KeypadEntity { keypad = "ch_down", name = Language.StringByID(StringId.pindaojian) }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_7", name = "7" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_8", name = "8" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_9", name = "9" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_continuous", name = "-/--" }); |
| | | keypads.Add(new KeypadEntity { keypad = "none", name = "" });//这个是为了占位置 |
| | | keypads.Add(new KeypadEntity { keypad = "number_0", name = "0" }); |
| | | return keypads; |
| | | } |
| | | } |
| | | } |
| | |
| | | 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> |
| | |
| | | CornerFramLayout imageFLayout = new CornerFramLayout(343, 20 * 168, 0); |
| | | vv.AddChidren(imageFLayout); |
| | | imageFLayout.X = Application.GetRealWidth(16); |
| | | imageFLayout.SetList(imageFLayout.GetTestList(20)); |
| | | imageFLayout.LoadImagePage(); |
| | | imageFLayout.LoadImagePage(new List<Entity.KeypadEntity>()); |
| | | imageFLayout.selectAction += (index) => |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | |
| | | using HDL_ON.UI.Music; |
| | | using Shared; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView |
| | | { |
| | |
| | | /// 一行几个元素 |
| | | /// </summary> |
| | | private int mRowNumber; |
| | | /// <summary> |
| | | /// 列表最大值 |
| | | /// </summary> |
| | | private int mListCount; |
| | | |
| | | private List<string> mList; |
| | | |
| | | public Action<string> selectAction = null; |
| | | public Action<KeypadEntity> selectAction = null; |
| | | /// <summary> |
| | | /// 当前选择的索引(内部使用) |
| | | /// </summary> |
| | |
| | | this.rightMargin = right; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置列表数据(请在初始化完成之前调用) |
| | | /// </summary> |
| | | /// <param name="list"></param> |
| | | public void SetList(List<string> list) |
| | | { |
| | | if (list == null) |
| | | { |
| | | list = new List<string>(); |
| | | } |
| | | this.mList = list; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取测试列表数据 |
| | | /// </summary> |
| | | public List<string> GetTestList(int count) |
| | | public List<KeypadEntity> GetTestList() |
| | | { |
| | | var list = new List<string>(); |
| | | for (int i = 1; i <= count; i++) |
| | | { |
| | | if (i % 2 == 0) |
| | | { |
| | | list.Add("你好傻哦!"); |
| | | } |
| | | else |
| | | { |
| | | list.Add("真的是这样的吗?"); |
| | | } |
| | | } |
| | | return list; |
| | | return AksCommonMethod.Current.GetTYYKeypadList(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 动态加载按键界面 |
| | | /// </summary> |
| | | /// <param name="mList">列表</param> |
| | | /// <param name="mRowNumber">一行多少个元素</param> |
| | | public void LoadButtonPage(int mRowNumber) |
| | | public void LoadButtonPage(List<KeypadEntity> mList, int mRowNumber) |
| | | { |
| | | if (mRowNumber == 0) |
| | | { |
| | | return; |
| | | } |
| | | this.mRowNumber = mRowNumber; |
| | | this.mListCount = mList.Count; |
| | | int line = 0; |
| | | int xCount = 0; |
| | | for (int i = 1; i <= this.mList.Count; i++) |
| | | for (int i = 1; i <= mList.Count; i++) |
| | | { |
| | | var d = this.mList[i - 1]; |
| | | var keypad = mList[i - 1]; |
| | | ButtonFramLayout buttonFram = new ButtonFramLayout(); |
| | | this.AddChidren(buttonFram); |
| | | buttonFram.Tag = d; |
| | | buttonFram.Tag = keypad; |
| | | buttonFram.Y = Application.GetRealHeight(this.topMargin) + Application.GetRealHeight(ButtonFramLayout.heightFrameLayout * line); |
| | | buttonFram.X = Application.GetRealWidth(this.leftMargin) + Application.GetRealWidth(ButtonFramLayout.widthFrameLayout * xCount); |
| | | buttonFram.AddImageView(); |
| | |
| | | { |
| | | buttonFram.AddBottomLine(); |
| | | } |
| | | buttonFram.GetNameButton().Text = d; |
| | | buttonFram.GetNameButton().Text = keypad.name; |
| | | |
| | | xCount++; |
| | | if (i % this.mRowNumber == 0) |
| | |
| | | { |
| | | if (buttonFram.Tag != null) |
| | | { |
| | | selectAction?.Invoke(buttonFram.Tag.ToString()); |
| | | selectAction?.Invoke((KeypadEntity)buttonFram.Tag); |
| | | } |
| | | }); |
| | | |
| | |
| | | /// <summary> |
| | | /// 动态加载按键界面 |
| | | /// </summary> |
| | | /// <param name="list">索引列表,表示某一条宽度加宽</param> |
| | | public void LoadButtonPage(List<int> list) |
| | | /// <param name="mList">列表</param> |
| | | /// <param name="list">列表中索引,表示某一条宽度加宽</param> |
| | | public void LoadButtonPage(List<KeypadEntity> mList, List<int> list) |
| | | { |
| | | |
| | | int currnetheightValue = 0; |
| | |
| | | //获取相对一个纬度值 |
| | | int heightDimensionValue = this.Height - Application.GetRealHeight(this.topMargin) - Application.GetRealHeight(this.bottomMargin) - Application.GetRealHeight(ButtonFramLayout.heightFrameLayout / 2); |
| | | int widthDimensionValue = this.Width - Application.GetRealWidth(this.leftMargin) - Application.GetRealWidth(this.rightMargin) - Application.GetRealHeight(ButtonFramLayout.widthFrameLayout / 2); |
| | | for (int i = 1; i <= this.mList.Count; i++) |
| | | for (int i = 1; i <= mList.Count; i++) |
| | | { |
| | | var d = this.mList[i - 1]; |
| | | var keypad = mList[i - 1]; |
| | | ButtonFramLayout buttonFram = null; |
| | | if (list.Contains(i)) |
| | | { |
| | |
| | | this.AddChidren(buttonFram); |
| | | buttonFram.AddImageView(); |
| | | buttonFram.AddNameView(); |
| | | buttonFram.Tag = d;//标记数据 |
| | | buttonFram.GetNameButton().Text = d.ToString(); |
| | | buttonFram.Tag = keypad;//标记数据 |
| | | buttonFram.GetNameButton().Text = keypad.name; |
| | | if (widthDimensionValue > Application.GetRealWidth(currnetWidthValue)) |
| | | { |
| | | //加右线 |
| | |
| | | { |
| | | if (buttonFram.Tag != null) |
| | | { |
| | | selectAction?.Invoke(buttonFram.Tag.ToString()); |
| | | selectAction?.Invoke((KeypadEntity)buttonFram.Tag); |
| | | } |
| | | }); |
| | | |
| | |
| | | /// <summary> |
| | | ///动态加载数字按键界面 |
| | | /// </summary> |
| | | public void LoadNumberButtonPage() |
| | | public void LoadNumberButtonPage(List<KeypadEntity> mList) |
| | | { |
| | | |
| | | int currnetheightValue = 0; |
| | | int currnetWidthValue = 0; |
| | | int heightMaxValue = 84; |
| | |
| | | //获取相对一个纬度值 |
| | | int heightDimensionValue = this.Height - Application.GetRealHeight(this.topMargin) - Application.GetRealHeight(this.bottomMargin) - Application.GetRealHeight(heightMaxValue / 2); |
| | | int widthDimensionValue = this.Width - Application.GetRealWidth(this.leftMargin) - Application.GetRealWidth(this.rightMargin) - Application.GetRealHeight(widthMaxValue / 2); |
| | | for (int i = 1; i <= this.GetNumberTextList().Count; i++) |
| | | for (int i = 1; i <= mList.Count; i++) |
| | | { |
| | | var d = this.GetNumberTextList()[i - 1]; |
| | | var keypad = mList[i - 1]; |
| | | Button button = new Button |
| | | { |
| | | Y = Application.GetRealHeight(this.topMargin) + Application.GetRealHeight(currnetheightValue), |
| | | X = Application.GetRealWidth(this.leftMargin) + Application.GetRealWidth(currnetWidthValue), |
| | | Width = Application.GetRealWidth(widthMaxValue), |
| | | Height = Application.GetRealHeight(heightMaxValue), |
| | | Text = d, |
| | | Text = keypad.name, |
| | | TextSize = TextSize.Text20, |
| | | TextColor = MusicColor.TextColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | IsBold = true, |
| | | Tag = d, |
| | | Tag = keypad, |
| | | BackgroundColor = MusicColor.WhiteColor, |
| | | SelectedBackgroundColor = 0xff454635, |
| | | }; |
| | |
| | | } |
| | | button.MouseDownEventHandler += (sen, e) => |
| | | { |
| | | if (button.Tag == null || string.IsNullOrEmpty(button.Tag.ToString())) |
| | | if (button.Tag == null || ((KeypadEntity)button.Tag).keypad == "none") |
| | | { |
| | | return; |
| | | } |
| | | button.IsSelected = true; |
| | | selectAction?.Invoke(button.Tag.ToString()); |
| | | selectAction?.Invoke((KeypadEntity)button.Tag); |
| | | }; |
| | | button.MouseUpEventHandler += (sen, e) => |
| | | { |
| | |
| | | /// <summary> |
| | | /// 动态加载图片界面 |
| | | /// </summary> |
| | | public void LoadImagePage() |
| | | public void LoadImagePage(List<KeypadEntity> mList) |
| | | { |
| | | int currnetheightValue = 0; |
| | | int currnetWidthValue = 0; |
| | |
| | | //获取相对一个纬度值 |
| | | int heightDimensionValue = this.Height - Application.GetRealHeight(this.topMargin) - Application.GetRealHeight(this.bottomMargin) - Application.GetRealHeight(heightMaxValue / 2); |
| | | int widthDimensionValue = this.Width - Application.GetRealWidth(this.leftMargin) - Application.GetRealWidth(this.rightMargin) - Application.GetRealHeight(widthMaxValue / 2); |
| | | for (int i = 1; i <= this.mList.Count; i++) |
| | | for (int i = 1; i <= mList.Count; i++) |
| | | { |
| | | var d = this.mList[i - 1]; |
| | | var keypad = mList[i - 1]; |
| | | ImageFramlayout imageFram = new ImageFramlayout(); |
| | | imageFram.AddView(this); |
| | | imageFram.Tag = d; |
| | | imageFram.Tag = keypad; |
| | | imageFram.Y = Application.GetRealHeight(this.topMargin) + Application.GetRealHeight(currnetheightValue); |
| | | imageFram.X = Application.GetRealWidth(currnetWidthValue); |
| | | imageFram.btnName.Text = d; |
| | | imageFram.btnName.Text = keypad.name; |
| | | currnetWidthValue += (widthMaxValue + 8);//8是隔间值 |
| | | if (widthDimensionValue < Application.GetRealWidth(currnetWidthValue)) |
| | | { |
| | |
| | | { |
| | | if (imageFram.Tag != null) |
| | | { |
| | | selectAction?.Invoke(imageFram.Tag.ToString()); |
| | | selectAction?.Invoke((KeypadEntity)imageFram.Tag); |
| | | } |
| | | }); |
| | | //if (CurrnetSelectIndex != -1 && CurrnetSelectIndex == i) |
| | |
| | | /// 动态加载图片界面 |
| | | /// </summary> |
| | | /// <param name="mRowNumber">一行多少个元素</param> |
| | | public void LoadImagePage(int mRowNumber) |
| | | public void LoadImagePage(List<KeypadEntity> mList, int mRowNumber) |
| | | { |
| | | |
| | | if (mRowNumber == 0) |
| | | { |
| | | return; |
| | | } |
| | | this.mListCount = mList.Count; |
| | | this.mRowNumber = mRowNumber; |
| | | int line = 0; |
| | | int xCount = 0; |
| | | for (int i = 1; i <= this.mList.Count; i++) |
| | | for (int i = 1; i <= mList.Count; i++) |
| | | { |
| | | var d = this.mList[i - 1]; |
| | | var keypad = mList[i - 1]; |
| | | ImageFramlayout imageFram = new ImageFramlayout(); |
| | | imageFram.AddView(this); |
| | | imageFram.Tag = d; |
| | | imageFram.Tag = keypad; |
| | | imageFram.Y = Application.GetRealHeight(this.topMargin) + Application.GetRealHeight((ImageFramlayout.heightFrameLayout + 20) * line); |
| | | imageFram.X = Application.GetRealWidth((ImageFramlayout.widthFrameLayout + 8) * xCount); |
| | | imageFram.btnName.Text = d; |
| | | imageFram.btnName.Text = keypad.name; |
| | | |
| | | xCount++; |
| | | if (i % this.mRowNumber == 0) |
| | |
| | | { |
| | | if (imageFram.Tag != null) |
| | | { |
| | | selectAction?.Invoke(imageFram.Tag.ToString()); |
| | | selectAction?.Invoke((KeypadEntity)imageFram.Tag); |
| | | } |
| | | }); |
| | | |
| | |
| | | /// <returns></returns> |
| | | private bool IsLastColumn(int index) |
| | | { |
| | | if (this.mRowNumber == 0 || this.mList == null || this.mList.Count == 0) |
| | | if (this.mRowNumber == 0 || mListCount == 0) |
| | | { |
| | | return false; |
| | | } |
| | | int lineCount = this.mList.Count / this.mRowNumber;//得出行数 |
| | | int number = this.mList.Count % this.mRowNumber; |
| | | int lineCount = mListCount / this.mRowNumber;//得出行数 |
| | | int number = mListCount % this.mRowNumber; |
| | | if (number != 0) |
| | | { |
| | | if (index > lineCount * this.mRowNumber) |
| | |
| | | |
| | | |
| | | |
| | | public List<string> GetNumberTextList() |
| | | { |
| | | return new List<string> |
| | | { |
| | | "1", |
| | | "2", |
| | | "3", |
| | | Language.StringByID(StringId.pindaojia), |
| | | "4", |
| | | "5", |
| | | "6", |
| | | Language.StringByID(StringId.pindaojian), |
| | | "7", |
| | | "8", |
| | | "9", |
| | | "-/--", |
| | | "",//这个是为了占位置 |
| | | "0" |
| | | |
| | | }; |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | /// 按键名称 |
| | | /// </summary> |
| | | public string name = string.Empty; |
| | | /// <summary> |
| | | /// 按键本地图标地址(自定义) |
| | | /// </summary> |
| | | public string localIconAddress = string.Empty; |
| | | /// <summary> |
| | | /// 是否可以点击(自定义) |
| | | /// </summary> |
| | | public bool isClicked = true; |
| | | } |
| | | } |
| | |
| | | cornerFram.X = Application.GetRealWidth(16); |
| | | cornerFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); |
| | | this.AddChidren(cornerFram); |
| | | cornerFram.SetList(cornerFram.GetTestList(17)); |
| | | cornerFram.SetMargin(16, 0, 16, 0); |
| | | cornerFram.LoadButtonPage(4); |
| | | cornerFram.LoadButtonPage(AksCommonMethod.Current.GetGFKeypadList(),4); |
| | | |
| | | |
| | | CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 72, 17); |
| | |
| | | cornerTopFram.X = Application.GetRealWidth(16); |
| | | cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); |
| | | this.AddChidren(cornerTopFram); |
| | | cornerTopFram.SetList(cornerTopFram.GetTestList(17)); |
| | | cornerTopFram.SetMargin(16, 0, 16, 0); |
| | | cornerTopFram.LoadButtonPage(new List<int> { 5, 6 }); |
| | | cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetTYYKeypadList(),new List<int> { 5, 6 }); |
| | | |
| | | #region ----频道 控制---- |
| | | FrameLayout middLayout = new FrameLayout |
| | |
| | | numberFrame.Y = middLayout.Bottom + Application.GetRealHeight(16); |
| | | numberFrame.BackgroundColor = MusicColor.WhiteColor; |
| | | numberFrame.SetMargin(16, 0, 16, 0); |
| | | numberFrame.LoadNumberButtonPage(); |
| | | numberFrame.LoadNumberButtonPage(AksCommonMethod.Current.GetNumberKeypadList()); |
| | | this.AddChidren(numberFrame); |
| | | |
| | | |
| | |
| | | typeMultiFramLayout = new TypeMultiFramLayout(); |
| | | typeMultiFramLayout.multiFramLayout.Y = menuFram.Bottom + Application.GetRealHeight(32); |
| | | typeMultiFramLayout.AddView(cornerBottomFram); |
| | | typeMultiFramLayout.btnBottonRightName.TextID = StringId.dianshi; |
| | | typeMultiFramLayout.btnBottonRightName.TextID = StringId.shixuqi; |
| | | |
| | | //初始值 |
| | | leftBtnTitle.IsSelected = true; |
| | |
| | | cornerFram.X = Application.GetRealWidth(16); |
| | | cornerFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); |
| | | this.AddChidren(cornerFram); |
| | | cornerFram.SetList(cornerFram.GetTestList(16)); |
| | | cornerFram.SetMargin(16, 0, 16, 0); |
| | | cornerFram.LoadButtonPage(4); |
| | | cornerFram.LoadButtonPage(AksCommonMethod.Current.GetMusicKeypadList(),4); |
| | | |
| | | |
| | | CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 364, 17); |
| | |
| | | // Text = responsePackNew.message + "(" + responsePackNew.Code + ")", |
| | | // Direction = AMPopTipDirection.None, |
| | | //}.Show(MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1)); |
| | | CommonMethod.Current.ShowTip(responsePackNew.message + "(" + responsePackNew.Code + ")"); |
| | | CommonMethod.Current.ShowTip(responsePackNew.message + "(" + responsePackNew.Code + ")",3); |
| | | }); |
| | | } |
| | | return false; |
| | |
| | | cornerTopFram.X = Application.GetRealWidth(16); |
| | | cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); |
| | | this.AddChidren(cornerTopFram); |
| | | cornerTopFram.SetList(cornerTopFram.GetTestList(17)); |
| | | cornerTopFram.SetMargin(16, 0, 16, 0); |
| | | cornerTopFram.LoadButtonPage(new List<int> { 5, 6 }); |
| | | cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetTYYKeypadList(),new List<int> { 5, 6 }); |
| | | |
| | | #region ----频道 控制---- |
| | | FrameLayout middLayout = new FrameLayout |
| | |
| | | numberFrame.Y = middLayout.Bottom + Application.GetRealHeight(16); |
| | | numberFrame.BackgroundColor = MusicColor.WhiteColor; |
| | | numberFrame.SetMargin(16,0,16,0); |
| | | numberFrame.LoadNumberButtonPage(); |
| | | numberFrame.LoadNumberButtonPage(AksCommonMethod.Current.GetNumberKeypadList()); |
| | | this.AddChidren(numberFrame); |
| | | |
| | | |
| | |
| | | cornerTopFram.X = Application.GetRealWidth(16); |
| | | cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); |
| | | this.AddChidren(cornerTopFram); |
| | | cornerTopFram.SetList(cornerTopFram.GetTestList(17)); |
| | | cornerTopFram.SetMargin(16, 0, 16, 0); |
| | | cornerTopFram.LoadButtonPage(new List<int> { 3, 4, 5 }); |
| | | cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetTYYKeypadList(),new List<int> { 3, 4, 5 }); |
| | | |
| | | |
| | | CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 292, 17); |
| | |
| | | CornerFramLayout imageFLayout = new CornerFramLayout(343, 20 * 168, 0); |
| | | vv.AddChidren(imageFLayout); |
| | | imageFLayout.X = Application.GetRealWidth(16); |
| | | imageFLayout.SetList(imageFLayout.GetTestList(20)); |
| | | imageFLayout.LoadImagePage(); |
| | | imageFLayout.LoadImagePage(new List<Entity.KeypadEntity>()); |
| | | imageFLayout.selectAction += (index) => |
| | | { |
| | | CommonMethod.Current.MainThread(() => |