From a4e9d02ce5cfc501ef9fecac0047c332b5426df2 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 14 八月 2023 15:16:01 +0800
Subject: [PATCH] 2023年08月14日15:15:49

---
 HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs |  166 +++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 111 insertions(+), 55 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
index 4c96121..c9f223b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
@@ -3,6 +3,7 @@
 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
@@ -62,14 +63,14 @@
         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;
@@ -106,133 +107,145 @@
             //寮�鍏�
             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", "涓�");
 
             };
 
@@ -240,81 +253,99 @@
             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", "鍗曟帶鐏�");
 
             });
 
@@ -692,7 +723,7 @@
             layout.AddChidren(baseFl);
 
 
-            btnJia = new Button
+            btnYingliangjia = new Button
             {
                 Y = Application.GetRealHeight(32),
                 X = Application.GetRealWidth(26),
@@ -700,21 +731,21 @@
                 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),
@@ -722,18 +753,18 @@
                 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);
 
 
 
@@ -760,14 +791,14 @@
 
 
 
-            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
             {
@@ -778,13 +809,13 @@
 
             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);
 
 
 
@@ -803,7 +834,7 @@
                 okFl.BackgroundImagePath = "AksIcon/ykq_ok.png";
 
             };
-            btnQian.MouseUpEventHandler += (sender, e) =>
+            btnShang.MouseUpEventHandler += (sender, e) =>
             {
                 okFl.BackgroundImagePath = "AksIcon/ykq_ok.png";
 
@@ -813,7 +844,7 @@
                 okFl.BackgroundImagePath = "AksIcon/ykq_ok.png";
 
             };
-            btnHou.MouseUpEventHandler += (sender, e) =>
+            btnXia.MouseUpEventHandler += (sender, e) =>
             {
                 okFl.BackgroundImagePath = "AksIcon/ykq_ok.png";
 
@@ -1003,6 +1034,32 @@
             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>
@@ -1110,15 +1167,14 @@
         {
             clickFl.MouseDownEventHandler += (sender, e) =>
             {
-                //this.BackgroundColor = 0xff484378;
+                this.BackgroundColor = 0xff798394;
                 action?.Invoke();
             };
 
             clickFl.MouseUpEventHandler += (sender, e) =>
             {
-                //this.BackgroundColor = 0xff484378;
+                this.BackgroundColor = 0x00000000;
             };
-
 
         }
 

--
Gitblit v1.8.0