diff --git a/app/Ally/AllyControl.cs b/app/Ally/AllyControl.cs index c7457db5..88e11b8f 100644 --- a/app/Ally/AllyControl.cs +++ b/app/Ally/AllyControl.cs @@ -3,7 +3,6 @@ using GHelper.Input; using GHelper.USB; using HidSharp; using System.Text; -using System.Windows.Forms; namespace GHelper.Ally { @@ -61,6 +60,8 @@ namespace GHelper.Ally public const string BindM2 = "02-8E"; public const string BindLT = "01-0D"; public const string BindRT = "01-0E"; + public const string BindXB = "01-13"; + public const string BindMouseL = "03-01"; public const string BindMouseR = "03-02"; @@ -79,6 +80,7 @@ namespace GHelper.Ally public const string BindShift = "02-88"; public const string BindCtrl = "02-8C"; + public const string BindAlt = "02-8A"; public const string BindTaskManager = "04-03-8C-88-76"; public const string BindCloseWindow = "04-02-8A-0C"; @@ -87,8 +89,14 @@ namespace GHelper.Ally public const string BindBrightnessUp = "04-04-8C-88-8A-06"; public const string BindOverlay = "04-03-8C-88-44"; - public const string BindShiftTab = "04-02-88-0D"; + public const string BindShiftTab = "04-02-88-0D"; + public const string BindAltTab = "04-02-8A-0D"; + + public const string BindVolUp = "05-03"; + public const string BindVolDown = "05-02"; + + public const string BindPrintScrn = "02-C3"; static byte[] CommandReady = new byte[] { AsusHid.INPUT_ID, 0xd1, 0x0a, 0x01 }; static byte[] CommandSave = new byte[] { AsusHid.INPUT_ID, 0xd1, 0x0f, 0x20 }; @@ -122,9 +130,35 @@ namespace GHelper.Ally { BindVB, "View Button" }, { BindMB, "Menu Button" }, - { "01-13", "XBox/Steam" }, + { BindXB, "XBox/Steam" }, + { BindVolUp, "Vol Up" }, + { BindVolDown, "Vol Down" }, + { BindBrightnessUp, "Bright Up" }, + { BindBrightnessDown, "Bright Down" }, + + { BindOverlay, "AMD Overlay" }, + { BindTaskManager, "Task Manager" }, + { BindCloseWindow, "Close Window" }, + { BindShiftTab, "Shift-Tab" }, + { BindAltTab, "Alt-Tab" }, + + { BindPrintScrn, "PrntScn" }, { BindEsc, "Esc" }, + { BindBack, "Backspace" }, + { BindTab, "Tab" }, + { BindEnter, "Enter" }, + { BindShift, "LShift" }, + { BindAlt, "LAlt" }, + { BindCtrl, "LCtl" }, + + { BindPgU, "PgUp" }, + { BindPgD, "PgDwn" }, + { BindKBU, "UpArrow" }, + { BindKBD, "DownArrow" }, + { BindKBL, "LeftArrow" }, + { BindKBR, "RightArrow" }, + { "02-05", "F1" }, { "02-06", "F2" }, { "02-04", "F3" }, @@ -150,8 +184,6 @@ namespace GHelper.Ally { "02-45", "0" }, { "02-4E", "-" }, { "02-55", "=" }, - { BindBack, "Backspace" }, - { BindTab, "Tab" }, { "02-15", "Q" }, { "02-1D", "W" }, { "02-24", "E" }, @@ -176,8 +208,6 @@ namespace GHelper.Ally { "02-4B", "l" }, { "02-4C", ";" }, { "02-52", "'" }, - { BindEnter, "Enter" }, - { BindShift, "LShift" }, { "02-22", "X" }, { "02-1A", "Z" }, { "02-21", "C" }, @@ -188,25 +218,16 @@ namespace GHelper.Ally { "02-41", "," }, { "02-49", "." }, { "02-89", "RShift" }, - { BindCtrl, "LCtl" }, { "02-82", "Meta" }, - { "02-8A", "LAlt" }, { "02-29", "Space" }, { "02-8B", "RAlt" }, { "02-84", "App menu" }, { "02-8D", "RCtl" }, - { "02-C3", "PrntScn" }, { "02-7E", "ScrLk" }, { "02-C2", "Insert" }, - { BindPgU, "PgUp" }, - { BindPgD, "PgDwn" }, { "02-C0", "Delete" }, { "02-94", "Home" }, { "02-95", "End" }, - { BindKBU, "UpArrow" }, - { BindKBD, "DownArrow" }, - { BindKBL, "LeftArrow" }, - { BindKBR, "RightArrow" }, { "02-77", "NumLock" }, { "02-90", "NumSlash" }, { "02-7C", "NumStar" }, @@ -231,20 +252,12 @@ namespace GHelper.Ally { "03-04", "Mouse scroll up" }, { "03-05", "Mouse scroll down" }, - { BindTaskManager, "Task Manager" }, - { BindCloseWindow, "Close Window" }, - { BindShiftTab, "Shift-Tab" }, - { "05-16", "Screenshot" }, { "05-19", "Show keyboard" }, { "05-1C", "Show desktop" }, { "05-1E", "Begin recording" }, { "05-01", "Mic off" }, - { "05-03", "Vol Up" }, - { "05-02", "Vol Down" }, - { BindBrightnessUp, "Bright Up" }, - { BindBrightnessDown, "Bright Down" } }; public AllyControl(SettingsForm settingsForm) @@ -337,7 +350,8 @@ namespace GHelper.Ally try { bytes = AppConfig.StringToBytes(binding); - } catch + } + catch { return new byte[2]; } diff --git a/app/Properties/Resources.Designer.cs b/app/Properties/Resources.Designer.cs index a8811e09..4f8bb67f 100644 --- a/app/Properties/Resources.Designer.cs +++ b/app/Properties/Resources.Designer.cs @@ -160,6 +160,16 @@ namespace GHelper.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap icons8_animation_32 { + get { + object obj = ResourceManager.GetObject("icons8-animation-32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/app/Properties/Resources.resx b/app/Properties/Resources.resx index 2ed46cbb..fc984650 100644 --- a/app/Properties/Resources.resx +++ b/app/Properties/Resources.resx @@ -238,6 +238,9 @@ ..\Resources\backlight-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icons8-xbox-lt-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\backlight-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -313,7 +316,7 @@ ..\Resources\icons8-charging-battery-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icons8-xbox-lt-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icons8-animation-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/app/Resources/icons8-animation-32.png b/app/Resources/icons8-animation-32.png new file mode 100644 index 00000000..4392cc4a Binary files /dev/null and b/app/Resources/icons8-animation-32.png differ diff --git a/app/Settings.Designer.cs b/app/Settings.Designer.cs index 28a2d40e..e9fa4e53 100644 --- a/app/Settings.Designer.cs +++ b/app/Settings.Designer.cs @@ -112,12 +112,12 @@ namespace GHelper labelPeripherals = new Label(); panelAlly = new Panel(); tableLayoutAlly = new TableLayoutPanel(); + buttonController = new RButton(); buttonBacklight = new RButton(); buttonControllerMode = new RButton(); panelAllyTitle = new Panel(); pictureAlly = new PictureBox(); labelAlly = new Label(); - buttonController = new RButton(); panelMatrix.SuspendLayout(); tableLayoutMatrix.SuspendLayout(); panelMatrixTitle.SuspendLayout(); @@ -715,7 +715,7 @@ namespace GHelper buttonFPS.FlatAppearance.BorderSize = 0; buttonFPS.FlatStyle = FlatStyle.Flat; buttonFPS.ForeColor = SystemColors.ControlText; - buttonFPS.Image = Properties.Resources.icons8_video_48; + buttonFPS.Image = Properties.Resources.icons8_animation_32; buttonFPS.ImageAlign = ContentAlignment.MiddleRight; buttonFPS.Location = new Point(4, 4); buttonFPS.Margin = new Padding(4); @@ -1485,6 +1485,27 @@ namespace GHelper tableLayoutAlly.Size = new Size(787, 80); tableLayoutAlly.TabIndex = 23; // + // buttonController + // + buttonController.Activated = false; + buttonController.BackColor = SystemColors.ControlLight; + buttonController.BorderColor = Color.Transparent; + buttonController.BorderRadius = 5; + buttonController.Dock = DockStyle.Fill; + buttonController.FlatAppearance.BorderSize = 0; + buttonController.FlatStyle = FlatStyle.Flat; + buttonController.ForeColor = SystemColors.ControlText; + buttonController.ImageAlign = ContentAlignment.MiddleRight; + buttonController.Location = new Point(528, 4); + buttonController.Margin = new Padding(4); + buttonController.Name = "buttonController"; + buttonController.Secondary = true; + buttonController.Size = new Size(255, 72); + buttonController.TabIndex = 11; + buttonController.Text = "Controller"; + buttonController.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonController.UseVisualStyleBackColor = false; + // // buttonBacklight // buttonBacklight.Activated = false; @@ -1562,27 +1583,6 @@ namespace GHelper labelAlly.TabIndex = 26; labelAlly.Text = "Ally Controller"; // - // buttonController - // - buttonController.Activated = false; - buttonController.BackColor = SystemColors.ControlLight; - buttonController.BorderColor = Color.Transparent; - buttonController.BorderRadius = 5; - buttonController.Dock = DockStyle.Fill; - buttonController.FlatAppearance.BorderSize = 0; - buttonController.FlatStyle = FlatStyle.Flat; - buttonController.ForeColor = SystemColors.ControlText; - buttonController.ImageAlign = ContentAlignment.MiddleRight; - buttonController.Location = new Point(528, 4); - buttonController.Margin = new Padding(4); - buttonController.Name = "buttonController"; - buttonController.Secondary = true; - buttonController.Size = new Size(255, 72); - buttonController.TabIndex = 11; - buttonController.Text = "Controller"; - buttonController.TextImageRelation = TextImageRelation.ImageBeforeText; - buttonController.UseVisualStyleBackColor = false; - // // SettingsForm // AutoScaleDimensions = new SizeF(192F, 192F);