From d6c77fe8cdf1052d5b28094febb5c7e202bccd56 Mon Sep 17 00:00:00 2001 From: Michel Jean Date: Sat, 17 Feb 2024 19:13:49 +0100 Subject: [PATCH] Added 0-9 keybind --- MagicRemoteService/Properties/AssemblyInfo.cs | 4 +- .../TV/MagicRemoteService/appinfo.json | 12 +- .../TV/MagicRemoteService/appstring.json | 3 +- .../Resources/TV/MagicRemoteService/main.js | 24 +- .../resources/es/appinfo.json | 3 +- .../resources/es/appstring.json | 2 +- .../resources/fr/appinfo.json | 3 +- .../resources/fr/appstring.json | 2 +- MagicRemoteService/Service.cs | 56 +- MagicRemoteService/Setting.Designer.cs | 190 +++++ MagicRemoteService/Setting.cs | 71 +- MagicRemoteService/Setting.resx | 684 ++++++++++++++++-- 12 files changed, 916 insertions(+), 138 deletions(-) diff --git a/MagicRemoteService/Properties/AssemblyInfo.cs b/MagicRemoteService/Properties/AssemblyInfo.cs index 476bd26..7c8d2ad 100644 --- a/MagicRemoteService/Properties/AssemblyInfo.cs +++ b/MagicRemoteService/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut // en utilisant '*', comme indiqué ci-dessous : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.3.0")] -[assembly: AssemblyFileVersion("1.2.3.0")] +[assembly: AssemblyVersion("1.2.3.1")] +[assembly: AssemblyFileVersion("1.2.3.1")] diff --git a/MagicRemoteService/Resources/TV/MagicRemoteService/appinfo.json b/MagicRemoteService/Resources/TV/MagicRemoteService/appinfo.json index 895af50..837bc5b 100644 --- a/MagicRemoteService/Resources/TV/MagicRemoteService/appinfo.json +++ b/MagicRemoteService/Resources/TV/MagicRemoteService/appinfo.json @@ -1,20 +1,16 @@ { "id": "com.cathwyler.magicremoteservice", - "title": "MagicRemoteService", "main": "index.html", + "title": "MagicRemoteService", "icon": "icon.png", "largeIcon": "largeIcon.png", - "iconColor": "#575E66", "type": "web", "vendor": "Cathwyler", "version": "1.0.0", - "appDescription": "Service providing computer remote control using a LG WebOS TV", - "label": "HDMI1", - "displayName": "HDMI2", - "appmenu": "HDMI3", "bgColor": "#575E66", - "supportTouchMode": "none", + "iconColor": "#575E66", + "appDescription": "HDMI", + "appDescriptionLong": "Service providing computer remote control using a LG WebOS TV", "disableBackHistoryAPI": true, - "transparent": true, "supportGIP": true } \ No newline at end of file diff --git a/MagicRemoteService/Resources/TV/MagicRemoteService/appstring.json b/MagicRemoteService/Resources/TV/MagicRemoteService/appstring.json index 285a5fb..7bd80b6 100644 --- a/MagicRemoteService/Resources/TV/MagicRemoteService/appstring.json +++ b/MagicRemoteService/Resources/TV/MagicRemoteService/appstring.json @@ -1,6 +1,7 @@ { "strAppTittle": "MagicRemoteService", - "strAppDescription": "Service providing computer remote control using a LG WebOS TV", + "strAppDescription": "HDMI", + "strAppDescriptionLong": "Service providing computer remote control using a LG WebOS TV", "strLogTitle": "Log", "strWarnTitle": "Warn", diff --git a/MagicRemoteService/Resources/TV/MagicRemoteService/main.js b/MagicRemoteService/Resources/TV/MagicRemoteService/main.js index b9295fe..66a7959 100644 --- a/MagicRemoteService/Resources/TV/MagicRemoteService/main.js +++ b/MagicRemoteService/Resources/TV/MagicRemoteService/main.js @@ -421,20 +421,20 @@ function SubscriptionGetSensorData() { } function AddDevice() { - webOS.service.request("luna://com.webos.service.eim", { - method: "addDevice", - parameters: { - appId: sAppID, - pigImage: "", - mvpdIcon: "", - type: "MVPD_IP", - showPopup: true, - label: oString.strAppTittle + " " + sInputName, - description: oString.strAppDescription, - }, + webOS.service.request("luna://com.webos.service.eim", { + method: "addDevice", + parameters: { + appId: sAppID, + pigImage: "", + mvpdIcon: "", + type: "MVPD_IP", + showPopup: true, + label: oString.strAppTittle, + description: oString.strAppDescription + }, onSuccess: function(inResponse) { LogIfDebug(oString.strAddDeviceSuccess); - }, + }, onFailure: function(inError) { switch(inError.errorCode) { case -1: diff --git a/MagicRemoteService/Resources/TV/MagicRemoteService/resources/es/appinfo.json b/MagicRemoteService/Resources/TV/MagicRemoteService/resources/es/appinfo.json index a6129a4..2066db6 100644 --- a/MagicRemoteService/Resources/TV/MagicRemoteService/resources/es/appinfo.json +++ b/MagicRemoteService/Resources/TV/MagicRemoteService/resources/es/appinfo.json @@ -1,4 +1,3 @@ { - "title": "MagicRemoteService", - "appDescription": "Servicio que proporciona control remoto de computadora usando un televisor LG WebOS" + "appDescriptionLong": "Servicio que proporciona control remoto de computadora usando un televisor LG WebOS" } \ No newline at end of file diff --git a/MagicRemoteService/Resources/TV/MagicRemoteService/resources/es/appstring.json b/MagicRemoteService/Resources/TV/MagicRemoteService/resources/es/appstring.json index 562a223..57002fe 100644 --- a/MagicRemoteService/Resources/TV/MagicRemoteService/resources/es/appstring.json +++ b/MagicRemoteService/Resources/TV/MagicRemoteService/resources/es/appstring.json @@ -1,6 +1,6 @@ { "strAppTittle": "MagicRemoteService", - "strAppDescription": "Servicio que proporciona control remoto de computadora usando un televisor LG WebOS", + "strAppDescriptionLong": "Servicio que proporciona control remoto de computadora usando un televisor LG WebOS", "strLogTitle": "Registro", "strWarnTitle": "Aviso", diff --git a/MagicRemoteService/Resources/TV/MagicRemoteService/resources/fr/appinfo.json b/MagicRemoteService/Resources/TV/MagicRemoteService/resources/fr/appinfo.json index 91b7213..c6b4b9a 100644 --- a/MagicRemoteService/Resources/TV/MagicRemoteService/resources/fr/appinfo.json +++ b/MagicRemoteService/Resources/TV/MagicRemoteService/resources/fr/appinfo.json @@ -1,4 +1,3 @@ { - "title": "MagicRemoteService", - "appDescription": "Service permettant de contrôler un ordinateur à l'aide d'une TV WebOS LG" + "appDescriptionLong": "Service permettant de contrôler un ordinateur à l'aide d'une TV WebOS LG" } \ No newline at end of file diff --git a/MagicRemoteService/Resources/TV/MagicRemoteService/resources/fr/appstring.json b/MagicRemoteService/Resources/TV/MagicRemoteService/resources/fr/appstring.json index bc56b47..a1d0f7e 100644 --- a/MagicRemoteService/Resources/TV/MagicRemoteService/resources/fr/appstring.json +++ b/MagicRemoteService/Resources/TV/MagicRemoteService/resources/fr/appstring.json @@ -1,6 +1,6 @@ { "strAppTittle": "MagicRemoteService", - "strAppDescription": "Service permettant de contrôler un ordinateur à l'aide d'une TV WebOS LG", + "strAppDescriptionLong": "Service permettant de contrôler un ordinateur à l'aide d'une TV WebOS LG", "strLogTitle": "Evenement", "strWarnTitle": "Attention", diff --git a/MagicRemoteService/Service.cs b/MagicRemoteService/Service.cs index 1a7dddc..205699d 100644 --- a/MagicRemoteService/Service.cs +++ b/MagicRemoteService/Service.cs @@ -34,6 +34,16 @@ public partial class Service : System.ServiceProcess.ServiceBase { { 0x0026, null }, { 0x0027, null }, { 0x0028, null }, + { 0x0030, null }, + { 0x0031, null }, + { 0x0032, null }, + { 0x0033, null }, + { 0x0034, null }, + { 0x0035, null }, + { 0x0036, null }, + { 0x0037, null }, + { 0x0038, null }, + { 0x0039, null }, { 0x0193, null }, { 0x0194, null }, { 0x0195, null }, @@ -134,24 +144,34 @@ public void ServiceStart() { } Microsoft.Win32.RegistryKey rkMagicRemoteServiceRemoteBind = (MagicRemoteService.Program.bElevated ? Microsoft.Win32.Registry.LocalMachine : Microsoft.Win32.Registry.CurrentUser).OpenSubKey("Software\\MagicRemoteService\\Remote\\Bind"); if(rkMagicRemoteServiceRemoteBind == null) { - this.dBind[0x0001] = new Bind[] { new BindMouse(BindMouseValue.Left) }; //Click -> Left click - this.dBind[0x0002] = new Bind[] { new BindMouse(BindMouseValue.Right) }; //LongClick -> Right click - this.dBind[0x0008] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Back, 0x0E, false) }; //BackSpace -> Keyboard Delete - this.dBind[0x000D] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Enter, 0x1C, false) }; //Ok -> Keyboard Return Enter - this.dBind[0x0025] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Left, 0x4B, true) }; //Left -> Keyboard LeftArrow - this.dBind[0x0026] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Up, 0x48, true) }; //Up -> Keyboard UpArrow - this.dBind[0x0027] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Right, 0x4D, true) }; //Right -> Keyboard RightArrow - this.dBind[0x0028] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Down, 0x50, true) }; //Down -> Keyboard DownArrow - this.dBind[0x0193] = new Bind[] { new BindAction(BindActionValue.Shutdown) }; //Red -> Show shutdown - this.dBind[0x0194] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.LWin, 0x5B, true) }; //Green -> Keyboard Left GUI - this.dBind[0x0195] = new Bind[] { new BindMouse(BindMouseValue.Right) }; //Yellow -> Right click - this.dBind[0x0196] = new Bind[] { new BindAction(BindActionValue.Keyboard) }; //Blue -> Show keyboard - this.dBind[0x01CD] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Escape, 0x01, false) }; //Back -> Keyboard Escape - this.dBind[0x019F] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Play, 0x00, false) }; //Play -> Play/Pause - this.dBind[0x0013] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Pause, 0x00, false) }; //Pause -> Play/Pause - this.dBind[0x01A1] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaNextTrack, 0x00, false) }; //FastForward -> Scan Next Track - this.dBind[0x019C] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaPreviousTrack, 0x00, false) }; //Rewind -> Scan Previous Track - this.dBind[0x019D] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaStop, 0x00, false) }; //Stop -> Stop + this.dBind[0x0001] = new Bind[] { new BindMouse(BindMouseValue.Left) }; + this.dBind[0x0002] = new Bind[] { new BindMouse(BindMouseValue.Right) }; + this.dBind[0x0008] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Back, 0x0E, false) }; + this.dBind[0x000D] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Enter, 0x1C, false) }; + this.dBind[0x0025] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Left, 0x4B, true) }; + this.dBind[0x0026] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Up, 0x48, true) }; + this.dBind[0x0027] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Right, 0x4D, true) }; + this.dBind[0x0028] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Down, 0x50, true) }; + this.dBind[0x0030] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad0, 0x52, false) }; + this.dBind[0x0031] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad1, 0x4F, false) }; + this.dBind[0x0032] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad2, 0x50, false) }; + this.dBind[0x0033] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad3, 0x51, false) }; + this.dBind[0x0034] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad4, 0x4B, false) }; + this.dBind[0x0035] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad5, 0x4C, false) }; + this.dBind[0x0036] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad6, 0x4D, false) }; + this.dBind[0x0037] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad7, 0x47, false) }; + this.dBind[0x0038] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad8, 0x48, false) }; + this.dBind[0x0039] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad9, 0x49, false) }; + this.dBind[0x0193] = new Bind[] { new BindAction(BindActionValue.Shutdown) }; + this.dBind[0x0194] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.LWin, 0x5B, true) }; + this.dBind[0x0195] = new Bind[] { new BindMouse(BindMouseValue.Right) }; + this.dBind[0x0196] = new Bind[] { new BindAction(BindActionValue.Keyboard) }; + this.dBind[0x01CD] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Escape, 0x01, false) }; + this.dBind[0x019F] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Play, 0x00, false) }; + this.dBind[0x0013] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Pause, 0x00, false) }; + this.dBind[0x01A1] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaNextTrack, 0x00, false) }; + this.dBind[0x019C] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaPreviousTrack, 0x00, false) }; + this.dBind[0x019D] = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaStop, 0x00, false) }; } else { foreach(string sKey in rkMagicRemoteServiceRemoteBind.GetSubKeyNames()) { System.Collections.Generic.List liBind = new System.Collections.Generic.List(); diff --git a/MagicRemoteService/Setting.Designer.cs b/MagicRemoteService/Setting.Designer.cs index eb52d22..246164b 100644 --- a/MagicRemoteService/Setting.Designer.cs +++ b/MagicRemoteService/Setting.Designer.cs @@ -65,6 +65,26 @@ private void InitializeComponent() { this.labTimeoutIncativity = new System.Windows.Forms.Label(); this.labTimeoutIncativityUnit = new System.Windows.Forms.Label(); this.tabRemote = new System.Windows.Forms.TabPage(); + this.bcRemote9 = new MagicRemoteService.BindControl(); + this.libRemote9 = new System.Windows.Forms.Label(); + this.bcRemote8 = new MagicRemoteService.BindControl(); + this.libRemote8 = new System.Windows.Forms.Label(); + this.bcRemote7 = new MagicRemoteService.BindControl(); + this.libRemote7 = new System.Windows.Forms.Label(); + this.bcRemote6 = new MagicRemoteService.BindControl(); + this.libRemote6 = new System.Windows.Forms.Label(); + this.bcRemote5 = new MagicRemoteService.BindControl(); + this.libRemote5 = new System.Windows.Forms.Label(); + this.bcRemote4 = new MagicRemoteService.BindControl(); + this.libRemote4 = new System.Windows.Forms.Label(); + this.bcRemote3 = new MagicRemoteService.BindControl(); + this.libRemote3 = new System.Windows.Forms.Label(); + this.bcRemote2 = new MagicRemoteService.BindControl(); + this.libRemote2 = new System.Windows.Forms.Label(); + this.bcRemote1 = new MagicRemoteService.BindControl(); + this.libRemote1 = new System.Windows.Forms.Label(); + this.bcRemote0 = new MagicRemoteService.BindControl(); + this.libRemote0 = new System.Windows.Forms.Label(); this.bcRemoteRewind = new MagicRemoteService.BindControl(); this.bcRemoteFastForward = new MagicRemoteService.BindControl(); this.bcRemotePause = new MagicRemoteService.BindControl(); @@ -419,6 +439,26 @@ private void InitializeComponent() { // // tabRemote // + this.tabRemote.Controls.Add(this.bcRemote9); + this.tabRemote.Controls.Add(this.libRemote9); + this.tabRemote.Controls.Add(this.bcRemote8); + this.tabRemote.Controls.Add(this.libRemote8); + this.tabRemote.Controls.Add(this.bcRemote7); + this.tabRemote.Controls.Add(this.libRemote7); + this.tabRemote.Controls.Add(this.bcRemote6); + this.tabRemote.Controls.Add(this.libRemote6); + this.tabRemote.Controls.Add(this.bcRemote5); + this.tabRemote.Controls.Add(this.libRemote5); + this.tabRemote.Controls.Add(this.bcRemote4); + this.tabRemote.Controls.Add(this.libRemote4); + this.tabRemote.Controls.Add(this.bcRemote3); + this.tabRemote.Controls.Add(this.libRemote3); + this.tabRemote.Controls.Add(this.bcRemote2); + this.tabRemote.Controls.Add(this.libRemote2); + this.tabRemote.Controls.Add(this.bcRemote1); + this.tabRemote.Controls.Add(this.libRemote1); + this.tabRemote.Controls.Add(this.bcRemote0); + this.tabRemote.Controls.Add(this.libRemote0); this.tabRemote.Controls.Add(this.bcRemoteRewind); this.tabRemote.Controls.Add(this.bcRemoteFastForward); this.tabRemote.Controls.Add(this.bcRemotePause); @@ -460,6 +500,136 @@ private void InitializeComponent() { this.tabRemote.Name = "tabRemote"; this.tabRemote.UseVisualStyleBackColor = true; // + // bcRemote9 + // + this.bcRemote9.BackColor = System.Drawing.SystemColors.Window; + this.bcRemote9.ForeColor = System.Drawing.SystemColors.WindowText; + resources.ApplyResources(this.bcRemote9, "bcRemote9"); + this.bcRemote9.Name = "bcRemote9"; + this.bcRemote9.Value = null; + // + // libRemote9 + // + resources.ApplyResources(this.libRemote9, "libRemote9"); + this.libRemote9.Name = "libRemote9"; + // + // bcRemote8 + // + this.bcRemote8.BackColor = System.Drawing.SystemColors.Window; + this.bcRemote8.ForeColor = System.Drawing.SystemColors.WindowText; + resources.ApplyResources(this.bcRemote8, "bcRemote8"); + this.bcRemote8.Name = "bcRemote8"; + this.bcRemote8.Value = null; + // + // libRemote8 + // + resources.ApplyResources(this.libRemote8, "libRemote8"); + this.libRemote8.Name = "libRemote8"; + // + // bcRemote7 + // + this.bcRemote7.BackColor = System.Drawing.SystemColors.Window; + this.bcRemote7.ForeColor = System.Drawing.SystemColors.WindowText; + resources.ApplyResources(this.bcRemote7, "bcRemote7"); + this.bcRemote7.Name = "bcRemote7"; + this.bcRemote7.Value = null; + // + // libRemote7 + // + resources.ApplyResources(this.libRemote7, "libRemote7"); + this.libRemote7.Name = "libRemote7"; + // + // bcRemote6 + // + this.bcRemote6.BackColor = System.Drawing.SystemColors.Window; + this.bcRemote6.ForeColor = System.Drawing.SystemColors.WindowText; + resources.ApplyResources(this.bcRemote6, "bcRemote6"); + this.bcRemote6.Name = "bcRemote6"; + this.bcRemote6.Value = null; + // + // libRemote6 + // + resources.ApplyResources(this.libRemote6, "libRemote6"); + this.libRemote6.Name = "libRemote6"; + // + // bcRemote5 + // + this.bcRemote5.BackColor = System.Drawing.SystemColors.Window; + this.bcRemote5.ForeColor = System.Drawing.SystemColors.WindowText; + resources.ApplyResources(this.bcRemote5, "bcRemote5"); + this.bcRemote5.Name = "bcRemote5"; + this.bcRemote5.Value = null; + // + // libRemote5 + // + resources.ApplyResources(this.libRemote5, "libRemote5"); + this.libRemote5.Name = "libRemote5"; + // + // bcRemote4 + // + this.bcRemote4.BackColor = System.Drawing.SystemColors.Window; + this.bcRemote4.ForeColor = System.Drawing.SystemColors.WindowText; + resources.ApplyResources(this.bcRemote4, "bcRemote4"); + this.bcRemote4.Name = "bcRemote4"; + this.bcRemote4.Value = null; + // + // libRemote4 + // + resources.ApplyResources(this.libRemote4, "libRemote4"); + this.libRemote4.Name = "libRemote4"; + // + // bcRemote3 + // + this.bcRemote3.BackColor = System.Drawing.SystemColors.Window; + this.bcRemote3.ForeColor = System.Drawing.SystemColors.WindowText; + resources.ApplyResources(this.bcRemote3, "bcRemote3"); + this.bcRemote3.Name = "bcRemote3"; + this.bcRemote3.Value = null; + // + // libRemote3 + // + resources.ApplyResources(this.libRemote3, "libRemote3"); + this.libRemote3.Name = "libRemote3"; + // + // bcRemote2 + // + this.bcRemote2.BackColor = System.Drawing.SystemColors.Window; + this.bcRemote2.ForeColor = System.Drawing.SystemColors.WindowText; + resources.ApplyResources(this.bcRemote2, "bcRemote2"); + this.bcRemote2.Name = "bcRemote2"; + this.bcRemote2.Value = null; + // + // libRemote2 + // + resources.ApplyResources(this.libRemote2, "libRemote2"); + this.libRemote2.Name = "libRemote2"; + // + // bcRemote1 + // + this.bcRemote1.BackColor = System.Drawing.SystemColors.Window; + this.bcRemote1.ForeColor = System.Drawing.SystemColors.WindowText; + resources.ApplyResources(this.bcRemote1, "bcRemote1"); + this.bcRemote1.Name = "bcRemote1"; + this.bcRemote1.Value = null; + // + // libRemote1 + // + resources.ApplyResources(this.libRemote1, "libRemote1"); + this.libRemote1.Name = "libRemote1"; + // + // bcRemote0 + // + this.bcRemote0.BackColor = System.Drawing.SystemColors.Window; + this.bcRemote0.ForeColor = System.Drawing.SystemColors.WindowText; + resources.ApplyResources(this.bcRemote0, "bcRemote0"); + this.bcRemote0.Name = "bcRemote0"; + this.bcRemote0.Value = null; + // + // libRemote0 + // + resources.ApplyResources(this.libRemote0, "libRemote0"); + this.libRemote0.Name = "libRemote0"; + // // bcRemoteRewind // this.bcRemoteRewind.BackColor = System.Drawing.SystemColors.Window; @@ -805,5 +975,25 @@ private void InitializeComponent() { private System.Windows.Forms.ComboBox cbbDisplay; private System.Windows.Forms.Button btnTVInspect; private System.Windows.Forms.CheckBox cbInputDirect; + private BindControl bcRemote9; + private System.Windows.Forms.Label libRemote9; + private BindControl bcRemote8; + private System.Windows.Forms.Label libRemote8; + private BindControl bcRemote7; + private System.Windows.Forms.Label libRemote7; + private BindControl bcRemote6; + private System.Windows.Forms.Label libRemote6; + private BindControl bcRemote5; + private System.Windows.Forms.Label libRemote5; + private BindControl bcRemote4; + private BindControl bcRemote3; + private System.Windows.Forms.Label libRemote3; + private BindControl bcRemote2; + private System.Windows.Forms.Label libRemote2; + private BindControl bcRemote1; + private System.Windows.Forms.Label libRemote1; + private BindControl bcRemote0; + private System.Windows.Forms.Label libRemote0; + private System.Windows.Forms.Label libRemote4; } } \ No newline at end of file diff --git a/MagicRemoteService/Setting.cs b/MagicRemoteService/Setting.cs index 4d53b0c..2f0e835 100644 --- a/MagicRemoteService/Setting.cs +++ b/MagicRemoteService/Setting.cs @@ -47,6 +47,16 @@ static Setting() { { 0x0026, null }, { 0x0027, null }, { 0x0028, null }, + { 0x0030, null }, + { 0x0031, null }, + { 0x0032, null }, + { 0x0033, null }, + { 0x0034, null }, + { 0x0035, null }, + { 0x0036, null }, + { 0x0037, null }, + { 0x0038, null }, + { 0x0039, null }, { 0x0193, null }, { 0x0194, null }, { 0x0195, null }, @@ -71,6 +81,16 @@ public Setting(MagicRemoteService.Service mrs) { { 0x0026, this.bcRemoteUp }, { 0x0027, this.bcRemoteRight }, { 0x0028, this.bcRemoteDown }, + { 0x0030, this.bcRemote0 }, + { 0x0031, this.bcRemote1 }, + { 0x0032, this.bcRemote2 }, + { 0x0033, this.bcRemote3 }, + { 0x0034, this.bcRemote4 }, + { 0x0035, this.bcRemote5 }, + { 0x0036, this.bcRemote6 }, + { 0x0037, this.bcRemote7 }, + { 0x0038, this.bcRemote8 }, + { 0x0039, this.bcRemote9 }, { 0x0193, this.bcRemoteRed }, { 0x0194, this.bcRemoteGreen }, { 0x0195, this.bcRemoteYellow }, @@ -308,24 +328,34 @@ public void TVDataSave() { public void RemoteDataRefresh() { Microsoft.Win32.RegistryKey rkMagicRemoteServiceRemoteBind = (MagicRemoteService.Program.bElevated ? Microsoft.Win32.Registry.LocalMachine : Microsoft.Win32.Registry.CurrentUser).OpenSubKey("Software\\MagicRemoteService\\Remote\\Bind"); if(rkMagicRemoteServiceRemoteBind == null) { - this.dBindControl[0x0001].Value = new Bind[] { new BindMouse(BindMouseValue.Left) }; //Click -> Left click - this.dBindControl[0x0002].Value = new Bind[] { new BindMouse(BindMouseValue.Right) }; //LongClick -> Right click - this.dBindControl[0x0008].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Back, 0x0E, false) }; //Backspace -> Keyboard Delete - this.dBindControl[0x000D].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Enter, 0x1C, false) }; //Ok -> Keyboard Return Enter - this.dBindControl[0x0025].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Left, 0x4B, true) }; //Left -> Keyboard LeftArrow - this.dBindControl[0x0026].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Up, 0x48, true) }; //Up -> Keyboard UpArrow - this.dBindControl[0x0027].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Right, 0x4D, true) }; //Right -> Keyboard RightArrow - this.dBindControl[0x0028].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Down, 0x50, true) }; //Down -> Keyboard DownArrow - this.dBindControl[0x0193].Value = new Bind[] { new BindAction(BindActionValue.Shutdown) }; //Red -> Show shutdown - this.dBindControl[0x0194].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.LWin, 0x5B, true) }; //Green -> Keyboard Left GUI - this.dBindControl[0x0195].Value = new Bind[] { new BindMouse(BindMouseValue.Right) }; //Yellow -> Right click - this.dBindControl[0x0196].Value = new Bind[] { new BindAction(BindActionValue.Keyboard) }; //Blue -> Show keyboard - this.dBindControl[0x01CD].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Escape, 0x01, false) }; //Back -> Keyboard Escape - this.dBindControl[0x019F].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Play, 0x00, false) }; //Play -> Play/Pause - this.dBindControl[0x0013].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Pause, 0x00, false) }; //Pause -> Play/Pause - this.dBindControl[0x01A1].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaNextTrack, 0x00, false) }; //FastForward -> Scan Next Track - this.dBindControl[0x019C].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaPreviousTrack, 0x00, false) }; //Rewind -> Scan Previous Track - this.dBindControl[0x019D].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaStop, 0x00, false) }; //Stop -> Stop + this.dBindControl[0x0001].Value = new Bind[] { new BindMouse(BindMouseValue.Left) }; + this.dBindControl[0x0002].Value = new Bind[] { new BindMouse(BindMouseValue.Right) }; + this.dBindControl[0x0008].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Back, 0x0E, false) }; + this.dBindControl[0x000D].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Enter, 0x1C, false) }; + this.dBindControl[0x0025].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Left, 0x4B, true) }; + this.dBindControl[0x0026].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Up, 0x48, true) }; + this.dBindControl[0x0027].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Right, 0x4D, true) }; + this.dBindControl[0x0028].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Down, 0x50, true) }; + this.dBindControl[0x0030].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad0, 0x52, false) }; + this.dBindControl[0x0031].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad1, 0x4F, false) }; + this.dBindControl[0x0032].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad2, 0x50, false) }; + this.dBindControl[0x0033].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad3, 0x51, false) }; + this.dBindControl[0x0034].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad4, 0x4B, false) }; + this.dBindControl[0x0035].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad5, 0x4C, false) }; + this.dBindControl[0x0036].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad6, 0x4D, false) }; + this.dBindControl[0x0037].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad7, 0x47, false) }; + this.dBindControl[0x0038].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad8, 0x48, false) }; + this.dBindControl[0x0039].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.NumPad9, 0x49, false) }; + this.dBindControl[0x0193].Value = new Bind[] { new BindAction(BindActionValue.Shutdown) }; + this.dBindControl[0x0194].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.LWin, 0x5B, true) }; + this.dBindControl[0x0195].Value = new Bind[] { new BindMouse(BindMouseValue.Right) }; + this.dBindControl[0x0196].Value = new Bind[] { new BindAction(BindActionValue.Keyboard) }; + this.dBindControl[0x01CD].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Escape, 0x01, false) }; + this.dBindControl[0x019F].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Play, 0x00, false) }; + this.dBindControl[0x0013].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.Pause, 0x00, false) }; + this.dBindControl[0x01A1].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaNextTrack, 0x00, false) }; + this.dBindControl[0x019C].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaPreviousTrack, 0x00, false) }; + this.dBindControl[0x019D].Value = new Bind[] { new BindKeyboard((byte)System.Windows.Forms.Keys.MediaStop, 0x00, false) }; } else { foreach(string sKey in rkMagicRemoteServiceRemoteBind.GetSubKeyNames()) { System.Collections.Generic.List liBind = new System.Collections.Generic.List(); @@ -427,8 +457,11 @@ bool bInputDirect System.IO.File.WriteAllText(".\\TV\\MagicRemoteService\\appinfo.json", MagicRemoteService.Properties.Resources.appinfo .Replace("\"id\": \"com.cathwyler.magicremoteservice\"", "\"id\": \"com.cathwyler.magicremoteservice." + wocdiInput.AppIdShort + "\"") .Replace("\"version\": \"1.0.0\"", "\"version\": \"" + strVersion + "\"") + .Replace("\"appDescription\": \"HDMI\"", "\"appDescription\": \"" + wocdiInput.Name + "\"") + ); + System.IO.File.WriteAllText(".\\TV\\MagicRemoteService\\appstring.json", MagicRemoteService.Properties.Resources.appstring + .Replace("\"strAppDescription\": \"HDMI\"", "\"strAppDescription\": \"" + wocdiInput.Name + "\"") ); - System.IO.File.WriteAllText(".\\TV\\MagicRemoteService\\appstring.json", MagicRemoteService.Properties.Resources.appstring); System.IO.File.WriteAllBytes(".\\TV\\MagicRemoteService\\icon.png", MagicRemoteService.Properties.Resources.icon); System.IO.File.WriteAllBytes(".\\TV\\MagicRemoteService\\largeIcon.png", MagicRemoteService.Properties.Resources.largeIcon); System.IO.File.WriteAllBytes(".\\TV\\MagicRemoteService\\MuseoSans-Medium.ttf", MagicRemoteService.Properties.Resources.MuseoSans_Medium); diff --git a/MagicRemoteService/Setting.resx b/MagicRemoteService/Setting.resx index 3b33119..b1e287d 100644 --- a/MagicRemoteService/Setting.resx +++ b/MagicRemoteService/Setting.resx @@ -126,10 +126,10 @@ - 336, 369 + 490, 369 - 102, 23 + 100, 23 @@ -190,10 +190,10 @@ NoControl - 310, 264 + 333, 264 - 102, 23 + 100, 23 57 @@ -244,7 +244,7 @@ 2 - 152, 61 + 175, 61 152, 21 @@ -268,10 +268,10 @@ NoControl - 310, 87 + 333, 87 - 102, 23 + 100, 23 54 @@ -295,10 +295,10 @@ NoControl - 310, 60 + 333, 60 - 102, 23 + 100, 23 53 @@ -322,10 +322,10 @@ NoControl - 310, 33 + 333, 33 - 102, 23 + 100, 23 52 @@ -406,7 +406,7 @@ 8 - 152, 88 + 175, 88 6, 6, 6, 6 @@ -433,7 +433,7 @@ 9 - 152, 114 + 175, 114 100, 20 @@ -457,7 +457,7 @@ None - 152, 166 + 175, 166 6, 6, 6, 6 @@ -514,7 +514,7 @@ 12 - 152, 140 + 175, 140 6, 6, 6, 6 @@ -544,10 +544,10 @@ NoControl - 152, 264 + 175, 264 - 102, 23 + 100, 23 49 @@ -601,10 +601,10 @@ NoControl - 310, 6 + 333, 6 - 102, 23 + 100, 23 48 @@ -691,7 +691,7 @@ NoControl - 258, 194 + 281, 194 20, 13 @@ -775,7 +775,7 @@ 21 - 152, 192 + 175, 192 100, 20 @@ -796,7 +796,7 @@ 22 - 152, 34 + 175, 34 152, 21 @@ -817,7 +817,7 @@ 23 - 152, 7 + 175, 7 152, 21 @@ -844,7 +844,7 @@ 3, 3, 3, 3 - 418, 325 + 570, 325 0 @@ -928,10 +928,10 @@ NoControl - 151, 105 + 175, 105 - 102, 23 + 100, 23 27 @@ -952,7 +952,7 @@ 2 - 152, 7 + 175, 7 100, 20 @@ -1003,7 +1003,7 @@ 4 - 152, 56 + 175, 56 100, 20 @@ -1060,7 +1060,7 @@ NoControl - 258, 58 + 281, 58 20, 13 @@ -1090,7 +1090,7 @@ 3, 3, 3, 3 - 418, 325 + 570, 325 1 @@ -1110,6 +1110,546 @@ 1 + + 443, 267 + + + 6, 6, 6, 6 + + + 118, 23 + + + 141 + + + bcRemote9 + + + MagicRemoteService.BindControl, MagicRemoteService, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null + + + tabRemote + + + 0 + + + True + + + NoControl + + + 421, 272 + + + 13, 13 + + + 140 + + + 9 + + + libRemote9 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabRemote + + + 1 + + + 443, 238 + + + 6, 6, 6, 6 + + + 118, 23 + + + 139 + + + bcRemote8 + + + MagicRemoteService.BindControl, MagicRemoteService, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null + + + tabRemote + + + 2 + + + True + + + NoControl + + + 421, 243 + + + 13, 13 + + + 138 + + + 8 + + + libRemote8 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabRemote + + + 3 + + + 443, 209 + + + 6, 6, 6, 6 + + + 118, 23 + + + 137 + + + bcRemote7 + + + MagicRemoteService.BindControl, MagicRemoteService, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null + + + tabRemote + + + 4 + + + True + + + NoControl + + + 421, 214 + + + 13, 13 + + + 136 + + + 7 + + + libRemote7 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabRemote + + + 5 + + + 443, 180 + + + 6, 6, 6, 6 + + + 118, 23 + + + 135 + + + bcRemote6 + + + MagicRemoteService.BindControl, MagicRemoteService, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null + + + tabRemote + + + 6 + + + True + + + NoControl + + + 421, 185 + + + 13, 13 + + + 134 + + + 6 + + + libRemote6 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabRemote + + + 7 + + + 443, 151 + + + 6, 6, 6, 6 + + + 118, 23 + + + 133 + + + bcRemote5 + + + MagicRemoteService.BindControl, MagicRemoteService, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null + + + tabRemote + + + 8 + + + True + + + NoControl + + + 421, 156 + + + 13, 13 + + + 132 + + + 5 + + + libRemote5 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabRemote + + + 9 + + + 443, 122 + + + 6, 6, 6, 6 + + + 118, 23 + + + 131 + + + bcRemote4 + + + MagicRemoteService.BindControl, MagicRemoteService, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null + + + tabRemote + + + 10 + + + True + + + NoControl + + + 421, 127 + + + 13, 13 + + + 130 + + + 4 + + + libRemote4 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabRemote + + + 11 + + + 443, 93 + + + 6, 6, 6, 6 + + + 118, 23 + + + 129 + + + bcRemote3 + + + MagicRemoteService.BindControl, MagicRemoteService, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null + + + tabRemote + + + 12 + + + True + + + NoControl + + + 421, 98 + + + 13, 13 + + + 128 + + + 3 + + + libRemote3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabRemote + + + 13 + + + 443, 64 + + + 6, 6, 6, 6 + + + 118, 23 + + + 127 + + + bcRemote2 + + + MagicRemoteService.BindControl, MagicRemoteService, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null + + + tabRemote + + + 14 + + + True + + + NoControl + + + 421, 69 + + + 13, 13 + + + 126 + + + 2 + + + libRemote2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabRemote + + + 15 + + + 443, 35 + + + 6, 6, 6, 6 + + + 118, 23 + + + 125 + + + bcRemote1 + + + MagicRemoteService.BindControl, MagicRemoteService, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null + + + tabRemote + + + 16 + + + True + + + NoControl + + + 421, 40 + + + 13, 13 + + + 124 + + + 1 + + + libRemote1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabRemote + + + 17 + + + 443, 6 + + + 6, 6, 6, 6 + + + 118, 23 + + + 123 + + + bcRemote0 + + + MagicRemoteService.BindControl, MagicRemoteService, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null + + + tabRemote + + + 18 + + + True + + + NoControl + + + 421, 11 + + + 13, 13 + + + 122 + + + 0 + + + libRemote0 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabRemote + + + 19 + 294, 180 @@ -1132,7 +1672,7 @@ tabRemote - 0 + 20 294, 151 @@ -1156,7 +1696,7 @@ tabRemote - 1 + 21 294, 122 @@ -1180,7 +1720,7 @@ tabRemote - 2 + 22 294, 93 @@ -1204,7 +1744,7 @@ tabRemote - 3 + 23 294, 64 @@ -1228,7 +1768,7 @@ tabRemote - 4 + 24 294, 35 @@ -1252,7 +1792,7 @@ tabRemote - 5 + 25 294, 6 @@ -1276,7 +1816,7 @@ tabRemote - 6 + 26 294, 209 @@ -1300,7 +1840,7 @@ tabRemote - 7 + 27 88, 267 @@ -1324,7 +1864,7 @@ tabRemote - 8 + 28 88, 238 @@ -1348,7 +1888,7 @@ tabRemote - 9 + 29 88, 209 @@ -1372,7 +1912,7 @@ tabRemote - 10 + 30 88, 180 @@ -1396,7 +1936,7 @@ tabRemote - 11 + 31 88, 151 @@ -1420,7 +1960,7 @@ tabRemote - 12 + 32 88, 122 @@ -1444,7 +1984,7 @@ tabRemote - 13 + 33 88, 93 @@ -1468,7 +2008,7 @@ tabRemote - 14 + 34 88, 64 @@ -1492,7 +2032,7 @@ tabRemote - 15 + 35 88, 6 @@ -1516,7 +2056,7 @@ tabRemote - 16 + 36 88, 35 @@ -1540,7 +2080,7 @@ tabRemote - 17 + 37 True @@ -1570,7 +2110,7 @@ tabRemote - 18 + 38 True @@ -1600,7 +2140,7 @@ tabRemote - 19 + 39 True @@ -1630,7 +2170,7 @@ tabRemote - 20 + 40 True @@ -1660,7 +2200,7 @@ tabRemote - 21 + 41 True @@ -1690,7 +2230,7 @@ tabRemote - 22 + 42 True @@ -1720,7 +2260,7 @@ tabRemote - 23 + 43 True @@ -1750,7 +2290,7 @@ tabRemote - 24 + 44 True @@ -1780,7 +2320,7 @@ tabRemote - 25 + 45 True @@ -1810,7 +2350,7 @@ tabRemote - 26 + 46 True @@ -1840,7 +2380,7 @@ tabRemote - 27 + 47 True @@ -1870,7 +2410,7 @@ tabRemote - 28 + 48 True @@ -1900,7 +2440,7 @@ tabRemote - 29 + 49 True @@ -1930,7 +2470,7 @@ tabRemote - 30 + 50 True @@ -1960,7 +2500,7 @@ tabRemote - 31 + 51 True @@ -1990,7 +2530,7 @@ tabRemote - 32 + 52 True @@ -2020,7 +2560,7 @@ tabRemote - 33 + 53 True @@ -2050,7 +2590,7 @@ tabRemote - 34 + 54 True @@ -2077,7 +2617,7 @@ tabRemote - 35 + 55 Bottom, Right @@ -2086,10 +2626,10 @@ NoControl - 294, 296 + 443, 296 - 102, 23 + 100, 23 67 @@ -2107,7 +2647,7 @@ tabRemote - 36 + 56 4, 22 @@ -2116,7 +2656,7 @@ 3, 3, 3, 3 - 418, 325 + 570, 325 2 @@ -2140,7 +2680,7 @@ 12, 12 - 426, 351 + 578, 351 66 @@ -2167,7 +2707,7 @@ 6, 13 - 450, 404 + 602, 404