mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Ally Controller Settings
This commit is contained in:
@@ -103,9 +103,27 @@ namespace GHelper.Ally
|
||||
settings.VisualiseBacklight(InputDispatcher.GetBacklight());
|
||||
}
|
||||
|
||||
private void Deadzones()
|
||||
static public void Deadzones()
|
||||
{
|
||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 4, 4, 0, 100, 0, 100 }, "ControllerDeadzone");
|
||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 4, 4,
|
||||
(byte)AppConfig.Get("ls_min", 0),
|
||||
(byte)AppConfig.Get("ls_max", 100),
|
||||
(byte)AppConfig.Get("rs_min", 0),
|
||||
(byte)AppConfig.Get("rs_max", 100) },
|
||||
"StickDeadzone");
|
||||
|
||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 5, 4,
|
||||
(byte)AppConfig.Get("lt_min", 0),
|
||||
(byte)AppConfig.Get("lt_max", 100),
|
||||
(byte)AppConfig.Get("rt_min", 0),
|
||||
(byte)AppConfig.Get("rt_max", 100) },
|
||||
"TriggerDeadzone");
|
||||
|
||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 6, 2,
|
||||
(byte)AppConfig.Get("vibra", 100),
|
||||
(byte)AppConfig.Get("vibra", 100) },
|
||||
"Vibration");
|
||||
|
||||
}
|
||||
|
||||
private void SetMode(ControllerMode mode)
|
||||
|
||||
631
app/Handheld.Designer.cs
generated
Normal file
631
app/Handheld.Designer.cs
generated
Normal file
@@ -0,0 +1,631 @@
|
||||
namespace GHelper
|
||||
{
|
||||
partial class Handheld
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
panelController = new Panel();
|
||||
buttonReset = new UI.RButton();
|
||||
panelVibra = new Panel();
|
||||
labelVibra = new Label();
|
||||
labelVibraTitle = new Label();
|
||||
trackVibra = new TrackBar();
|
||||
panelVibrationTitle = new Panel();
|
||||
pictureVibration = new PictureBox();
|
||||
labelVibraHeader = new Label();
|
||||
panelRT = new Panel();
|
||||
trackRTMax = new TrackBar();
|
||||
labelRT = new Label();
|
||||
trackRTMin = new TrackBar();
|
||||
labelRTTitle = new Label();
|
||||
panelLT = new Panel();
|
||||
trackLTMax = new TrackBar();
|
||||
labelLT = new Label();
|
||||
trackLTMin = new TrackBar();
|
||||
labelLTTitle = new Label();
|
||||
panelTDeadzone = new Panel();
|
||||
pictureTDeadzone = new PictureBox();
|
||||
labelTDeadzone = new Label();
|
||||
panelRS = new Panel();
|
||||
trackRSMax = new TrackBar();
|
||||
labelRS = new Label();
|
||||
trackRSMin = new TrackBar();
|
||||
labelRSTitle = new Label();
|
||||
panelLS = new Panel();
|
||||
trackLSMax = new TrackBar();
|
||||
labelLS = new Label();
|
||||
trackLSMin = new TrackBar();
|
||||
labelLSTitle = new Label();
|
||||
panelSDeadzone = new Panel();
|
||||
pictureSDeadzone = new PictureBox();
|
||||
labelSDeadzone = new Label();
|
||||
panelController.SuspendLayout();
|
||||
panelVibra.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackVibra).BeginInit();
|
||||
panelVibrationTitle.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureVibration).BeginInit();
|
||||
panelRT.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackRTMax).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)trackRTMin).BeginInit();
|
||||
panelLT.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackLTMax).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)trackLTMin).BeginInit();
|
||||
panelTDeadzone.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureTDeadzone).BeginInit();
|
||||
panelRS.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackRSMax).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)trackRSMin).BeginInit();
|
||||
panelLS.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackLSMax).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)trackLSMin).BeginInit();
|
||||
panelSDeadzone.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureSDeadzone).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panelController
|
||||
//
|
||||
panelController.AutoSize = true;
|
||||
panelController.Controls.Add(buttonReset);
|
||||
panelController.Controls.Add(panelVibra);
|
||||
panelController.Controls.Add(panelVibrationTitle);
|
||||
panelController.Controls.Add(panelRT);
|
||||
panelController.Controls.Add(panelLT);
|
||||
panelController.Controls.Add(panelTDeadzone);
|
||||
panelController.Controls.Add(panelRS);
|
||||
panelController.Controls.Add(panelLS);
|
||||
panelController.Controls.Add(panelSDeadzone);
|
||||
panelController.Dock = DockStyle.Left;
|
||||
panelController.Location = new Point(10, 10);
|
||||
panelController.Margin = new Padding(4);
|
||||
panelController.MinimumSize = new Size(560, 800);
|
||||
panelController.Name = "panelController";
|
||||
panelController.Padding = new Padding(0, 0, 0, 18);
|
||||
panelController.Size = new Size(560, 920);
|
||||
panelController.TabIndex = 45;
|
||||
//
|
||||
// buttonReset
|
||||
//
|
||||
buttonReset.Activated = false;
|
||||
buttonReset.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||
buttonReset.BackColor = SystemColors.ControlLight;
|
||||
buttonReset.BorderColor = Color.Transparent;
|
||||
buttonReset.BorderRadius = 2;
|
||||
buttonReset.FlatStyle = FlatStyle.Flat;
|
||||
buttonReset.Location = new Point(20, 850);
|
||||
buttonReset.Margin = new Padding(4, 2, 4, 2);
|
||||
buttonReset.Name = "buttonReset";
|
||||
buttonReset.Secondary = true;
|
||||
buttonReset.Size = new Size(224, 50);
|
||||
buttonReset.TabIndex = 54;
|
||||
buttonReset.Text = "Reset";
|
||||
buttonReset.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// panelVibra
|
||||
//
|
||||
panelVibra.AutoSize = true;
|
||||
panelVibra.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelVibra.Controls.Add(labelVibra);
|
||||
panelVibra.Controls.Add(labelVibraTitle);
|
||||
panelVibra.Controls.Add(trackVibra);
|
||||
panelVibra.Dock = DockStyle.Top;
|
||||
panelVibra.Location = new Point(0, 676);
|
||||
panelVibra.Margin = new Padding(4);
|
||||
panelVibra.MaximumSize = new Size(0, 124);
|
||||
panelVibra.Name = "panelVibra";
|
||||
panelVibra.Size = new Size(560, 124);
|
||||
panelVibra.TabIndex = 46;
|
||||
//
|
||||
// labelVibra
|
||||
//
|
||||
labelVibra.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelVibra.Location = new Point(408, 14);
|
||||
labelVibra.Margin = new Padding(4, 0, 4, 0);
|
||||
labelVibra.Name = "labelVibra";
|
||||
labelVibra.Size = new Size(124, 32);
|
||||
labelVibra.TabIndex = 44;
|
||||
labelVibra.Text = "100%";
|
||||
labelVibra.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// labelVibraTitle
|
||||
//
|
||||
labelVibraTitle.AutoSize = true;
|
||||
labelVibraTitle.Location = new Point(10, 14);
|
||||
labelVibraTitle.Margin = new Padding(4, 0, 4, 0);
|
||||
labelVibraTitle.Name = "labelVibraTitle";
|
||||
labelVibraTitle.Size = new Size(209, 32);
|
||||
labelVibraTitle.TabIndex = 43;
|
||||
labelVibraTitle.Text = "Vibration Strength";
|
||||
//
|
||||
// trackVibra
|
||||
//
|
||||
trackVibra.Location = new Point(6, 48);
|
||||
trackVibra.Margin = new Padding(4, 2, 4, 2);
|
||||
trackVibra.Maximum = 100;
|
||||
trackVibra.Name = "trackVibra";
|
||||
trackVibra.Size = new Size(546, 90);
|
||||
trackVibra.TabIndex = 42;
|
||||
trackVibra.TickFrequency = 5;
|
||||
trackVibra.TickStyle = TickStyle.TopLeft;
|
||||
trackVibra.Value = 100;
|
||||
//
|
||||
// panelVibrationTitle
|
||||
//
|
||||
panelVibrationTitle.AutoSize = true;
|
||||
panelVibrationTitle.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelVibrationTitle.Controls.Add(pictureVibration);
|
||||
panelVibrationTitle.Controls.Add(labelVibraHeader);
|
||||
panelVibrationTitle.Dock = DockStyle.Top;
|
||||
panelVibrationTitle.Location = new Point(0, 616);
|
||||
panelVibrationTitle.Margin = new Padding(4);
|
||||
panelVibrationTitle.Name = "panelVibrationTitle";
|
||||
panelVibrationTitle.Size = new Size(560, 60);
|
||||
panelVibrationTitle.TabIndex = 53;
|
||||
//
|
||||
// pictureVibration
|
||||
//
|
||||
pictureVibration.BackgroundImage = Properties.Resources.icons8_soonvibes_32;
|
||||
pictureVibration.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
pictureVibration.ErrorImage = null;
|
||||
pictureVibration.InitialImage = null;
|
||||
pictureVibration.Location = new Point(10, 18);
|
||||
pictureVibration.Margin = new Padding(4, 2, 4, 10);
|
||||
pictureVibration.Name = "pictureVibration";
|
||||
pictureVibration.Size = new Size(32, 32);
|
||||
pictureVibration.TabIndex = 41;
|
||||
pictureVibration.TabStop = false;
|
||||
//
|
||||
// labelVibraHeader
|
||||
//
|
||||
labelVibraHeader.AutoSize = true;
|
||||
labelVibraHeader.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelVibraHeader.Location = new Point(45, 17);
|
||||
labelVibraHeader.Margin = new Padding(4, 0, 4, 0);
|
||||
labelVibraHeader.Name = "labelVibraHeader";
|
||||
labelVibraHeader.Size = new Size(121, 32);
|
||||
labelVibraHeader.TabIndex = 40;
|
||||
labelVibraHeader.Text = "Vibration";
|
||||
//
|
||||
// panelRT
|
||||
//
|
||||
panelRT.AutoSize = true;
|
||||
panelRT.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelRT.Controls.Add(trackRTMax);
|
||||
panelRT.Controls.Add(labelRT);
|
||||
panelRT.Controls.Add(trackRTMin);
|
||||
panelRT.Controls.Add(labelRTTitle);
|
||||
panelRT.Dock = DockStyle.Top;
|
||||
panelRT.Location = new Point(0, 492);
|
||||
panelRT.Margin = new Padding(4);
|
||||
panelRT.MaximumSize = new Size(0, 124);
|
||||
panelRT.Name = "panelRT";
|
||||
panelRT.Size = new Size(560, 124);
|
||||
panelRT.TabIndex = 50;
|
||||
//
|
||||
// trackRTMax
|
||||
//
|
||||
trackRTMax.Location = new Point(272, 48);
|
||||
trackRTMax.Margin = new Padding(4, 2, 4, 2);
|
||||
trackRTMax.Maximum = 100;
|
||||
trackRTMax.Minimum = 50;
|
||||
trackRTMax.Name = "trackRTMax";
|
||||
trackRTMax.RightToLeft = RightToLeft.No;
|
||||
trackRTMax.Size = new Size(280, 90);
|
||||
trackRTMax.TabIndex = 30;
|
||||
trackRTMax.TickFrequency = 5;
|
||||
trackRTMax.TickStyle = TickStyle.TopLeft;
|
||||
trackRTMax.Value = 100;
|
||||
//
|
||||
// labelRT
|
||||
//
|
||||
labelRT.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelRT.Location = new Point(363, 13);
|
||||
labelRT.Margin = new Padding(4, 0, 4, 0);
|
||||
labelRT.Name = "labelRT";
|
||||
labelRT.Size = new Size(176, 32);
|
||||
labelRT.TabIndex = 29;
|
||||
labelRT.Text = "0 - 100%";
|
||||
labelRT.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// trackRTMin
|
||||
//
|
||||
trackRTMin.LargeChange = 100;
|
||||
trackRTMin.Location = new Point(6, 48);
|
||||
trackRTMin.Margin = new Padding(4, 2, 4, 2);
|
||||
trackRTMin.Maximum = 50;
|
||||
trackRTMin.Name = "trackRTMin";
|
||||
trackRTMin.RightToLeft = RightToLeft.No;
|
||||
trackRTMin.Size = new Size(280, 90);
|
||||
trackRTMin.SmallChange = 10;
|
||||
trackRTMin.TabIndex = 18;
|
||||
trackRTMin.TickFrequency = 5;
|
||||
trackRTMin.TickStyle = TickStyle.TopLeft;
|
||||
//
|
||||
// labelRTTitle
|
||||
//
|
||||
labelRTTitle.AutoSize = true;
|
||||
labelRTTitle.Location = new Point(10, 16);
|
||||
labelRTTitle.Margin = new Padding(4, 0, 4, 0);
|
||||
labelRTTitle.Name = "labelRTTitle";
|
||||
labelRTTitle.Size = new Size(151, 32);
|
||||
labelRTTitle.TabIndex = 17;
|
||||
labelRTTitle.Text = "Right Trigger";
|
||||
//
|
||||
// panelLT
|
||||
//
|
||||
panelLT.AutoSize = true;
|
||||
panelLT.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelLT.Controls.Add(trackLTMax);
|
||||
panelLT.Controls.Add(labelLT);
|
||||
panelLT.Controls.Add(trackLTMin);
|
||||
panelLT.Controls.Add(labelLTTitle);
|
||||
panelLT.Dock = DockStyle.Top;
|
||||
panelLT.Location = new Point(0, 368);
|
||||
panelLT.Margin = new Padding(4);
|
||||
panelLT.MaximumSize = new Size(0, 124);
|
||||
panelLT.Name = "panelLT";
|
||||
panelLT.Size = new Size(560, 124);
|
||||
panelLT.TabIndex = 51;
|
||||
//
|
||||
// trackLTMax
|
||||
//
|
||||
trackLTMax.Location = new Point(272, 48);
|
||||
trackLTMax.Margin = new Padding(4, 2, 4, 2);
|
||||
trackLTMax.Maximum = 100;
|
||||
trackLTMax.Minimum = 50;
|
||||
trackLTMax.Name = "trackLTMax";
|
||||
trackLTMax.RightToLeft = RightToLeft.No;
|
||||
trackLTMax.Size = new Size(280, 90);
|
||||
trackLTMax.TabIndex = 30;
|
||||
trackLTMax.TickFrequency = 5;
|
||||
trackLTMax.TickStyle = TickStyle.TopLeft;
|
||||
trackLTMax.Value = 100;
|
||||
//
|
||||
// labelLT
|
||||
//
|
||||
labelLT.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelLT.Location = new Point(363, 13);
|
||||
labelLT.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLT.Name = "labelLT";
|
||||
labelLT.Size = new Size(176, 32);
|
||||
labelLT.TabIndex = 29;
|
||||
labelLT.Text = "0 - 100%";
|
||||
labelLT.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// trackLTMin
|
||||
//
|
||||
trackLTMin.LargeChange = 100;
|
||||
trackLTMin.Location = new Point(6, 48);
|
||||
trackLTMin.Margin = new Padding(4, 2, 4, 2);
|
||||
trackLTMin.Maximum = 50;
|
||||
trackLTMin.Name = "trackLTMin";
|
||||
trackLTMin.RightToLeft = RightToLeft.No;
|
||||
trackLTMin.Size = new Size(280, 90);
|
||||
trackLTMin.SmallChange = 10;
|
||||
trackLTMin.TabIndex = 18;
|
||||
trackLTMin.TickFrequency = 5;
|
||||
trackLTMin.TickStyle = TickStyle.TopLeft;
|
||||
//
|
||||
// labelLTTitle
|
||||
//
|
||||
labelLTTitle.AutoSize = true;
|
||||
labelLTTitle.Location = new Point(10, 16);
|
||||
labelLTTitle.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLTTitle.Name = "labelLTTitle";
|
||||
labelLTTitle.Size = new Size(135, 32);
|
||||
labelLTTitle.TabIndex = 17;
|
||||
labelLTTitle.Text = "Left Trigger";
|
||||
//
|
||||
// panelTDeadzone
|
||||
//
|
||||
panelTDeadzone.AutoSize = true;
|
||||
panelTDeadzone.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelTDeadzone.Controls.Add(pictureTDeadzone);
|
||||
panelTDeadzone.Controls.Add(labelTDeadzone);
|
||||
panelTDeadzone.Dock = DockStyle.Top;
|
||||
panelTDeadzone.Location = new Point(0, 308);
|
||||
panelTDeadzone.Margin = new Padding(4);
|
||||
panelTDeadzone.Name = "panelTDeadzone";
|
||||
panelTDeadzone.Size = new Size(560, 60);
|
||||
panelTDeadzone.TabIndex = 52;
|
||||
//
|
||||
// pictureTDeadzone
|
||||
//
|
||||
pictureTDeadzone.BackgroundImage = Properties.Resources.icons8_controller_32;
|
||||
pictureTDeadzone.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
pictureTDeadzone.ErrorImage = null;
|
||||
pictureTDeadzone.InitialImage = null;
|
||||
pictureTDeadzone.Location = new Point(10, 18);
|
||||
pictureTDeadzone.Margin = new Padding(4, 2, 4, 10);
|
||||
pictureTDeadzone.Name = "pictureTDeadzone";
|
||||
pictureTDeadzone.Size = new Size(32, 32);
|
||||
pictureTDeadzone.TabIndex = 41;
|
||||
pictureTDeadzone.TabStop = false;
|
||||
//
|
||||
// labelTDeadzone
|
||||
//
|
||||
labelTDeadzone.AutoSize = true;
|
||||
labelTDeadzone.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelTDeadzone.Location = new Point(45, 17);
|
||||
labelTDeadzone.Margin = new Padding(4, 0, 4, 0);
|
||||
labelTDeadzone.Name = "labelTDeadzone";
|
||||
labelTDeadzone.Size = new Size(228, 32);
|
||||
labelTDeadzone.TabIndex = 40;
|
||||
labelTDeadzone.Text = "Trigger Deadzones";
|
||||
//
|
||||
// panelRS
|
||||
//
|
||||
panelRS.AutoSize = true;
|
||||
panelRS.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelRS.Controls.Add(trackRSMax);
|
||||
panelRS.Controls.Add(labelRS);
|
||||
panelRS.Controls.Add(trackRSMin);
|
||||
panelRS.Controls.Add(labelRSTitle);
|
||||
panelRS.Dock = DockStyle.Top;
|
||||
panelRS.Location = new Point(0, 184);
|
||||
panelRS.Margin = new Padding(4);
|
||||
panelRS.MaximumSize = new Size(0, 124);
|
||||
panelRS.Name = "panelRS";
|
||||
panelRS.Size = new Size(560, 124);
|
||||
panelRS.TabIndex = 49;
|
||||
//
|
||||
// trackRSMax
|
||||
//
|
||||
trackRSMax.Location = new Point(272, 48);
|
||||
trackRSMax.Margin = new Padding(4, 2, 4, 2);
|
||||
trackRSMax.Maximum = 100;
|
||||
trackRSMax.Minimum = 50;
|
||||
trackRSMax.Name = "trackRSMax";
|
||||
trackRSMax.RightToLeft = RightToLeft.No;
|
||||
trackRSMax.Size = new Size(280, 90);
|
||||
trackRSMax.TabIndex = 30;
|
||||
trackRSMax.TickFrequency = 5;
|
||||
trackRSMax.TickStyle = TickStyle.TopLeft;
|
||||
trackRSMax.Value = 100;
|
||||
//
|
||||
// labelRS
|
||||
//
|
||||
labelRS.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelRS.Location = new Point(363, 13);
|
||||
labelRS.Margin = new Padding(4, 0, 4, 0);
|
||||
labelRS.Name = "labelRS";
|
||||
labelRS.Size = new Size(176, 32);
|
||||
labelRS.TabIndex = 29;
|
||||
labelRS.Text = "0 - 100%";
|
||||
labelRS.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// trackRSMin
|
||||
//
|
||||
trackRSMin.LargeChange = 100;
|
||||
trackRSMin.Location = new Point(6, 48);
|
||||
trackRSMin.Margin = new Padding(4, 2, 4, 2);
|
||||
trackRSMin.Maximum = 50;
|
||||
trackRSMin.Name = "trackRSMin";
|
||||
trackRSMin.RightToLeft = RightToLeft.No;
|
||||
trackRSMin.Size = new Size(280, 90);
|
||||
trackRSMin.SmallChange = 10;
|
||||
trackRSMin.TabIndex = 18;
|
||||
trackRSMin.TickFrequency = 5;
|
||||
trackRSMin.TickStyle = TickStyle.TopLeft;
|
||||
//
|
||||
// labelRSTitle
|
||||
//
|
||||
labelRSTitle.AutoSize = true;
|
||||
labelRSTitle.Location = new Point(10, 16);
|
||||
labelRSTitle.Margin = new Padding(4, 0, 4, 0);
|
||||
labelRSTitle.Name = "labelRSTitle";
|
||||
labelRSTitle.Size = new Size(126, 32);
|
||||
labelRSTitle.TabIndex = 17;
|
||||
labelRSTitle.Text = "Right Stick";
|
||||
//
|
||||
// panelLS
|
||||
//
|
||||
panelLS.AutoSize = true;
|
||||
panelLS.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelLS.Controls.Add(trackLSMax);
|
||||
panelLS.Controls.Add(labelLS);
|
||||
panelLS.Controls.Add(trackLSMin);
|
||||
panelLS.Controls.Add(labelLSTitle);
|
||||
panelLS.Dock = DockStyle.Top;
|
||||
panelLS.Location = new Point(0, 60);
|
||||
panelLS.Margin = new Padding(4);
|
||||
panelLS.MaximumSize = new Size(0, 124);
|
||||
panelLS.Name = "panelLS";
|
||||
panelLS.Size = new Size(560, 124);
|
||||
panelLS.TabIndex = 48;
|
||||
//
|
||||
// trackLSMax
|
||||
//
|
||||
trackLSMax.Location = new Point(272, 48);
|
||||
trackLSMax.Margin = new Padding(4, 2, 4, 2);
|
||||
trackLSMax.Maximum = 100;
|
||||
trackLSMax.Minimum = 50;
|
||||
trackLSMax.Name = "trackLSMax";
|
||||
trackLSMax.RightToLeft = RightToLeft.No;
|
||||
trackLSMax.Size = new Size(280, 90);
|
||||
trackLSMax.TabIndex = 30;
|
||||
trackLSMax.TickFrequency = 5;
|
||||
trackLSMax.TickStyle = TickStyle.TopLeft;
|
||||
trackLSMax.Value = 100;
|
||||
//
|
||||
// labelLS
|
||||
//
|
||||
labelLS.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelLS.Location = new Point(363, 13);
|
||||
labelLS.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLS.Name = "labelLS";
|
||||
labelLS.Size = new Size(176, 32);
|
||||
labelLS.TabIndex = 29;
|
||||
labelLS.Text = "0 - 100%";
|
||||
labelLS.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// trackLSMin
|
||||
//
|
||||
trackLSMin.LargeChange = 100;
|
||||
trackLSMin.Location = new Point(6, 48);
|
||||
trackLSMin.Margin = new Padding(4, 2, 4, 2);
|
||||
trackLSMin.Maximum = 50;
|
||||
trackLSMin.Name = "trackLSMin";
|
||||
trackLSMin.RightToLeft = RightToLeft.No;
|
||||
trackLSMin.Size = new Size(280, 90);
|
||||
trackLSMin.SmallChange = 10;
|
||||
trackLSMin.TabIndex = 18;
|
||||
trackLSMin.TickFrequency = 5;
|
||||
trackLSMin.TickStyle = TickStyle.TopLeft;
|
||||
//
|
||||
// labelLSTitle
|
||||
//
|
||||
labelLSTitle.AutoSize = true;
|
||||
labelLSTitle.Location = new Point(10, 16);
|
||||
labelLSTitle.Margin = new Padding(4, 0, 4, 0);
|
||||
labelLSTitle.Name = "labelLSTitle";
|
||||
labelLSTitle.Size = new Size(110, 32);
|
||||
labelLSTitle.TabIndex = 17;
|
||||
labelLSTitle.Text = "Left Stick";
|
||||
//
|
||||
// panelSDeadzone
|
||||
//
|
||||
panelSDeadzone.AutoSize = true;
|
||||
panelSDeadzone.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelSDeadzone.Controls.Add(pictureSDeadzone);
|
||||
panelSDeadzone.Controls.Add(labelSDeadzone);
|
||||
panelSDeadzone.Dock = DockStyle.Top;
|
||||
panelSDeadzone.Location = new Point(0, 0);
|
||||
panelSDeadzone.Margin = new Padding(4);
|
||||
panelSDeadzone.Name = "panelSDeadzone";
|
||||
panelSDeadzone.Size = new Size(560, 60);
|
||||
panelSDeadzone.TabIndex = 43;
|
||||
//
|
||||
// pictureSDeadzone
|
||||
//
|
||||
pictureSDeadzone.BackgroundImage = Properties.Resources.icons8_controller_32;
|
||||
pictureSDeadzone.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
pictureSDeadzone.ErrorImage = null;
|
||||
pictureSDeadzone.InitialImage = null;
|
||||
pictureSDeadzone.Location = new Point(10, 18);
|
||||
pictureSDeadzone.Margin = new Padding(4, 2, 4, 10);
|
||||
pictureSDeadzone.Name = "pictureSDeadzone";
|
||||
pictureSDeadzone.Size = new Size(32, 32);
|
||||
pictureSDeadzone.TabIndex = 41;
|
||||
pictureSDeadzone.TabStop = false;
|
||||
//
|
||||
// labelSDeadzone
|
||||
//
|
||||
labelSDeadzone.AutoSize = true;
|
||||
labelSDeadzone.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelSDeadzone.Location = new Point(45, 17);
|
||||
labelSDeadzone.Margin = new Padding(4, 0, 4, 0);
|
||||
labelSDeadzone.Name = "labelSDeadzone";
|
||||
labelSDeadzone.Size = new Size(199, 32);
|
||||
labelSDeadzone.TabIndex = 40;
|
||||
labelSDeadzone.Text = "Stick Deadzones";
|
||||
//
|
||||
// Handheld
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(13F, 32F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1293, 940);
|
||||
Controls.Add(panelController);
|
||||
MaximizeBox = false;
|
||||
MinimizeBox = false;
|
||||
Name = "Handheld";
|
||||
Padding = new Padding(10);
|
||||
ShowIcon = false;
|
||||
ShowInTaskbar = false;
|
||||
Text = "Controller";
|
||||
panelController.ResumeLayout(false);
|
||||
panelController.PerformLayout();
|
||||
panelVibra.ResumeLayout(false);
|
||||
panelVibra.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackVibra).EndInit();
|
||||
panelVibrationTitle.ResumeLayout(false);
|
||||
panelVibrationTitle.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureVibration).EndInit();
|
||||
panelRT.ResumeLayout(false);
|
||||
panelRT.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackRTMax).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)trackRTMin).EndInit();
|
||||
panelLT.ResumeLayout(false);
|
||||
panelLT.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackLTMax).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)trackLTMin).EndInit();
|
||||
panelTDeadzone.ResumeLayout(false);
|
||||
panelTDeadzone.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureTDeadzone).EndInit();
|
||||
panelRS.ResumeLayout(false);
|
||||
panelRS.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackRSMax).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)trackRSMin).EndInit();
|
||||
panelLS.ResumeLayout(false);
|
||||
panelLS.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackLSMax).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)trackLSMin).EndInit();
|
||||
panelSDeadzone.ResumeLayout(false);
|
||||
panelSDeadzone.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureSDeadzone).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Panel panelController;
|
||||
private Panel panelVibra;
|
||||
private Label labelVibra;
|
||||
private Label labelVibraTitle;
|
||||
private TrackBar trackVibra;
|
||||
private Panel panelLS;
|
||||
private TrackBar trackLSMax;
|
||||
private Label labelLS;
|
||||
private TrackBar trackLSMin;
|
||||
private Label labelLSTitle;
|
||||
private Panel panelSDeadzone;
|
||||
private PictureBox pictureSDeadzone;
|
||||
private Label labelSDeadzone;
|
||||
private Panel panelRS;
|
||||
private TrackBar trackRSMax;
|
||||
private Label labelRS;
|
||||
private TrackBar trackRSMin;
|
||||
private Label labelRSTitle;
|
||||
private Panel panelRT;
|
||||
private TrackBar trackRTMax;
|
||||
private Label labelRT;
|
||||
private TrackBar trackRTMin;
|
||||
private Label labelRTTitle;
|
||||
private Panel panelLT;
|
||||
private TrackBar trackLTMax;
|
||||
private Label labelLT;
|
||||
private TrackBar trackLTMin;
|
||||
private Label labelLTTitle;
|
||||
private Panel panelTDeadzone;
|
||||
private PictureBox pictureTDeadzone;
|
||||
private Label labelTDeadzone;
|
||||
private Panel panelVibrationTitle;
|
||||
private PictureBox pictureVibration;
|
||||
private Label labelVibraHeader;
|
||||
private UI.RButton buttonReset;
|
||||
}
|
||||
}
|
||||
132
app/Handheld.cs
Normal file
132
app/Handheld.cs
Normal file
@@ -0,0 +1,132 @@
|
||||
using GHelper.UI;
|
||||
using GHelper.Ally;
|
||||
|
||||
namespace GHelper
|
||||
{
|
||||
public partial class Handheld : RForm
|
||||
{
|
||||
public Handheld()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitTheme(true);
|
||||
|
||||
Shown += Handheld_Shown;
|
||||
|
||||
Init();
|
||||
|
||||
trackLSMin.Scroll += Controller_Scroll;
|
||||
trackLSMax.Scroll += Controller_Scroll;
|
||||
trackRSMin.Scroll += Controller_Scroll;
|
||||
trackRSMax.Scroll += Controller_Scroll;
|
||||
|
||||
trackLTMin.Scroll += Controller_Scroll;
|
||||
trackLTMax.Scroll += Controller_Scroll;
|
||||
trackRTMin.Scroll += Controller_Scroll;
|
||||
trackRTMax.Scroll += Controller_Scroll;
|
||||
|
||||
trackVibra.Scroll += Controller_Scroll;
|
||||
|
||||
buttonReset.Click += ButtonReset_Click;
|
||||
|
||||
trackLSMin.ValueChanged += Controller_Complete; ;
|
||||
trackLSMax.ValueChanged += Controller_Complete;
|
||||
trackRSMin.ValueChanged += Controller_Complete;
|
||||
trackRSMax.ValueChanged += Controller_Complete;
|
||||
|
||||
trackLTMin.ValueChanged += Controller_Complete;
|
||||
trackLTMax.ValueChanged += Controller_Complete;
|
||||
trackRTMin.ValueChanged += Controller_Complete;
|
||||
trackRTMax.ValueChanged += Controller_Complete;
|
||||
|
||||
trackVibra.ValueChanged += Controller_Complete;
|
||||
|
||||
}
|
||||
|
||||
private void Controller_Complete(object? sender, EventArgs e)
|
||||
{
|
||||
AllyControl.Deadzones();
|
||||
}
|
||||
|
||||
private void ButtonReset_Click(object? sender, EventArgs e)
|
||||
{
|
||||
trackLSMin.Value = 0;
|
||||
trackLSMax.Value = 100;
|
||||
trackRSMin.Value = 0;
|
||||
trackRSMax.Value = 100;
|
||||
|
||||
trackLTMin.Value = 0;
|
||||
trackLTMax.Value = 100;
|
||||
trackRTMin.Value = 0;
|
||||
trackRTMax.Value = 100;
|
||||
|
||||
trackVibra.Value = 100;
|
||||
|
||||
AppConfig.Remove("ls_min");
|
||||
AppConfig.Remove("ls_max");
|
||||
AppConfig.Remove("rs_min");
|
||||
AppConfig.Remove("rs_max");
|
||||
|
||||
AppConfig.Remove("lt_min");
|
||||
AppConfig.Remove("lt_max");
|
||||
AppConfig.Remove("rt_min");
|
||||
AppConfig.Remove("rt_max");
|
||||
AppConfig.Remove("vibra");
|
||||
|
||||
VisualiseController();
|
||||
|
||||
}
|
||||
|
||||
private void Init()
|
||||
{
|
||||
trackLSMin.Value = AppConfig.Get("ls_min", 0);
|
||||
trackLSMax.Value = AppConfig.Get("ls_max", 100);
|
||||
trackRSMin.Value = AppConfig.Get("rs_min", 0);
|
||||
trackRSMax.Value = AppConfig.Get("rs_max", 100);
|
||||
|
||||
trackLTMin.Value = AppConfig.Get("lt_min", 0);
|
||||
trackLTMax.Value = AppConfig.Get("lt_max", 100);
|
||||
trackRTMin.Value = AppConfig.Get("rt_min", 0);
|
||||
trackRTMax.Value = AppConfig.Get("rt_max", 100);
|
||||
|
||||
trackVibra.Value = AppConfig.Get("vibra", 100);
|
||||
|
||||
VisualiseController();
|
||||
}
|
||||
|
||||
private void VisualiseController()
|
||||
{
|
||||
labelLS.Text = $"{trackLSMin.Value} - {trackLSMax.Value}%";
|
||||
labelRS.Text = $"{trackRSMin.Value} - {trackRSMax.Value}%";
|
||||
|
||||
labelLT.Text = $"{trackLTMin.Value} - {trackLTMax.Value}%";
|
||||
labelRT.Text = $"{trackRTMin.Value} - {trackRTMax.Value}%";
|
||||
|
||||
labelVibra.Text = $"{trackVibra.Value}%";
|
||||
}
|
||||
|
||||
private void Controller_Scroll(object? sender, EventArgs e)
|
||||
{
|
||||
AppConfig.Set("ls_min", trackLSMin.Value);
|
||||
AppConfig.Set("ls_max", trackLSMax.Value);
|
||||
AppConfig.Set("rs_min", trackRSMin.Value);
|
||||
AppConfig.Set("rs_max", trackRSMax.Value);
|
||||
|
||||
AppConfig.Set("lt_min", trackLTMin.Value);
|
||||
AppConfig.Set("lt_max", trackLTMax.Value);
|
||||
AppConfig.Set("rt_min", trackRTMin.Value);
|
||||
AppConfig.Set("rt_max", trackRTMax.Value);
|
||||
|
||||
AppConfig.Set("vibra", trackVibra.Value);
|
||||
|
||||
VisualiseController();
|
||||
|
||||
}
|
||||
|
||||
private void Handheld_Shown(object? sender, EventArgs e)
|
||||
{
|
||||
Height = Program.settingsForm.Height;
|
||||
Top = Program.settingsForm.Top;
|
||||
Left = Program.settingsForm.Left - Width - 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
120
app/Handheld.resx
Normal file
120
app/Handheld.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
10
app/Properties/Resources.Designer.cs
generated
10
app/Properties/Resources.Designer.cs
generated
@@ -560,6 +560,16 @@ namespace GHelper.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap icons8_soonvibes_32 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("icons8-soonvibes-32", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
@@ -118,6 +118,9 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="icons8_charging_battery_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-charging-battery-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="brightness_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\brightness-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -151,8 +154,8 @@
|
||||
<data name="icons8-project-management-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-project-management-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="dot_standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\dot-standard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="icons8-controller-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-controller-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-charging-battery-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-charging-battery-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@@ -205,8 +208,8 @@
|
||||
<data name="icons8_batterie_voll_geladen_48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-batterie-voll-geladen-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8_charging_battery_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-charging-battery-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="dot_standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\dot-standard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="eco" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@@ -301,7 +304,7 @@
|
||||
<data name="icons8_rocket_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-rocket-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icons8-controller-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-controller-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="icons8-soonvibes-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons8-soonvibes-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
app/Resources/icons8-soonvibes-32.png
Normal file
BIN
app/Resources/icons8-soonvibes-32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 773 B |
156
app/Settings.Designer.cs
generated
156
app/Settings.Designer.cs
generated
@@ -64,6 +64,8 @@ namespace GHelper
|
||||
labelCPUFan = new Label();
|
||||
panelGPU = new Panel();
|
||||
labelTipGPU = new Label();
|
||||
tableAMD = new TableLayoutPanel();
|
||||
buttonFPS = new RButton();
|
||||
tableGPU = new TableLayoutPanel();
|
||||
buttonStopGPU = new RButton();
|
||||
buttonEco = new RButton();
|
||||
@@ -111,12 +113,11 @@ namespace GHelper
|
||||
panelAlly = new Panel();
|
||||
tableLayoutAlly = new TableLayoutPanel();
|
||||
buttonBacklight = new RButton();
|
||||
buttonController = new RButton();
|
||||
buttonControllerMode = new RButton();
|
||||
panelAllyTitle = new Panel();
|
||||
pictureAlly = new PictureBox();
|
||||
labelAlly = new Label();
|
||||
tableAMD = new TableLayoutPanel();
|
||||
buttonFPS = new RButton();
|
||||
buttonController = new RButton();
|
||||
panelMatrix.SuspendLayout();
|
||||
tableLayoutMatrix.SuspendLayout();
|
||||
panelMatrixTitle.SuspendLayout();
|
||||
@@ -131,6 +132,7 @@ namespace GHelper
|
||||
panelCPUTitle.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)picturePerf).BeginInit();
|
||||
panelGPU.SuspendLayout();
|
||||
tableAMD.SuspendLayout();
|
||||
tableGPU.SuspendLayout();
|
||||
panelGPUTitle.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit();
|
||||
@@ -154,7 +156,6 @@ namespace GHelper
|
||||
tableLayoutAlly.SuspendLayout();
|
||||
panelAllyTitle.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureAlly).BeginInit();
|
||||
tableAMD.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panelMatrix
|
||||
@@ -685,6 +686,47 @@ namespace GHelper
|
||||
labelTipGPU.Size = new Size(787, 36);
|
||||
labelTipGPU.TabIndex = 20;
|
||||
//
|
||||
// tableAMD
|
||||
//
|
||||
tableAMD.AutoSize = true;
|
||||
tableAMD.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
tableAMD.ColumnCount = 3;
|
||||
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableAMD.Controls.Add(buttonFPS, 0, 0);
|
||||
tableAMD.Dock = DockStyle.Top;
|
||||
tableAMD.Location = new Point(20, 316);
|
||||
tableAMD.Margin = new Padding(8, 4, 8, 4);
|
||||
tableAMD.Name = "tableAMD";
|
||||
tableAMD.RowCount = 1;
|
||||
tableAMD.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F));
|
||||
tableAMD.Size = new Size(787, 80);
|
||||
tableAMD.TabIndex = 24;
|
||||
tableAMD.Visible = false;
|
||||
//
|
||||
// buttonFPS
|
||||
//
|
||||
buttonFPS.Activated = false;
|
||||
buttonFPS.BackColor = SystemColors.ControlLightLight;
|
||||
buttonFPS.BorderColor = Color.Transparent;
|
||||
buttonFPS.BorderRadius = 5;
|
||||
buttonFPS.Dock = DockStyle.Fill;
|
||||
buttonFPS.FlatAppearance.BorderSize = 0;
|
||||
buttonFPS.FlatStyle = FlatStyle.Flat;
|
||||
buttonFPS.ForeColor = SystemColors.ControlText;
|
||||
buttonFPS.Image = Properties.Resources.icons8_video_48;
|
||||
buttonFPS.ImageAlign = ContentAlignment.MiddleRight;
|
||||
buttonFPS.Location = new Point(4, 4);
|
||||
buttonFPS.Margin = new Padding(4);
|
||||
buttonFPS.Name = "buttonFPS";
|
||||
buttonFPS.Secondary = false;
|
||||
buttonFPS.Size = new Size(254, 72);
|
||||
buttonFPS.TabIndex = 11;
|
||||
buttonFPS.Text = "FPS Limit OFF";
|
||||
buttonFPS.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||
buttonFPS.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// tableGPU
|
||||
//
|
||||
tableGPU.AutoSize = true;
|
||||
@@ -1431,8 +1473,9 @@ namespace GHelper
|
||||
tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableLayoutAlly.Controls.Add(buttonBacklight, 0, 0);
|
||||
tableLayoutAlly.Controls.Add(buttonController, 0, 0);
|
||||
tableLayoutAlly.Controls.Add(buttonBacklight, 0, 0);
|
||||
tableLayoutAlly.Controls.Add(buttonControllerMode, 0, 0);
|
||||
tableLayoutAlly.Dock = DockStyle.Top;
|
||||
tableLayoutAlly.Location = new Point(20, 60);
|
||||
tableLayoutAlly.Margin = new Padding(8, 4, 8, 4);
|
||||
@@ -1464,27 +1507,27 @@ namespace GHelper
|
||||
buttonBacklight.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||
buttonBacklight.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// buttonController
|
||||
// buttonControllerMode
|
||||
//
|
||||
buttonController.Activated = false;
|
||||
buttonController.BackColor = SystemColors.ControlLightLight;
|
||||
buttonController.BorderColor = Color.Transparent;
|
||||
buttonController.BorderRadius = 5;
|
||||
buttonController.Dock = DockStyle.Fill;
|
||||
buttonController.FlatAppearance.BorderSize = 0;
|
||||
buttonController.FlatStyle = FlatStyle.Flat;
|
||||
buttonController.ForeColor = SystemColors.ControlText;
|
||||
buttonController.Image = Properties.Resources.icons8_game_controller_48;
|
||||
buttonController.ImageAlign = ContentAlignment.MiddleRight;
|
||||
buttonController.Location = new Point(4, 4);
|
||||
buttonController.Margin = new Padding(4);
|
||||
buttonController.Name = "buttonController";
|
||||
buttonController.Secondary = false;
|
||||
buttonController.Size = new Size(254, 72);
|
||||
buttonController.TabIndex = 9;
|
||||
buttonController.Text = Properties.Strings.AutoMode;
|
||||
buttonController.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||
buttonController.UseVisualStyleBackColor = false;
|
||||
buttonControllerMode.Activated = false;
|
||||
buttonControllerMode.BackColor = SystemColors.ControlLightLight;
|
||||
buttonControllerMode.BorderColor = Color.Transparent;
|
||||
buttonControllerMode.BorderRadius = 5;
|
||||
buttonControllerMode.Dock = DockStyle.Fill;
|
||||
buttonControllerMode.FlatAppearance.BorderSize = 0;
|
||||
buttonControllerMode.FlatStyle = FlatStyle.Flat;
|
||||
buttonControllerMode.ForeColor = SystemColors.ControlText;
|
||||
buttonControllerMode.Image = Properties.Resources.icons8_game_controller_48;
|
||||
buttonControllerMode.ImageAlign = ContentAlignment.MiddleRight;
|
||||
buttonControllerMode.Location = new Point(4, 4);
|
||||
buttonControllerMode.Margin = new Padding(4);
|
||||
buttonControllerMode.Name = "buttonControllerMode";
|
||||
buttonControllerMode.Secondary = false;
|
||||
buttonControllerMode.Size = new Size(254, 72);
|
||||
buttonControllerMode.TabIndex = 9;
|
||||
buttonControllerMode.Text = Properties.Strings.AutoMode;
|
||||
buttonControllerMode.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||
buttonControllerMode.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// panelAllyTitle
|
||||
//
|
||||
@@ -1519,46 +1562,26 @@ namespace GHelper
|
||||
labelAlly.TabIndex = 26;
|
||||
labelAlly.Text = "Ally Controller";
|
||||
//
|
||||
// tableAMD
|
||||
// buttonController
|
||||
//
|
||||
tableAMD.AutoSize = true;
|
||||
tableAMD.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
tableAMD.ColumnCount = 3;
|
||||
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
tableAMD.Controls.Add(buttonFPS, 0, 0);
|
||||
tableAMD.Dock = DockStyle.Top;
|
||||
tableAMD.Location = new Point(20, 316);
|
||||
tableAMD.Margin = new Padding(8, 4, 8, 4);
|
||||
tableAMD.Name = "tableAMD";
|
||||
tableAMD.RowCount = 1;
|
||||
tableAMD.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F));
|
||||
tableAMD.Size = new Size(787, 80);
|
||||
tableAMD.TabIndex = 24;
|
||||
tableAMD.Visible = false;
|
||||
//
|
||||
// buttonFPS
|
||||
//
|
||||
buttonFPS.Activated = false;
|
||||
buttonFPS.BackColor = SystemColors.ControlLightLight;
|
||||
buttonFPS.BorderColor = Color.Transparent;
|
||||
buttonFPS.BorderRadius = 5;
|
||||
buttonFPS.Dock = DockStyle.Fill;
|
||||
buttonFPS.FlatAppearance.BorderSize = 0;
|
||||
buttonFPS.FlatStyle = FlatStyle.Flat;
|
||||
buttonFPS.ForeColor = SystemColors.ControlText;
|
||||
buttonFPS.Image = Properties.Resources.icons8_video_48;
|
||||
buttonFPS.ImageAlign = ContentAlignment.MiddleRight;
|
||||
buttonFPS.Location = new Point(4, 4);
|
||||
buttonFPS.Margin = new Padding(4);
|
||||
buttonFPS.Name = "buttonFPS";
|
||||
buttonFPS.Secondary = false;
|
||||
buttonFPS.Size = new Size(254, 72);
|
||||
buttonFPS.TabIndex = 11;
|
||||
buttonFPS.Text = "FPS Limit OFF";
|
||||
buttonFPS.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||
buttonFPS.UseVisualStyleBackColor = false;
|
||||
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
|
||||
//
|
||||
@@ -1607,6 +1630,7 @@ namespace GHelper
|
||||
((System.ComponentModel.ISupportInitialize)picturePerf).EndInit();
|
||||
panelGPU.ResumeLayout(false);
|
||||
panelGPU.PerformLayout();
|
||||
tableAMD.ResumeLayout(false);
|
||||
tableGPU.ResumeLayout(false);
|
||||
panelGPUTitle.ResumeLayout(false);
|
||||
panelGPUTitle.PerformLayout();
|
||||
@@ -1641,7 +1665,6 @@ namespace GHelper
|
||||
panelAllyTitle.ResumeLayout(false);
|
||||
panelAllyTitle.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureAlly).EndInit();
|
||||
tableAMD.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
@@ -1727,12 +1750,13 @@ namespace GHelper
|
||||
private RButton buttonBatteryFull;
|
||||
private Panel panelAlly;
|
||||
private TableLayoutPanel tableLayoutAlly;
|
||||
private RButton buttonController;
|
||||
private RButton buttonControllerMode;
|
||||
private Panel panelAllyTitle;
|
||||
private Label labelAlly;
|
||||
private PictureBox pictureAlly;
|
||||
private RButton buttonBacklight;
|
||||
private TableLayoutPanel tableAMD;
|
||||
private RButton buttonFPS;
|
||||
private RButton buttonController;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ using GHelper.Peripherals;
|
||||
using GHelper.Peripherals.Mouse;
|
||||
using GHelper.UI;
|
||||
using GHelper.USB;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Timers;
|
||||
|
||||
@@ -37,6 +38,7 @@ namespace GHelper
|
||||
public Fans? fansForm;
|
||||
public Extra? extraForm;
|
||||
public Updates? updatesForm;
|
||||
public Handheld? handheldForm;
|
||||
|
||||
static long lastRefresh;
|
||||
static long lastBatteryRefresh;
|
||||
@@ -159,6 +161,7 @@ namespace GHelper
|
||||
|
||||
buttonFans.Click += ButtonFans_Click;
|
||||
buttonKeyboard.Click += ButtonKeyboard_Click;
|
||||
buttonController.Click += ButtonHandheld_Click;
|
||||
|
||||
pictureColor.Click += PictureColor_Click;
|
||||
pictureColor2.Click += PictureColor2_Click;
|
||||
@@ -230,7 +233,7 @@ namespace GHelper
|
||||
buttonBatteryFull.MouseLeave += ButtonBatteryFull_MouseLeave;
|
||||
buttonBatteryFull.Click += ButtonBatteryFull_Click;
|
||||
|
||||
buttonController.Click += ButtonController_Click;
|
||||
buttonControllerMode.Click += ButtonControllerMode_Click;
|
||||
buttonBacklight.Click += ButtonBacklight_Click;
|
||||
buttonFPS.Click += ButtonFPS_Click;
|
||||
|
||||
@@ -247,6 +250,25 @@ namespace GHelper
|
||||
panelPerformance.Focus();
|
||||
}
|
||||
|
||||
private void ButtonHandheld_Click(object? sender, EventArgs e)
|
||||
{
|
||||
if (handheldForm == null || handheldForm.Text == "")
|
||||
{
|
||||
handheldForm = new Handheld();
|
||||
AddOwnedForm(handheldForm);
|
||||
}
|
||||
|
||||
if (handheldForm.Visible)
|
||||
{
|
||||
handheldForm.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//handheldForm.FormPosition();
|
||||
handheldForm.Show();
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonFPS_Click(object? sender, EventArgs e)
|
||||
{
|
||||
allyControl.ToggleFPSLimit();
|
||||
@@ -257,7 +279,7 @@ namespace GHelper
|
||||
allyControl.ToggleBacklight();
|
||||
}
|
||||
|
||||
private void ButtonController_Click(object? sender, EventArgs e)
|
||||
private void ButtonControllerMode_Click(object? sender, EventArgs e)
|
||||
{
|
||||
allyControl.ToggleMode();
|
||||
}
|
||||
@@ -278,13 +300,13 @@ namespace GHelper
|
||||
switch (mode)
|
||||
{
|
||||
case ControllerMode.Gamepad:
|
||||
buttonController.Text = "Gamepad";
|
||||
buttonControllerMode.Text = "Gamepad";
|
||||
break;
|
||||
case ControllerMode.Mouse:
|
||||
buttonController.Text = "Mouse";
|
||||
buttonControllerMode.Text = "Mouse";
|
||||
break;
|
||||
default:
|
||||
buttonController.Text = "Auto";
|
||||
buttonControllerMode.Text = "Auto";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,6 @@ namespace GHelper
|
||||
InitializeComponent();
|
||||
InitTheme(true);
|
||||
|
||||
|
||||
LoadUpdates(true);
|
||||
|
||||
//buttonRefresh.Visible = false;
|
||||
|
||||
Reference in New Issue
Block a user