2023年08月14日15:15:49
备份一下代码
| | |
| | | /// <summary> |
| | | /// 影片收藏/取消收藏 |
| | | /// </summary> |
| | | public const string Api_Post_Aks_MovieLibraryCollect = "/home-wisdom/app/device/avcc/movieLibrary/Collect"; |
| | | public const string Api_Post_Aks_MovieLibraryCollect = "/home-wisdom/app/device/avcc/movieLibrary/collect"; |
| | | /// <summary> |
| | | /// 收藏影片分页获取 |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | public void ClearData() { |
| | | movieLibraryInfoEntities.Clear(); |
| | | CollectList.Clear(); |
| | | } |
| | | /// <summary> |
| | | /// 影片详情列表 |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取影音中控屏列表 |
| | | /// </summary> |
| | |
| | | keypads.Add(new KeypadEntity { keypad = "play", name = "播放", localIconAddress = $"{aksIcon}bofang.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "in_out_warehouse", name = "进出仓", localIconAddress = $"{aksIcon}jinchucang.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "subtitle", name = "字幕", localIconAddress = $"{aksIcon}zimu.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_up", name = "上", localIconAddress = $"{aksIcon}shang.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_down", name = "下", localIconAddress = $"{aksIcon}xia.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_left", name = "左", localIconAddress = $"{aksIcon}zuo.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_right", name = "右", localIconAddress = $"{aksIcon}you.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_ok", name = "确认", localIconAddress = $"{aksIcon}ok.png" }); |
| | | //keypads.Add(new KeypadEntity { keypad = "key_up", name = "上", localIconAddress = $"{aksIcon}shang.png" }); |
| | | //keypads.Add(new KeypadEntity { keypad = "key_down", name = "下", localIconAddress = $"{aksIcon}xia.png" }); |
| | | //keypads.Add(new KeypadEntity { keypad = "key_left", name = "左", localIconAddress = $"{aksIcon}zuo.png" }); |
| | | //keypads.Add(new KeypadEntity { keypad = "key_right", name = "右", localIconAddress = $"{aksIcon}you.png" }); |
| | | //keypads.Add(new KeypadEntity { keypad = "key_ok", name = "确认", localIconAddress = $"{aksIcon}ok.png" }); |
| | | return keypads; |
| | | } |
| | | /// <summary> |
| | |
| | | keypads.Add(new KeypadEntity { keypad = "off", name = "关", localIconAddress = $"{aksIcon}guan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_up", name = "音量+", localIconAddress = $"{aksIcon}yinliangjia.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_down", name = "音量-", localIconAddress = $"{aksIcon}yinliangjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_1", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_2", name = "HDMI 2", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_3", name = "HDMI 3", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_4", name = "HDMI 4", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | |
| | | keypads.Add(new KeypadEntity { keypad = "signal_source", name = "信号源", localIconAddress = $"{aksIcon}xinhaoyuan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "curtain_up", name = "幕布升", localIconAddress = $"{aksIcon}mubusheng.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "curtain_down", name = "幕布降", localIconAddress = $"{aksIcon}mubujiang.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_1", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_2", name = "HDMI 2", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_3", name = "HDMI 3", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_4", name = "HDMI 4", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | |
| | | keypads.Add(new KeypadEntity { keypad = "custom_3", name = "自定义按键3", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_4", name = "自定义按键4", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | return keypads; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取【电视】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetTvKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "on", name = "开", localIconAddress = $"{aksIcon}kai.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "off", name = "关", localIconAddress = $"{aksIcon}guan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "signal_source", name = "信号源", localIconAddress = $"{aksIcon}xinhaoyuan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "mute", name = "静音", localIconAddress = $"{aksIcon}jingyin.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_up", name = "音量+", localIconAddress = $"{aksIcon}yinliangjia.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_down", name = "音量-", localIconAddress = $"{aksIcon}yinliangjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "menu", name = "菜单", localIconAddress = $"{aksIcon}caidan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "return", name = "返回", localIconAddress = $"{aksIcon}fanhui.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "look_back", name = "回看", localIconAddress = $"{aksIcon}huikan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "cancel", name = "取消", localIconAddress = $"{aksIcon}quxiao.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_1", name = "自定义按键1", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_2", name = "自定义按键2", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_3", name = "自定义按键3", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_4", name = "自定义按键4", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | return keypads; |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取【机顶盒】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetJdhKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "on", name = "开", localIconAddress = $"{aksIcon}kai.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "off", name = "关", localIconAddress = $"{aksIcon}guan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "menu", name = "菜单", localIconAddress = $"{aksIcon}caidan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "mute", name = "静音", localIconAddress = $"{aksIcon}jingyin.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_up", name = "音量+", localIconAddress = $"{aksIcon}yinliangjia.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_down", name = "音量-", localIconAddress = $"{aksIcon}yinliangjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "look_back", name = "回看", localIconAddress = $"{aksIcon}huikan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "cancel", name = "取消", localIconAddress = $"{aksIcon}quxiao.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "amplifier_volume_up", name = "功放音量 +", localIconAddress = $"{aksIcon}gongfang1.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "amplifier_volume_down", name = "功放音量 -", localIconAddress = $"{aksIcon}gongfang2.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_1", name = "自定义按键1", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_2", name = "自定义按键2", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_3", name = "自定义按键3", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_4", name = "自定义按键4", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | return keypads; |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | keypads.Add(new KeypadEntity { keypad = "number_0", name = "0" }); |
| | | return keypads; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取【菜单】按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetMenuKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "key_up", name = "上", localIconAddress = $"{aksIcon}shang.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_down", name = "下", localIconAddress = $"{aksIcon}xia.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_left", name = "左", localIconAddress = $"{aksIcon}zuo.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_right", name = "右", localIconAddress = $"{aksIcon}you.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_ok", name = "确认", localIconAddress = $"{aksIcon}ok.png" }); |
| | | return keypads; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | { |
| | | this.remoteControl = remoteControlEntity; |
| | | //读缓存数据 |
| | | this.mMovieLibraryList.AddRange(AksCommonMethod.Current.CollectList); |
| | | var collectList = AksCommonMethod.Current.CollectList; |
| | | this.mMovieLibraryList.AddRange(collectList); |
| | | } |
| | | /// <summary> |
| | | /// 影片列表 |
| | | /// </summary> |
| | | private List<MovieLibrary> mMovieLibraryList; |
| | | private List<MovieLibrary> mMovieLibraryList=new List<MovieLibrary>(); |
| | | /// <summary> |
| | | /// 当前的遥控器对象 |
| | | /// </summary> |
| | |
| | | /// 动态加载按键界面 |
| | | /// </summary> |
| | | /// <param name="mList">列表</param> |
| | | /// <param name="list">列表中索引,表示某一条宽度加宽</param> |
| | | /// <param name="list"> 列表中索引,表示某一条宽度加宽,没有默认(new List<int>)</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param> |
| | | public void LoadButtonPage(List<KeypadEntity> mList, List<int> list,int defaultIndex=-1) |
| | | { |
| | |
| | | using System; |
| | | using HDL_ON.UI.Music; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | using Shared; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView |
| | | { |
| | |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealHeight(20), |
| | | UnSelectedImagePath = "AksIcon/shang.png", |
| | | Name= "上", |
| | | }; |
| | | Button btnBottom = new Button |
| | | { |
| | |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealHeight(20), |
| | | UnSelectedImagePath = "AksIcon/xia.png", |
| | | Name = "下", |
| | | }; |
| | | Button btnLeft = new Button |
| | | { |
| | |
| | | Width = Application.GetRealWidth(20), |
| | | Height = Application.GetRealHeight(24), |
| | | UnSelectedImagePath = "AksIcon/zuo.png", |
| | | Name = "左", |
| | | |
| | | }; |
| | | Button btnRight = new Button |
| | |
| | | Width = Application.GetRealWidth(20), |
| | | Height = Application.GetRealHeight(24), |
| | | UnSelectedImagePath = "AksIcon/you.png", |
| | | Name = "右", |
| | | |
| | | }; |
| | | |
| | |
| | | Height = Application.GetMinRealAverage(28), |
| | | Radius = (uint)Application.GetRealHeight(14), |
| | | BackgroundColor = MusicColor.SelectedColor, |
| | | Name= "确定" |
| | | }; |
| | | |
| | | public void AddView(FrameLayout layout) |
| | |
| | | /// 上 |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | public void SetTopClickListener(Action<Button> action) |
| | | public void SetTopClickListener(Action<KeypadEntity> action) |
| | | { |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | //btnTop.BackgroundColor = this.UpBackgroundColor; |
| | | btnTop.IsSelected = false; |
| | | action?.Invoke(btnTop); |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnTop.Name; |
| | | keypadEntity.keypad = "key_up"; |
| | | action?.Invoke(keypadEntity); |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnTop.MouseUpEventHandler += UpClick; |
| | |
| | | /// 下 |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | public void SetBottomClickListener(Action<Button> action) |
| | | public void SetBottomClickListener(Action<KeypadEntity> action) |
| | | { |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | //btnBottom.BackgroundColor = this.UpBackgroundColor; |
| | | btnBottom.IsSelected = false; |
| | | action?.Invoke(btnBottom); |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnBottom.Name; |
| | | keypadEntity.keypad = "key_down"; |
| | | action?.Invoke(keypadEntity); |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnBottom.MouseUpEventHandler += UpClick; |
| | |
| | | /// 左 |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | public void SetLeftClickListener(Action<Button> action) |
| | | public void SetLeftClickListener(Action<KeypadEntity> action) |
| | | { |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | //btnLeft.BackgroundColor = this.UpBackgroundColor; |
| | | btnLeft.IsSelected = false; |
| | | action?.Invoke(btnLeft); |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnLeft.Name; |
| | | keypadEntity.keypad = "key_left"; |
| | | action?.Invoke(keypadEntity); |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnLeft.MouseUpEventHandler += UpClick; |
| | |
| | | /// 右 |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | public void SetRightClickListener(Action<Button> action) |
| | | public void SetRightClickListener(Action<KeypadEntity> action) |
| | | { |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | //btnRight.BackgroundColor = this.UpBackgroundColor; |
| | | btnRight.IsSelected = false; |
| | | action?.Invoke(btnRight); |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnRight.Name; |
| | | keypadEntity.keypad = "key_right"; |
| | | action?.Invoke(keypadEntity); |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnRight.MouseUpEventHandler += UpClick; |
| | |
| | | /// ok |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | public void SetOkClickListener(Action<Button> action) |
| | | public void SetOkClickListener(Action<KeypadEntity> action) |
| | | { |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | btnOk.BackgroundColor = MusicColor.SelectedColor;// this.UpBackgroundColor; |
| | | action?.Invoke(btnOk); |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnOk.Name; |
| | | keypadEntity.keypad = "key_ok"; |
| | | action?.Invoke(keypadEntity); |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnOk.MouseUpEventHandler += UpClick; |
| | |
| | | Y = btnYear.Bottom + Application.GetRealHeight(20), |
| | | Width = Application.GetRealWidth(45), |
| | | Height = Application.GetRealHeight(43), |
| | | Text = movieLibrary.rating, |
| | | Text = movieLibraryInfo == null ? "" : movieLibraryInfo.rating, |
| | | TextSize = 32, |
| | | TextColor = MusicColor.TextColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | |
| | | TextColor = 0xffA5AEBC, |
| | | TextSize = TextSize.Text12, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = movieLibraryInfo == null ? "" : movieLibraryInfo.rating, |
| | | }; |
| | | baseFramLayout.AddChidren(btnScore); |
| | | |
| | |
| | | IsSelected = movieLibraryInfo == null ? false : movieLibraryInfo.collect, |
| | | }; |
| | | baseFramLayout.AddChidren(btnCollectImage); |
| | | |
| | | |
| | | btnCollectText = new Button |
| | | { |
| | |
| | | //返回 |
| | | this.topView.clickBackBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | action(isOldState != btnCollectImage.IsSelected); |
| | | action?.Invoke(isOldState != btnCollectImage.IsSelected); |
| | | this.RemoveFromParent(); |
| | | }; |
| | | //立即播放 |
| | |
| | | var isBool = SendMethod.Current.IsCollect(remoteControl.deviceId, remoteControl.rcId, movieLibrary.movieId, btnCollectImage.IsSelected); |
| | | if (isBool) |
| | | { |
| | | //更新缓存数据 |
| | | movieLibraryInfo.collect = btnCollectImage.IsSelected; |
| | | //成功后才更新缓存数据 |
| | | if (btnCollectImage.IsSelected) |
| | | { |
| | | |
| | | AksCommonMethod.Current.AddCollectMovie(movieLibrary); |
| | | } |
| | | else |
| | | { |
| | | AksCommonMethod.Current.DelCollectMovie(movieLibrary); |
| | | } |
| | | |
| | | } |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | CommonMethod.Current.Loading.Hide(); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | btnCollectImage.MouseUpEventHandler += CollectClick; |
| | |
| | | using HDL_ON.UI.Music; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | using Shared; |
| | | using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks |
| | |
| | | |
| | | private void EventListener() |
| | | { |
| | | cornerFram.selectKeyAction += (value) => |
| | | cornerFram.selectKeyAction += (keypadEntity) => |
| | | { |
| | | Console.WriteLine("1"); |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }; |
| | | //时序器 |
| | | typeMultiFramLayout.SetLeftFlClickListener((f) => |
| | |
| | | //设备切换 |
| | | typeMultiFramLayout.SetRightFlClickListener((f) => |
| | | { |
| | | Console.WriteLine("4"); |
| | | action?.Invoke(IntType.HiFi); |
| | | }); |
| | | |
| | |
| | | }; |
| | | this.AddChidren(btnTitle); |
| | | |
| | | cornerFram = new CornerFramLayout(343, 452, 17); |
| | | |
| | | |
| | | cornerFram = new CornerFramLayout(343, 284, 17); |
| | | cornerFram.X = Application.GetRealWidth(16); |
| | | cornerFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); |
| | | this.AddChidren(cornerFram); |
| | |
| | | |
| | | this.AdjustRealHeight(16); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 按键控制 |
| | | /// </summary> |
| | | /// <param name="keypad"><按键标识/param> |
| | | /// <param name="keyName"><按键名称(打印用的)/param> |
| | | private void KeyControl(string keypad, string keyName) |
| | | { |
| | | //CommonMethod.Current.Loading.Start(); |
| | | CommonMethod.Current.SunThread(() => |
| | | { |
| | | try |
| | | { |
| | | SendMethod.Current.KeypadExecute(remoteControl.deviceId, remoteControl.rcId, keypad, keyName); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | //CommonMethod.Current.Loading.Hide(); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | using HDL_ON.UI.Music; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | using Shared; |
| | | using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks |
| | |
| | | private void EventListener() |
| | | { |
| | | //功能键控制 |
| | | cornerTopFram.selectKeyAction += (value) => |
| | | cornerTopFram.selectKeyAction += (keypadEntity) => |
| | | { |
| | | Console.WriteLine("1"); |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }; |
| | | //数字键控制 |
| | | numberFrame.selectKeyAction += (s) => |
| | | numberFrame.selectKeyAction += (keypadEntity) => |
| | | { |
| | | Console.WriteLine("打印====" + s); |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }; |
| | | //菜单上按键 |
| | | menuFram.SetTopClickListener((b) => |
| | | menuFram.SetTopClickListener((keypadEntity) => |
| | | { |
| | | |
| | | Console.WriteLine("5"); |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单下按键 |
| | | menuFram.SetBottomClickListener((b) => |
| | | menuFram.SetBottomClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("6"); |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单左按键 |
| | | menuFram.SetLeftClickListener((b) => |
| | | menuFram.SetLeftClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("7"); |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单右按键 |
| | | menuFram.SetRightClickListener((b) => |
| | | menuFram.SetRightClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("8"); |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单ok按键 |
| | | menuFram.SetOkClickListener((b) => |
| | | menuFram.SetOkClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("9"); |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //时序器 |
| | | typeMultiFramLayout.SetLeftFlClickListener((f) => |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = MusicColor.TextColor, |
| | | TextSize = TextSize.Text16, |
| | | TextID = StringId.jidinghe, |
| | | TextID = StringId.touyingyi, |
| | | }; |
| | | this.AddChidren(btnTitle); |
| | | |
| | | cornerTopFram = new CornerFramLayout(343, 452, 17); |
| | | cornerTopFram = new CornerFramLayout(343, 368, 17); |
| | | cornerTopFram.X = Application.GetRealWidth(16); |
| | | cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); |
| | | this.AddChidren(cornerTopFram); |
| | | cornerTopFram.SetMargin(16, 0, 16, 0); |
| | | cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetTYYKeypadList(),new List<int> { 5, 6 }); |
| | | cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetJdhKeypadList(),new List<int> { 5, 6 }); |
| | | |
| | | #region ----频道 控制---- |
| | | FrameLayout middLayout = new FrameLayout |
| | |
| | | |
| | | this.AdjustRealHeight(16); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 按键控制 |
| | | /// </summary> |
| | | /// <param name="keypad"><按键标识/param> |
| | | /// <param name="keyName"><按键名称(打印用的)/param> |
| | | private void KeyControl(string keypad, string keyName) |
| | | { |
| | | //CommonMethod.Current.Loading.Start(); |
| | | CommonMethod.Current.SunThread(() => |
| | | { |
| | | try |
| | | { |
| | | SendMethod.Current.KeypadExecute(remoteControl.deviceId, remoteControl.rcId, keypad, keyName); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | //CommonMethod.Current.Loading.Hide(); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | using HDL_ON.UI.Music; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | using Shared; |
| | | using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks |
| | |
| | | |
| | | private void EventListener() |
| | | { |
| | | cornerFram.selectKeyAction += (value) => |
| | | |
| | | cornerFram.selectKeyAction += (keypadEntity) => |
| | | { |
| | | Console.WriteLine("1"); |
| | | //SendMethod.Current.Log(keypad.); |
| | | if (keypadEntity == null) |
| | | { |
| | | return; |
| | | } |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }; |
| | | |
| | | typeSingleFramLayout.SetClickListener((f) => |
| | |
| | | ykPage.Show(); |
| | | }); |
| | | |
| | | menuFram.SetTopClickListener((b) => |
| | | menuFram.SetTopClickListener((keypadEntity) => |
| | | { |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | menuFram.SetBottomClickListener((keypadEntity) => |
| | | { |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | menuFram.SetLeftClickListener((keypadEntity) => |
| | | { |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | menuFram.SetRightClickListener((keypadEntity) => |
| | | { |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | |
| | | Console.WriteLine("5"); |
| | | }); |
| | | menuFram.SetBottomClickListener((b) => |
| | | menuFram.SetOkClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("6"); |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | menuFram.SetLeftClickListener((b) => |
| | | { |
| | | Console.WriteLine("7"); |
| | | }); |
| | | menuFram.SetRightClickListener((b) => |
| | | { |
| | | Console.WriteLine("8"); |
| | | }); |
| | | menuFram.SetOkClickListener((b) => |
| | | { |
| | | Console.WriteLine("9"); |
| | | }); |
| | | |
| | | typeMultiFramLayout.SetLeftFlClickListener((f) => |
| | | { |
| | | SxqPage sxqPage = new SxqPage(this.sequencerList, this.remoteControl.deviceId); |
| | |
| | | sxqPage.Show(); |
| | | |
| | | }); |
| | | |
| | | typeMultiFramLayout.SetRightFlClickListener((f) => |
| | | { |
| | | Console.WriteLine("4"); |
| | | action?.Invoke(IntType.Player); |
| | | }); |
| | | |
| | |
| | | cornerBottomFram.Y = cornerFram.Bottom + Application.GetRealHeight(16); |
| | | cornerBottomFram.BackgroundColor = MusicColor.WhiteColor; |
| | | cornerBottomFram.Radius = (uint)Application.GetRealHeight(17); |
| | | |
| | | |
| | | |
| | | typeSingleFramLayout = new TypeSingleFramLayout(); |
| | | typeSingleFramLayout.AddView(cornerBottomFram); |
| | |
| | | this.AdjustRealHeight(16); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 按键控制 |
| | | /// </summary> |
| | | /// <param name="keypad"><按键标识/param> |
| | | /// <param name="keyName"><按键名称(打印用的)/param> |
| | | private void KeyControl(string keypad, string keyName) |
| | | { |
| | | //CommonMethod.Current.Loading.Start(); |
| | | CommonMethod.Current.SunThread(() => |
| | | { |
| | | try |
| | | { |
| | | SendMethod.Current.KeypadExecute(remoteControl.deviceId, remoteControl.rcId, keypad, keyName); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | //CommonMethod.Current.Loading.Hide(); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | /// <param name="deviceId">设备id</param> |
| | | /// <param name="rcId">遥控器id</param> |
| | | /// <param name="keypad"><按键标识/param> |
| | | /// <param name="keyName"><按键名称(打印用的)/param> |
| | | /// <param name="tipType">是否需要提示,默认提示</param> |
| | | public bool KeypadExecute(string deviceId, string rcId, string keypad, TipType tipType = TipType.flicker) |
| | | public bool KeypadExecute(string deviceId, string rcId, string keypad,string keyName, TipType tipType = TipType.flicker) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | |
| | | d.Add("rcId", rcId);//遥控器id |
| | | d.Add("keypad", keypad);//按键标识 |
| | | //d.Add("zoneType", deviceId);//区域 |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d,NewAPI.Api_Post_Aks_KeypadExecute, "遥控器按键执行"); |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d,NewAPI.Api_Post_Aks_KeypadExecute, $"遥控器【{keyName}】按键执行"); |
| | | if (!this.DataChecking(responsePackNew, tipType)) |
| | | { |
| | | return false; |
| | |
| | | jObject.Add("collect", collect);//影片id |
| | | //d.Add("zoneType", deviceId);//区域 |
| | | |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(jObject.ToString(), NewAPI.Api_Post_Aks_MovieLibraryCollect, "影片收藏"); |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(jObject, NewAPI.Api_Post_Aks_MovieLibraryCollect, "影片收藏"); |
| | | if (!this.DataChecking(responsePackNew, tipType)) |
| | | { |
| | | return false; |
| | |
| | | using HDL_ON.UI.Music; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | using Shared; |
| | | using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks |
| | |
| | | private void EventListener() |
| | | { |
| | | //功能键控制 |
| | | cornerTopFram.selectKeyAction += (value) => |
| | | cornerTopFram.selectKeyAction += (keypadEntity) => |
| | | { |
| | | Console.WriteLine("1"); |
| | | KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }; |
| | | //数字键控制 |
| | | numberFrame.selectKeyAction += (s) => |
| | | numberFrame.selectKeyAction += (keypadEntity) => |
| | | { |
| | | Console.WriteLine("打印====" + s); |
| | | KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }; |
| | | //菜单上按键 |
| | | menuFram.SetTopClickListener((b) => |
| | | menuFram.SetTopClickListener((keypadEntity) => |
| | | { |
| | | |
| | | Console.WriteLine("5"); |
| | | |
| | | KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单下按键 |
| | | menuFram.SetBottomClickListener((b) => |
| | | menuFram.SetBottomClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("6"); |
| | | |
| | | KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单左按键 |
| | | menuFram.SetLeftClickListener((b) => |
| | | menuFram.SetLeftClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("7"); |
| | | |
| | | KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单右按键 |
| | | menuFram.SetRightClickListener((b) => |
| | | menuFram.SetRightClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("8"); |
| | | |
| | | KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单ok按键 |
| | | menuFram.SetOkClickListener((b) => |
| | | menuFram.SetOkClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("9"); |
| | | |
| | | KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //时序器 |
| | | typeMultiFramLayout.SetLeftFlClickListener((f) => |
| | | { |
| | | SxqPage sxqPage = new SxqPage(this.sequencerList,this.remoteControl.deviceId); |
| | | SxqPage sxqPage = new SxqPage(this.sequencerList, this.remoteControl.deviceId); |
| | | MainPage.BasePageView.AddChidren(sxqPage); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | sxqPage.Show(); |
| | |
| | | //设备切换 |
| | | typeMultiFramLayout.SetRightFlClickListener((f) => |
| | | { |
| | | Console.WriteLine("4"); |
| | | action?.Invoke(IntType.TV); |
| | | }); |
| | | |
| | |
| | | }; |
| | | this.AddChidren(btnTitle); |
| | | |
| | | cornerTopFram = new CornerFramLayout(343, 452, 17); |
| | | cornerTopFram = new CornerFramLayout(343, 368, 17); |
| | | cornerTopFram.X = Application.GetRealWidth(16); |
| | | cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); |
| | | this.AddChidren(cornerTopFram); |
| | | cornerTopFram.SetMargin(16, 0, 16, 0); |
| | | cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetTYYKeypadList(),new List<int> { 5, 6 }); |
| | | cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetTvKeypadList(),new List<int> { 5, 6 }); |
| | | |
| | | #region ----频道 控制---- |
| | | FrameLayout middLayout = new FrameLayout |
| | |
| | | |
| | | this.AdjustRealHeight(16); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 按键控制 |
| | | /// </summary> |
| | | /// <param name="keypad"><按键标识/param> |
| | | /// <param name="keyName"><按键名称(打印用的)/param> |
| | | private void KeyControl(string keypad, string keyName) |
| | | { |
| | | //CommonMethod.Current.Loading.Start(); |
| | | CommonMethod.Current.SunThread(() => |
| | | { |
| | | try |
| | | { |
| | | SendMethod.Current.KeypadExecute(remoteControl.deviceId, remoteControl.rcId, keypad, keyName); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | //CommonMethod.Current.Loading.Hide(); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | using HDL_ON.UI.Music; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | using Shared; |
| | | using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks |
| | |
| | | |
| | | |
| | | //功能键控制 |
| | | cornerTopFram.selectKeyAction += (value) => |
| | | cornerTopFram.selectKeyAction += (keypadEntity) => |
| | | { |
| | | Console.WriteLine("1"); |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }; |
| | | |
| | | //菜单上按键 |
| | | menuFram.SetTopClickListener((b) => |
| | | menuFram.SetTopClickListener((keypadEntity) => |
| | | { |
| | | |
| | | Console.WriteLine("5"); |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单下按键 |
| | | menuFram.SetBottomClickListener((b) => |
| | | menuFram.SetBottomClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("6"); |
| | | |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单左按键 |
| | | menuFram.SetLeftClickListener((b) => |
| | | menuFram.SetLeftClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("7"); |
| | | |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单右按键 |
| | | menuFram.SetRightClickListener((b) => |
| | | menuFram.SetRightClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("8"); |
| | | |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //菜单ok按键 |
| | | menuFram.SetOkClickListener((b) => |
| | | menuFram.SetOkClickListener((keypadEntity) => |
| | | { |
| | | Console.WriteLine("9"); |
| | | |
| | | this.KeyControl(keypadEntity.keypad, keypadEntity.name); |
| | | }); |
| | | //时序器 |
| | | typeMultiFramLayout.SetLeftFlClickListener((f) => |
| | |
| | | //设备切换 |
| | | typeMultiFramLayout.SetRightFlClickListener((f) => |
| | | { |
| | | Console.WriteLine("4"); |
| | | action?.Invoke(IntType.Projector); |
| | | }); |
| | | |
| | |
| | | |
| | | this.AdjustRealHeight(16); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 按键控制 |
| | | /// </summary> |
| | | /// <param name="keypad"><按键标识/param> |
| | | /// <param name="keyName"><按键名称(打印用的)/param> |
| | | private void KeyControl(string keypad, string keyName) |
| | | { |
| | | //CommonMethod.Current.Loading.Start(); |
| | | CommonMethod.Current.SunThread(() => |
| | | { |
| | | try |
| | | { |
| | | SendMethod.Current.KeypadExecute(remoteControl.deviceId, remoteControl.rcId, keypad, keyName); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | //CommonMethod.Current.Loading.Hide(); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | using HDL_ON.UI.Music; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | using Shared; |
| | | using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks |
| | |
| | | CustomFrameLayout zhuyeFL; |
| | | FrameLayout okFl; |
| | | Button btnLeft; |
| | | Button btnQian; |
| | | Button btnRight; |
| | | Button btnHou; |
| | | Button btnOk; |
| | | Button btnJia; |
| | | Button btnJian; |
| | | Button btnShang; |
| | | Button btnRight; |
| | | Button btnXia; |
| | | Button btnOk; |
| | | Button btnYingliangjia; |
| | | Button btnYingliangjian; |
| | | Button btnPindaojia; |
| | | Button btnPindaojian; |
| | | CustomFrameLayout caidanFL; |
| | | CustomFrameLayout fanhuiFL; |
| | | CustomFrameLayout shanyibuFL; |
| | |
| | | //开关 |
| | | switchBtn.MouseDownEventHandler += (senser, e) => |
| | | { |
| | | |
| | | KeyControl("on_off", "开/关"); |
| | | }; |
| | | //信息 |
| | | xinxiFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("info", "信息"); |
| | | }); |
| | | //收藏 |
| | | shoucangFL.SetClickListener(() => |
| | | { |
| | | KeyControl("collect", "收藏"); |
| | | }); |
| | | //电影 |
| | | dianyingFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("movie", "电影"); |
| | | }); |
| | | //娱乐 |
| | | yuleFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("recreation", "娱乐"); |
| | | }); |
| | | //电视 |
| | | dianshiFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("tv", "电视"); |
| | | }); |
| | | //红色 |
| | | redFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("red", "红色"); |
| | | }); |
| | | //黄色 |
| | | yellowFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("yellow", "黄色"); |
| | | }); |
| | | //蓝色 |
| | | blueFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("blue", "蓝色"); |
| | | }); |
| | | //1 |
| | | number1FL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("number_1", "1"); |
| | | }); |
| | | //2 |
| | | number2FL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("number_2", "2"); |
| | | }); |
| | | //3 |
| | | number3FL.SetClickListener(() => |
| | | { |
| | | KeyControl("number_3", "3"); |
| | | |
| | | }); |
| | | //4 |
| | | number4FL.SetClickListener(() => |
| | | { |
| | | KeyControl("number_4", "4"); |
| | | |
| | | }); |
| | | //5 |
| | | number5FL.SetClickListener(() => |
| | | { |
| | | KeyControl("number_5", "5"); |
| | | |
| | | }); |
| | | //6 |
| | | number6FL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("number_6", "6"); |
| | | }); |
| | | //7 |
| | | number7FL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("number_7", "7"); |
| | | }); |
| | | //8 |
| | | number8FL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("number_8", "8"); |
| | | }); |
| | | //9 |
| | | number9FL.SetClickListener(() => |
| | | { |
| | | KeyControl("number_9", "9"); |
| | | |
| | | }); |
| | | |
| | | //音轨 |
| | | yinguiFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("audio_track", "音轨"); |
| | | }); |
| | | //0 |
| | | number0FL.SetClickListener(() => |
| | | { |
| | | KeyControl("number_0", "0"); |
| | | |
| | | }); |
| | | //字幕 |
| | | zimuFL.SetClickListener(() => |
| | | { |
| | | KeyControl("subtitle", "字幕"); |
| | | |
| | | }); |
| | | //静音 |
| | | jingyinFL.SetClickListener(() => |
| | | { |
| | | KeyControl("mute", "静音"); |
| | | |
| | | }); |
| | | //投屏 |
| | | toupingFL.SetClickListener(() => |
| | | { |
| | | KeyControl("main", "投屏"); |
| | | |
| | | }); |
| | | //主页 |
| | | zhuyeFL.SetClickListener(() => |
| | | { |
| | | KeyControl("home", "主页"); |
| | | |
| | | }); |
| | | //左 |
| | | btnLeft.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_left_selected.png"; |
| | | KeyControl("key_left", "左"); |
| | | |
| | | }; |
| | | //前 |
| | | btnQian.MouseDownEventHandler += (sender, e) => |
| | | //上 |
| | | btnShang.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_qian_selected.png"; |
| | | KeyControl("key_up", "上"); |
| | | |
| | | }; |
| | | |
| | |
| | | btnRight.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_right_selected.png"; |
| | | KeyControl("key_right", "右"); |
| | | |
| | | }; |
| | | |
| | | //后 |
| | | btnHou.MouseDownEventHandler += (sender, e) => |
| | | //下 |
| | | btnXia.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_hou_selected.png"; |
| | | KeyControl("key_down", "下"); |
| | | }; |
| | | //OK |
| | | btnOk.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_ok_selected.png"; |
| | | KeyControl("key_ok", "确定"); |
| | | }; |
| | | //加 |
| | | btnJia.MouseDownEventHandler += (sen, e) => { }; |
| | | //减 |
| | | btnJian.MouseDownEventHandler += (sen, e) => { }; |
| | | //上 |
| | | btnShang.MouseDownEventHandler += (sen, e) => { }; |
| | | //下 |
| | | btnXia.MouseDownEventHandler += (sen, e) => { }; |
| | | //音量+ |
| | | btnYingliangjia.MouseDownEventHandler += (sen, e) => { |
| | | KeyControl("volume_up", "音量+"); |
| | | }; |
| | | //音量- |
| | | btnYingliangjian.MouseDownEventHandler += (sen, e) => { |
| | | KeyControl("volume_down", "音量-"); |
| | | }; |
| | | //频道+ |
| | | btnPindaojia.MouseDownEventHandler += (sen, e) => { |
| | | KeyControl("ch_up", "频道+"); |
| | | }; |
| | | //频道- |
| | | btnPindaojian.MouseDownEventHandler += (sen, e) => { |
| | | KeyControl("ch_down", "频道-"); |
| | | }; |
| | | |
| | | //菜单 |
| | | caidanFL.SetClickListener(() => |
| | | { |
| | | KeyControl("menu", "菜单"); |
| | | |
| | | }); |
| | | //返回 |
| | | fanhuiFL.SetClickListener(() => |
| | | { |
| | | KeyControl("return", "返回"); |
| | | |
| | | }); |
| | | //上一部 |
| | | shanyibuFL.SetClickListener(() => |
| | | { |
| | | KeyControl("part_up", "上一部"); |
| | | |
| | | }); |
| | | //播放 |
| | | bofangFL.SetClickListener(() => |
| | | { |
| | | KeyControl("play", "播放"); |
| | | |
| | | }); |
| | | //下一部 |
| | | xiayibuFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("part_down", "下一部"); |
| | | }); |
| | | //快退 |
| | | kuaituiFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("fast_rewind", "快退"); |
| | | }); |
| | | //暂停 |
| | | zantingFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("pause", "暂停"); |
| | | }); |
| | | //快进 |
| | | kusinjinFL.SetClickListener(() => |
| | | { |
| | | |
| | | KeyControl("fast_forward", "快进"); |
| | | }); |
| | | //灯关 |
| | | dengguanFL.SetClickListener(() => |
| | | { |
| | | KeyControl("lamp", "灯关"); |
| | | |
| | | }); |
| | | //停止 |
| | | tingzhiFL.SetClickListener(() => |
| | | { |
| | | KeyControl("stop", "停止"); |
| | | |
| | | }); |
| | | //单控灯 |
| | | dankongdengFL.SetClickListener(() => |
| | | { |
| | | KeyControl("lamp_plc", "单控灯"); |
| | | |
| | | }); |
| | | |
| | |
| | | layout.AddChidren(baseFl); |
| | | |
| | | |
| | | btnJia = new Button |
| | | btnYingliangjia = new Button |
| | | { |
| | | Y = Application.GetRealHeight(32), |
| | | X = Application.GetRealWidth(26), |
| | |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "AksIcon/ykq_jia.png", |
| | | }; |
| | | baseFl.AddChidren(btnJia); |
| | | baseFl.AddChidren(btnYingliangjia); |
| | | |
| | | |
| | | btnJian = new Button |
| | | btnYingliangjian = new Button |
| | | { |
| | | Y = btnJia.Bottom + Application.GetRealHeight(71), |
| | | Y = btnYingliangjia.Bottom + Application.GetRealHeight(71), |
| | | X = Application.GetRealWidth(26), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "AksIcon/ykq_jian.png", |
| | | }; |
| | | baseFl.AddChidren(btnJian); |
| | | baseFl.AddChidren(btnYingliangjian); |
| | | |
| | | |
| | | btnShang = new Button |
| | | btnPindaojia = new Button |
| | | { |
| | | Y = Application.GetRealHeight(32), |
| | | X = Application.GetRealWidth(170), |
| | |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "AksIcon/ykq_shang.png", |
| | | }; |
| | | baseFl.AddChidren(btnShang); |
| | | baseFl.AddChidren(btnPindaojia); |
| | | |
| | | |
| | | btnXia = new Button |
| | | btnPindaojian = new Button |
| | | { |
| | | Y = btnShang.Bottom + Application.GetRealHeight(71), |
| | | Y = btnPindaojia.Bottom + Application.GetRealHeight(71), |
| | | X = Application.GetRealWidth(170), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "AksIcon/ykq_xia.png", |
| | | }; |
| | | baseFl.AddChidren(btnXia); |
| | | baseFl.AddChidren(btnPindaojian); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | btnQian = new Button |
| | | btnShang = new Button |
| | | { |
| | | Width = Application.GetRealWidth(40), |
| | | Height = Application.GetRealHeight(30), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | }; |
| | | |
| | | okFl.AddChidren(btnQian); |
| | | okFl.AddChidren(btnShang); |
| | | |
| | | btnRight = new Button |
| | | { |
| | |
| | | |
| | | okFl.AddChidren(btnRight); |
| | | |
| | | btnHou = new Button |
| | | btnXia = new Button |
| | | { |
| | | Width = Application.GetRealWidth(40), |
| | | Height = Application.GetRealHeight(30), |
| | | Gravity = Gravity.BottomCenter, |
| | | }; |
| | | okFl.AddChidren(btnHou); |
| | | okFl.AddChidren(btnXia); |
| | | |
| | | |
| | | |
| | |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; |
| | | |
| | | }; |
| | | btnQian.MouseUpEventHandler += (sender, e) => |
| | | btnShang.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; |
| | | |
| | |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; |
| | | |
| | | }; |
| | | btnHou.MouseUpEventHandler += (sender, e) => |
| | | btnXia.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; |
| | | |
| | |
| | | this.AdjustRealHeight(16); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 按键控制 |
| | | /// </summary> |
| | | /// <param name="keypad"><按键标识/param> |
| | | /// <param name="keyName"><按键名称(打印用的)/param> |
| | | private void KeyControl(string keypad, string keyName) |
| | | { |
| | | //CommonMethod.Current.Loading.Start(); |
| | | CommonMethod.Current.SunThread(() => |
| | | { |
| | | try |
| | | { |
| | | SendMethod.Current.KeypadExecute(remoteControl.deviceId, remoteControl.rcId, keypad, keyName); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | //CommonMethod.Current.Loading.Hide(); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | clickFl.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | //this.BackgroundColor = 0xff484378; |
| | | this.BackgroundColor = 0xff798394; |
| | | action?.Invoke(); |
| | | }; |
| | | |
| | | clickFl.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //this.BackgroundColor = 0xff484378; |
| | | this.BackgroundColor = 0x00000000; |
| | | }; |
| | | |
| | | |
| | | } |
| | | |