diff --git a/app/AppConfig.cs b/app/AppConfig.cs index 725d5151..8de91e6b 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -321,7 +321,7 @@ public static class AppConfig public static bool IsAlly() { - return ContainsModel("RC71"); + return true || ContainsModel("RC71"); } public static bool NoMKeys() diff --git a/app/Extra.cs b/app/Extra.cs index 5e75cb85..baf171fe 100644 --- a/app/Extra.cs +++ b/app/Extra.cs @@ -13,7 +13,6 @@ namespace GHelper { ScreenControl screenControl = new ScreenControl(); - ModeControl modeControl = new ModeControl(); ClamshellModeControl clamshellControl = new ClamshellModeControl(); const string EMPTY = "--------------"; diff --git a/app/Handheld.Designer.cs b/app/Handheld.Designer.cs index 1c50b22e..3c7086b1 100644 --- a/app/Handheld.Designer.cs +++ b/app/Handheld.Designer.cs @@ -28,95 +28,113 @@ /// private void InitializeComponent() { - panelController = new Panel(); + panelDeadzones = new Panel(); + panelRight = 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(); + pictureBox4 = new PictureBox(); 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(); + pictureBox1 = new PictureBox(); trackRSMax = new TrackBar(); labelRS = new Label(); trackRSMin = new TrackBar(); labelRSTitle = new Label(); + panelLeft = new Panel(); + panelVibra = new Panel(); + pictureBox5 = new PictureBox(); + labelVibra = new Label(); + labelVibraTitle = new Label(); + trackVibra = new TrackBar(); + panelLT = new Panel(); + pictureBox2 = new PictureBox(); + trackLTMax = new TrackBar(); + labelLT = new Label(); + trackLTMin = new TrackBar(); + labelLTTitle = new Label(); panelLS = new Panel(); + pictureBox3 = new PictureBox(); trackLSMax = new TrackBar(); labelLS = new Label(); trackLSMin = new TrackBar(); labelLSTitle = new Label(); - panelSDeadzone = new Panel(); - pictureSDeadzone = new PictureBox(); - labelSDeadzone = new Label(); panelBindings = new Panel(); - tableBindings = new TableLayoutPanel(); - labelPrimary = new Label(); + buttonView = new UI.RButton(); + buttonLS = new UI.RButton(); + buttonLT = new UI.RButton(); + buttonLB = new UI.RButton(); + buttonDPR = new UI.RButton(); + buttonDPL = new UI.RButton(); + buttonDPD = new UI.RButton(); + buttonDPU = new UI.RButton(); + buttonM2 = new UI.RButton(); + buttonM1 = new UI.RButton(); + buttonRS = new UI.RButton(); + buttonMenu = new UI.RButton(); + buttonRT = new UI.RButton(); + buttonRB = new UI.RButton(); + buttonB = new UI.RButton(); + buttonA = new UI.RButton(); + buttonY = new UI.RButton(); + buttonX = new UI.RButton(); + pictureAlly = new PictureBox(); + panelBinding = new Panel(); + labelBinding = new Label(); labelSecondary = new Label(); - panelBindingsTitle = new Panel(); - pictureBindings = new PictureBox(); - labelBindings = new Label(); - panelController.SuspendLayout(); - panelVibra.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)trackVibra).BeginInit(); - panelVibrationTitle.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)pictureVibration).BeginInit(); + labelPrimary = new Label(); + comboSecondary = new UI.RComboBox(); + comboPrimary = new UI.RComboBox(); + panelDeadzones.SuspendLayout(); + panelRight.SuspendLayout(); panelRT.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox4).BeginInit(); ((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)pictureBox1).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackRSMax).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackRSMin).BeginInit(); + panelLeft.SuspendLayout(); + panelVibra.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)trackVibra).BeginInit(); + panelLT.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)trackLTMax).BeginInit(); + ((System.ComponentModel.ISupportInitialize)trackLTMin).BeginInit(); panelLS.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox3).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackLSMax).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackLSMin).BeginInit(); - panelSDeadzone.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)pictureSDeadzone).BeginInit(); panelBindings.SuspendLayout(); - tableBindings.SuspendLayout(); - panelBindingsTitle.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)pictureBindings).BeginInit(); + ((System.ComponentModel.ISupportInitialize)pictureAlly).BeginInit(); + panelBinding.SuspendLayout(); SuspendLayout(); // - // panelController + // panelDeadzones // - 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, 912); - panelController.TabIndex = 45; + panelDeadzones.Controls.Add(panelRight); + panelDeadzones.Controls.Add(panelLeft); + panelDeadzones.Dock = DockStyle.Top; + panelDeadzones.Location = new Point(10, 10); + panelDeadzones.Name = "panelDeadzones"; + panelDeadzones.Size = new Size(1130, 372); + panelDeadzones.TabIndex = 0; + // + // panelRight + // + panelRight.Controls.Add(buttonReset); + panelRight.Controls.Add(panelRT); + panelRight.Controls.Add(panelRS); + panelRight.Dock = DockStyle.Left; + panelRight.Location = new Point(560, 0); + panelRight.MinimumSize = new Size(560, 0); + panelRight.Name = "panelRight"; + panelRight.Size = new Size(560, 372); + panelRight.TabIndex = 48; // // buttonReset // @@ -126,115 +144,44 @@ buttonReset.BorderColor = Color.Transparent; buttonReset.BorderRadius = 2; buttonReset.FlatStyle = FlatStyle.Flat; - buttonReset.Location = new Point(20, 840); + buttonReset.Location = new Point(310, 296); buttonReset.Margin = new Padding(4, 2, 4, 2); buttonReset.Name = "buttonReset"; buttonReset.Secondary = true; buttonReset.Size = new Size(239, 50); - buttonReset.TabIndex = 54; - buttonReset.Text = "Reset"; + buttonReset.TabIndex = 55; + buttonReset.Text = "Reset Deadzones"; 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(pictureBox4); 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.Location = new Point(0, 124); panelRT.Margin = new Padding(4); panelRT.MaximumSize = new Size(0, 124); panelRT.Name = "panelRT"; panelRT.Size = new Size(560, 124); - panelRT.TabIndex = 50; + panelRT.TabIndex = 51; + // + // pictureBox4 + // + pictureBox4.BackgroundImage = Properties.Resources.icons8_xbox_lt_32; + pictureBox4.BackgroundImageLayout = ImageLayout.Zoom; + pictureBox4.ErrorImage = null; + pictureBox4.InitialImage = null; + pictureBox4.Location = new Point(16, 18); + pictureBox4.Margin = new Padding(4, 2, 4, 10); + pictureBox4.Name = "pictureBox4"; + pictureBox4.Size = new Size(32, 32); + pictureBox4.TabIndex = 43; + pictureBox4.TabStop = false; // // trackRTMax // @@ -278,130 +225,42 @@ // labelRTTitle // labelRTTitle.AutoSize = true; - labelRTTitle.Location = new Point(10, 16); + labelRTTitle.Location = new Point(56, 16); labelRTTitle.Margin = new Padding(4, 0, 4, 0); labelRTTitle.Name = "labelRTTitle"; - labelRTTitle.Size = new Size(151, 32); + labelRTTitle.Size = new Size(276, 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_xbox_lt_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"; + labelRTTitle.Text = "Right Trigger Deadzones"; // // panelRS // panelRS.AutoSize = true; panelRS.AutoSizeMode = AutoSizeMode.GrowAndShrink; + panelRS.Controls.Add(pictureBox1); 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.Location = new Point(0, 0); panelRS.Margin = new Padding(4); panelRS.MaximumSize = new Size(0, 124); panelRS.Name = "panelRS"; panelRS.Size = new Size(560, 124); - panelRS.TabIndex = 49; + panelRS.TabIndex = 50; + // + // pictureBox1 + // + pictureBox1.BackgroundImage = Properties.Resources.icons8_joystick_32; + pictureBox1.BackgroundImageLayout = ImageLayout.Zoom; + pictureBox1.ErrorImage = null; + pictureBox1.InitialImage = null; + pictureBox1.Location = new Point(16, 14); + pictureBox1.Margin = new Padding(4, 2, 4, 10); + pictureBox1.Name = "pictureBox1"; + pictureBox1.Size = new Size(32, 32); + pictureBox1.TabIndex = 43; + pictureBox1.TabStop = false; // // trackRSMax // @@ -445,29 +304,199 @@ // labelRSTitle // labelRSTitle.AutoSize = true; - labelRSTitle.Location = new Point(10, 16); + labelRSTitle.Location = new Point(56, 14); labelRSTitle.Margin = new Padding(4, 0, 4, 0); labelRSTitle.Name = "labelRSTitle"; - labelRSTitle.Size = new Size(126, 32); + labelRSTitle.Size = new Size(251, 32); labelRSTitle.TabIndex = 17; - labelRSTitle.Text = "Right Stick"; + labelRSTitle.Text = "Right Stick Deadzones"; + // + // panelLeft + // + panelLeft.AutoSize = true; + panelLeft.Controls.Add(panelVibra); + panelLeft.Controls.Add(panelLT); + panelLeft.Controls.Add(panelLS); + panelLeft.Dock = DockStyle.Left; + panelLeft.Location = new Point(0, 0); + panelLeft.Margin = new Padding(4); + panelLeft.MinimumSize = new Size(560, 0); + panelLeft.Name = "panelLeft"; + panelLeft.Padding = new Padding(0, 0, 0, 18); + panelLeft.Size = new Size(560, 372); + panelLeft.TabIndex = 47; + // + // panelVibra + // + panelVibra.AutoSize = true; + panelVibra.AutoSizeMode = AutoSizeMode.GrowAndShrink; + panelVibra.Controls.Add(pictureBox5); + panelVibra.Controls.Add(labelVibra); + panelVibra.Controls.Add(labelVibraTitle); + panelVibra.Controls.Add(trackVibra); + panelVibra.Dock = DockStyle.Top; + panelVibra.Location = new Point(0, 248); + panelVibra.Margin = new Padding(4); + panelVibra.MaximumSize = new Size(0, 124); + panelVibra.Name = "panelVibra"; + panelVibra.Size = new Size(560, 124); + panelVibra.TabIndex = 46; + // + // pictureBox5 + // + pictureBox5.BackgroundImage = Properties.Resources.icons8_soonvibes_32; + pictureBox5.BackgroundImageLayout = ImageLayout.Zoom; + pictureBox5.ErrorImage = null; + pictureBox5.InitialImage = null; + pictureBox5.Location = new Point(10, 14); + pictureBox5.Margin = new Padding(4, 2, 4, 10); + pictureBox5.Name = "pictureBox5"; + pictureBox5.Size = new Size(32, 32); + pictureBox5.TabIndex = 45; + pictureBox5.TabStop = false; + // + // 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(77, 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; + // + // panelLT + // + panelLT.AutoSize = true; + panelLT.AutoSizeMode = AutoSizeMode.GrowAndShrink; + panelLT.Controls.Add(pictureBox2); + 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, 124); + panelLT.Margin = new Padding(4); + panelLT.MaximumSize = new Size(0, 124); + panelLT.Name = "panelLT"; + panelLT.Size = new Size(560, 124); + panelLT.TabIndex = 51; + // + // pictureBox2 + // + pictureBox2.BackgroundImage = Properties.Resources.icons8_xbox_lt_32; + pictureBox2.BackgroundImageLayout = ImageLayout.Zoom; + pictureBox2.ErrorImage = null; + pictureBox2.InitialImage = null; + pictureBox2.Location = new Point(20, 14); + pictureBox2.Margin = new Padding(4, 2, 4, 10); + pictureBox2.Name = "pictureBox2"; + pictureBox2.Size = new Size(32, 32); + pictureBox2.TabIndex = 42; + pictureBox2.TabStop = false; + // + // 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(60, 14); + labelLTTitle.Margin = new Padding(4, 0, 4, 0); + labelLTTitle.Name = "labelLTTitle"; + labelLTTitle.Size = new Size(260, 32); + labelLTTitle.TabIndex = 17; + labelLTTitle.Text = "Left Trigger Deadzones"; // // panelLS // panelLS.AutoSize = true; panelLS.AutoSizeMode = AutoSizeMode.GrowAndShrink; + panelLS.Controls.Add(pictureBox3); 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.Location = new Point(0, 0); panelLS.Margin = new Padding(4); panelLS.MaximumSize = new Size(0, 124); panelLS.Name = "panelLS"; panelLS.Size = new Size(560, 124); panelLS.TabIndex = 48; // + // pictureBox3 + // + pictureBox3.BackgroundImage = Properties.Resources.icons8_joystick_32; + pictureBox3.BackgroundImageLayout = ImageLayout.Zoom; + pictureBox3.ErrorImage = null; + pictureBox3.InitialImage = null; + pictureBox3.Location = new Point(20, 13); + pictureBox3.Margin = new Padding(4, 2, 4, 10); + pictureBox3.Name = "pictureBox3"; + pictureBox3.Size = new Size(32, 32); + pictureBox3.TabIndex = 42; + pictureBox3.TabStop = false; + // // trackLSMax // trackLSMax.Location = new Point(272, 48); @@ -510,148 +539,488 @@ // labelLSTitle // labelLSTitle.AutoSize = true; - labelLSTitle.Location = new Point(10, 16); + labelLSTitle.Location = new Point(56, 13); labelLSTitle.Margin = new Padding(4, 0, 4, 0); labelLSTitle.Name = "labelLSTitle"; - labelLSTitle.Size = new Size(110, 32); + labelLSTitle.Size = new Size(235, 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_joystick_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"; + labelLSTitle.Text = "Left Stick Deadzones"; // // panelBindings // - panelBindings.Controls.Add(tableBindings); - panelBindings.Controls.Add(panelBindingsTitle); - panelBindings.Dock = DockStyle.Left; - panelBindings.Location = new Point(570, 10); - panelBindings.MinimumSize = new Size(700, 0); + panelBindings.Controls.Add(panelBinding); + panelBindings.Controls.Add(buttonView); + panelBindings.Controls.Add(buttonLS); + panelBindings.Controls.Add(buttonLT); + panelBindings.Controls.Add(buttonLB); + panelBindings.Controls.Add(buttonDPR); + panelBindings.Controls.Add(buttonDPL); + panelBindings.Controls.Add(buttonDPD); + panelBindings.Controls.Add(buttonDPU); + panelBindings.Controls.Add(buttonM2); + panelBindings.Controls.Add(buttonM1); + panelBindings.Controls.Add(buttonRS); + panelBindings.Controls.Add(buttonMenu); + panelBindings.Controls.Add(buttonRT); + panelBindings.Controls.Add(buttonRB); + panelBindings.Controls.Add(buttonB); + panelBindings.Controls.Add(buttonA); + panelBindings.Controls.Add(buttonY); + panelBindings.Controls.Add(buttonX); + panelBindings.Controls.Add(pictureAlly); + panelBindings.Dock = DockStyle.Top; + panelBindings.Location = new Point(10, 382); panelBindings.Name = "panelBindings"; - panelBindings.Size = new Size(700, 912); - panelBindings.TabIndex = 46; + panelBindings.Size = new Size(1130, 480); + panelBindings.TabIndex = 1; // - // tableBindings + // buttonView // - tableBindings.AutoSize = true; - tableBindings.ColumnCount = 3; - tableBindings.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); - tableBindings.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); - tableBindings.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); - tableBindings.Controls.Add(labelPrimary, 1, 0); - tableBindings.Controls.Add(labelSecondary, 2, 0); - tableBindings.Dock = DockStyle.Top; - tableBindings.Location = new Point(0, 60); - tableBindings.Name = "tableBindings"; - tableBindings.Padding = new Padding(5); - tableBindings.RowCount = 1; - tableBindings.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); - tableBindings.Size = new Size(700, 52); - tableBindings.TabIndex = 49; + buttonView.Activated = false; + buttonView.BackColor = SystemColors.ControlLight; + buttonView.BorderColor = Color.Transparent; + buttonView.BorderRadius = 5; + buttonView.FlatAppearance.BorderSize = 0; + buttonView.FlatStyle = FlatStyle.Flat; + buttonView.ForeColor = SystemColors.ControlText; + buttonView.ImageAlign = ContentAlignment.MiddleRight; + buttonView.Location = new Point(175, 8); + buttonView.Margin = new Padding(4); + buttonView.Name = "buttonView"; + buttonView.Secondary = true; + buttonView.Size = new Size(147, 55); + buttonView.TabIndex = 36; + buttonView.Text = "View"; + buttonView.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonView.UseVisualStyleBackColor = false; // - // labelPrimary + // buttonLS // - labelPrimary.AutoSize = true; - labelPrimary.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); - labelPrimary.Location = new Point(147, 5); - labelPrimary.Margin = new Padding(4, 0, 4, 0); - labelPrimary.Name = "labelPrimary"; - labelPrimary.Padding = new Padding(5); - labelPrimary.Size = new Size(115, 42); - labelPrimary.TabIndex = 41; - labelPrimary.Text = "Primary"; + buttonLS.Activated = false; + buttonLS.BackColor = SystemColors.ControlLight; + buttonLS.BorderColor = Color.Transparent; + buttonLS.BorderRadius = 5; + buttonLS.FlatAppearance.BorderSize = 0; + buttonLS.FlatStyle = FlatStyle.Flat; + buttonLS.ForeColor = SystemColors.ControlText; + buttonLS.ImageAlign = ContentAlignment.MiddleRight; + buttonLS.Location = new Point(20, 385); + buttonLS.Margin = new Padding(4); + buttonLS.Name = "buttonLS"; + buttonLS.Secondary = true; + buttonLS.Size = new Size(147, 55); + buttonLS.TabIndex = 35; + buttonLS.Text = "LStick"; + buttonLS.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonLS.UseVisualStyleBackColor = false; + // + // buttonLT + // + buttonLT.Activated = false; + buttonLT.BackColor = SystemColors.ControlLight; + buttonLT.BorderColor = Color.Transparent; + buttonLT.BorderRadius = 5; + buttonLT.FlatAppearance.BorderSize = 0; + buttonLT.FlatStyle = FlatStyle.Flat; + buttonLT.ForeColor = SystemColors.ControlText; + buttonLT.ImageAlign = ContentAlignment.MiddleRight; + buttonLT.Location = new Point(20, 70); + buttonLT.Margin = new Padding(4); + buttonLT.Name = "buttonLT"; + buttonLT.Secondary = true; + buttonLT.Size = new Size(147, 55); + buttonLT.TabIndex = 34; + buttonLT.Text = "LTrigger"; + buttonLT.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonLT.UseVisualStyleBackColor = false; + // + // buttonLB + // + buttonLB.Activated = false; + buttonLB.BackColor = SystemColors.ControlLight; + buttonLB.BorderColor = Color.Transparent; + buttonLB.BorderRadius = 5; + buttonLB.FlatAppearance.BorderSize = 0; + buttonLB.FlatStyle = FlatStyle.Flat; + buttonLB.ForeColor = SystemColors.ControlText; + buttonLB.ImageAlign = ContentAlignment.MiddleRight; + buttonLB.Location = new Point(20, 7); + buttonLB.Margin = new Padding(4); + buttonLB.Name = "buttonLB"; + buttonLB.Secondary = true; + buttonLB.Size = new Size(147, 55); + buttonLB.TabIndex = 33; + buttonLB.Text = "LBumper"; + buttonLB.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonLB.UseVisualStyleBackColor = false; + // + // buttonDPR + // + buttonDPR.Activated = false; + buttonDPR.BackColor = SystemColors.ControlLight; + buttonDPR.BorderColor = Color.Transparent; + buttonDPR.BorderRadius = 5; + buttonDPR.FlatAppearance.BorderSize = 0; + buttonDPR.FlatStyle = FlatStyle.Flat; + buttonDPR.ForeColor = SystemColors.ControlText; + buttonDPR.ImageAlign = ContentAlignment.MiddleRight; + buttonDPR.Location = new Point(20, 322); + buttonDPR.Margin = new Padding(4); + buttonDPR.Name = "buttonDPR"; + buttonDPR.Secondary = true; + buttonDPR.Size = new Size(147, 55); + buttonDPR.TabIndex = 32; + buttonDPR.Text = "DpadRight"; + buttonDPR.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonDPR.UseVisualStyleBackColor = false; + // + // buttonDPL + // + buttonDPL.Activated = false; + buttonDPL.BackColor = SystemColors.ControlLight; + buttonDPL.BorderColor = Color.Transparent; + buttonDPL.BorderRadius = 5; + buttonDPL.FlatAppearance.BorderSize = 0; + buttonDPL.FlatStyle = FlatStyle.Flat; + buttonDPL.ForeColor = SystemColors.ControlText; + buttonDPL.ImageAlign = ContentAlignment.MiddleRight; + buttonDPL.Location = new Point(20, 259); + buttonDPL.Margin = new Padding(4); + buttonDPL.Name = "buttonDPL"; + buttonDPL.Secondary = true; + buttonDPL.Size = new Size(147, 55); + buttonDPL.TabIndex = 31; + buttonDPL.Text = "DpadLeft"; + buttonDPL.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonDPL.UseVisualStyleBackColor = false; + // + // buttonDPD + // + buttonDPD.Activated = false; + buttonDPD.BackColor = SystemColors.ControlLight; + buttonDPD.BorderColor = Color.Transparent; + buttonDPD.BorderRadius = 5; + buttonDPD.FlatAppearance.BorderSize = 0; + buttonDPD.FlatStyle = FlatStyle.Flat; + buttonDPD.ForeColor = SystemColors.ControlText; + buttonDPD.ImageAlign = ContentAlignment.MiddleRight; + buttonDPD.Location = new Point(20, 196); + buttonDPD.Margin = new Padding(4); + buttonDPD.Name = "buttonDPD"; + buttonDPD.Secondary = true; + buttonDPD.Size = new Size(147, 55); + buttonDPD.TabIndex = 30; + buttonDPD.Text = "DpadDown"; + buttonDPD.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonDPD.UseVisualStyleBackColor = false; + // + // buttonDPU + // + buttonDPU.Activated = false; + buttonDPU.BackColor = SystemColors.ControlLight; + buttonDPU.BorderColor = Color.Transparent; + buttonDPU.BorderRadius = 5; + buttonDPU.FlatAppearance.BorderSize = 0; + buttonDPU.FlatStyle = FlatStyle.Flat; + buttonDPU.ForeColor = SystemColors.ControlText; + buttonDPU.ImageAlign = ContentAlignment.MiddleRight; + buttonDPU.Location = new Point(20, 133); + buttonDPU.Margin = new Padding(4); + buttonDPU.Name = "buttonDPU"; + buttonDPU.Secondary = true; + buttonDPU.Size = new Size(147, 55); + buttonDPU.TabIndex = 29; + buttonDPU.Text = "DpadUp"; + buttonDPU.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonDPU.UseVisualStyleBackColor = false; + // + // buttonM2 + // + buttonM2.Activated = false; + buttonM2.BackColor = SystemColors.ControlLight; + buttonM2.BorderColor = Color.Transparent; + buttonM2.BorderRadius = 5; + buttonM2.FlatAppearance.BorderSize = 0; + buttonM2.FlatStyle = FlatStyle.Flat; + buttonM2.ForeColor = SystemColors.ControlText; + buttonM2.ImageAlign = ContentAlignment.MiddleRight; + buttonM2.Location = new Point(330, 8); + buttonM2.Margin = new Padding(4); + buttonM2.Name = "buttonM2"; + buttonM2.Secondary = true; + buttonM2.Size = new Size(147, 55); + buttonM2.TabIndex = 28; + buttonM2.Text = "M2"; + buttonM2.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonM2.UseVisualStyleBackColor = false; + // + // buttonM1 + // + buttonM1.Activated = false; + buttonM1.BackColor = SystemColors.ControlLight; + buttonM1.BorderColor = Color.Transparent; + buttonM1.BorderRadius = 5; + buttonM1.FlatAppearance.BorderSize = 0; + buttonM1.FlatStyle = FlatStyle.Flat; + buttonM1.ForeColor = SystemColors.ControlText; + buttonM1.ImageAlign = ContentAlignment.MiddleRight; + buttonM1.Location = new Point(650, 8); + buttonM1.Margin = new Padding(4); + buttonM1.Name = "buttonM1"; + buttonM1.Secondary = true; + buttonM1.Size = new Size(147, 55); + buttonM1.TabIndex = 27; + buttonM1.Text = "M1"; + buttonM1.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonM1.UseVisualStyleBackColor = false; + // + // buttonRS + // + buttonRS.Activated = false; + buttonRS.BackColor = SystemColors.ControlLight; + buttonRS.BorderColor = Color.Transparent; + buttonRS.BorderRadius = 5; + buttonRS.FlatAppearance.BorderSize = 0; + buttonRS.FlatStyle = FlatStyle.Flat; + buttonRS.ForeColor = SystemColors.ControlText; + buttonRS.ImageAlign = ContentAlignment.MiddleRight; + buttonRS.Location = new Point(962, 385); + buttonRS.Margin = new Padding(4); + buttonRS.Name = "buttonRS"; + buttonRS.Secondary = true; + buttonRS.Size = new Size(147, 55); + buttonRS.TabIndex = 23; + buttonRS.Text = "RStick"; + buttonRS.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonRS.UseVisualStyleBackColor = false; + // + // buttonMenu + // + buttonMenu.Activated = false; + buttonMenu.BackColor = SystemColors.ControlLight; + buttonMenu.BorderColor = Color.Transparent; + buttonMenu.BorderRadius = 5; + buttonMenu.FlatAppearance.BorderSize = 0; + buttonMenu.FlatStyle = FlatStyle.Flat; + buttonMenu.ForeColor = SystemColors.ControlText; + buttonMenu.ImageAlign = ContentAlignment.MiddleRight; + buttonMenu.Location = new Point(805, 8); + buttonMenu.Margin = new Padding(4); + buttonMenu.Name = "buttonMenu"; + buttonMenu.Secondary = true; + buttonMenu.Size = new Size(147, 55); + buttonMenu.TabIndex = 22; + buttonMenu.Text = "Menu"; + buttonMenu.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonMenu.UseVisualStyleBackColor = false; + // + // buttonRT + // + buttonRT.Activated = false; + buttonRT.BackColor = SystemColors.ControlLight; + buttonRT.BorderColor = Color.Transparent; + buttonRT.BorderRadius = 5; + buttonRT.FlatAppearance.BorderSize = 0; + buttonRT.FlatStyle = FlatStyle.Flat; + buttonRT.ForeColor = SystemColors.ControlText; + buttonRT.ImageAlign = ContentAlignment.MiddleRight; + buttonRT.Location = new Point(962, 70); + buttonRT.Margin = new Padding(4); + buttonRT.Name = "buttonRT"; + buttonRT.Secondary = true; + buttonRT.Size = new Size(147, 55); + buttonRT.TabIndex = 21; + buttonRT.Text = "RTrigger"; + buttonRT.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonRT.UseVisualStyleBackColor = false; + // + // buttonRB + // + buttonRB.Activated = false; + buttonRB.BackColor = SystemColors.ControlLight; + buttonRB.BorderColor = Color.Transparent; + buttonRB.BorderRadius = 5; + buttonRB.FlatAppearance.BorderSize = 0; + buttonRB.FlatStyle = FlatStyle.Flat; + buttonRB.ForeColor = SystemColors.ControlText; + buttonRB.ImageAlign = ContentAlignment.MiddleRight; + buttonRB.Location = new Point(962, 7); + buttonRB.Margin = new Padding(4); + buttonRB.Name = "buttonRB"; + buttonRB.Secondary = true; + buttonRB.Size = new Size(147, 55); + buttonRB.TabIndex = 20; + buttonRB.Text = "RBumper"; + buttonRB.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonRB.UseVisualStyleBackColor = false; + // + // buttonB + // + buttonB.Activated = false; + buttonB.BackColor = SystemColors.ControlLight; + buttonB.BorderColor = Color.Transparent; + buttonB.BorderRadius = 5; + buttonB.FlatAppearance.BorderSize = 0; + buttonB.FlatStyle = FlatStyle.Flat; + buttonB.ForeColor = SystemColors.ControlText; + buttonB.ImageAlign = ContentAlignment.MiddleRight; + buttonB.Location = new Point(962, 322); + buttonB.Margin = new Padding(4); + buttonB.Name = "buttonB"; + buttonB.Secondary = true; + buttonB.Size = new Size(147, 55); + buttonB.TabIndex = 19; + buttonB.Text = "B"; + buttonB.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonB.UseVisualStyleBackColor = false; + // + // buttonA + // + buttonA.Activated = false; + buttonA.BackColor = SystemColors.ControlLight; + buttonA.BorderColor = Color.Transparent; + buttonA.BorderRadius = 5; + buttonA.FlatAppearance.BorderSize = 0; + buttonA.FlatStyle = FlatStyle.Flat; + buttonA.ForeColor = SystemColors.ControlText; + buttonA.ImageAlign = ContentAlignment.MiddleRight; + buttonA.Location = new Point(962, 259); + buttonA.Margin = new Padding(4); + buttonA.Name = "buttonA"; + buttonA.Secondary = true; + buttonA.Size = new Size(147, 55); + buttonA.TabIndex = 18; + buttonA.Text = "A"; + buttonA.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonA.UseVisualStyleBackColor = false; + // + // buttonY + // + buttonY.Activated = false; + buttonY.BackColor = SystemColors.ControlLight; + buttonY.BorderColor = Color.Transparent; + buttonY.BorderRadius = 5; + buttonY.FlatAppearance.BorderSize = 0; + buttonY.FlatStyle = FlatStyle.Flat; + buttonY.ForeColor = SystemColors.ControlText; + buttonY.ImageAlign = ContentAlignment.MiddleRight; + buttonY.Location = new Point(962, 196); + buttonY.Margin = new Padding(4); + buttonY.Name = "buttonY"; + buttonY.Secondary = true; + buttonY.Size = new Size(147, 55); + buttonY.TabIndex = 17; + buttonY.Text = "Y"; + buttonY.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonY.UseVisualStyleBackColor = false; + // + // buttonX + // + buttonX.Activated = false; + buttonX.BackColor = SystemColors.ControlLight; + buttonX.BorderColor = Color.Transparent; + buttonX.BorderRadius = 5; + buttonX.FlatAppearance.BorderSize = 0; + buttonX.FlatStyle = FlatStyle.Flat; + buttonX.ForeColor = SystemColors.ControlText; + buttonX.ImageAlign = ContentAlignment.MiddleRight; + buttonX.Location = new Point(962, 133); + buttonX.Margin = new Padding(4); + buttonX.Name = "buttonX"; + buttonX.Secondary = true; + buttonX.Size = new Size(147, 55); + buttonX.TabIndex = 16; + buttonX.Text = "X"; + buttonX.TextImageRelation = TextImageRelation.ImageBeforeText; + buttonX.UseVisualStyleBackColor = false; + // + // pictureAlly + // + pictureAlly.BackgroundImage = Properties.Resources.ally; + pictureAlly.BackgroundImageLayout = ImageLayout.Zoom; + pictureAlly.Location = new Point(185, 79); + pictureAlly.Name = "pictureAlly"; + pictureAlly.Size = new Size(767, 354); + pictureAlly.TabIndex = 0; + pictureAlly.TabStop = false; + // + // panelBinding + // + panelBinding.Controls.Add(labelBinding); + panelBinding.Controls.Add(labelSecondary); + panelBinding.Controls.Add(labelPrimary); + panelBinding.Controls.Add(comboSecondary); + panelBinding.Controls.Add(comboPrimary); + panelBinding.Location = new Point(372, 156); + panelBinding.Name = "panelBinding"; + panelBinding.Size = new Size(400, 186); + panelBinding.TabIndex = 37; + panelBinding.Visible = false; + // + // labelBinding + // + labelBinding.AutoSize = true; + labelBinding.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); + labelBinding.Location = new Point(2, 11); + labelBinding.Name = "labelBinding"; + labelBinding.Size = new Size(183, 32); + labelBinding.TabIndex = 31; + labelBinding.Text = "Binding: Menu"; // // labelSecondary // labelSecondary.AutoSize = true; - labelSecondary.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); - labelSecondary.Location = new Point(423, 5); - labelSecondary.Margin = new Padding(4, 0, 4, 0); + labelSecondary.Location = new Point(2, 122); labelSecondary.Name = "labelSecondary"; - labelSecondary.Padding = new Padding(5); - labelSecondary.Size = new Size(144, 42); - labelSecondary.TabIndex = 42; + labelSecondary.Size = new Size(125, 32); + labelSecondary.TabIndex = 30; labelSecondary.Text = "Secondary"; // - // panelBindingsTitle + // labelPrimary // - panelBindingsTitle.AutoSize = true; - panelBindingsTitle.AutoSizeMode = AutoSizeMode.GrowAndShrink; - panelBindingsTitle.Controls.Add(pictureBindings); - panelBindingsTitle.Controls.Add(labelBindings); - panelBindingsTitle.Dock = DockStyle.Top; - panelBindingsTitle.Location = new Point(0, 0); - panelBindingsTitle.Margin = new Padding(4); - panelBindingsTitle.Name = "panelBindingsTitle"; - panelBindingsTitle.Size = new Size(700, 60); - panelBindingsTitle.TabIndex = 44; + labelPrimary.AutoSize = true; + labelPrimary.Location = new Point(2, 63); + labelPrimary.Name = "labelPrimary"; + labelPrimary.Size = new Size(94, 32); + labelPrimary.TabIndex = 29; + labelPrimary.Text = "Primary"; // - // pictureBindings + // comboSecondary // - pictureBindings.BackgroundImage = Properties.Resources.icons8_next_32; - pictureBindings.BackgroundImageLayout = ImageLayout.Zoom; - pictureBindings.ErrorImage = null; - pictureBindings.InitialImage = null; - pictureBindings.Location = new Point(10, 18); - pictureBindings.Margin = new Padding(4, 2, 4, 10); - pictureBindings.Name = "pictureBindings"; - pictureBindings.Size = new Size(32, 32); - pictureBindings.TabIndex = 41; - pictureBindings.TabStop = false; + comboSecondary.BorderColor = Color.White; + comboSecondary.ButtonColor = Color.FromArgb(255, 255, 255); + comboSecondary.FlatStyle = FlatStyle.Flat; + comboSecondary.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); + comboSecondary.FormattingEnabled = true; + comboSecondary.ItemHeight = 32; + comboSecondary.Location = new Point(133, 121); + comboSecondary.Margin = new Padding(4, 11, 4, 8); + comboSecondary.Name = "comboSecondary"; + comboSecondary.Size = new Size(254, 40); + comboSecondary.TabIndex = 28; // - // labelBindings + // comboPrimary // - labelBindings.AutoSize = true; - labelBindings.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); - labelBindings.Location = new Point(45, 17); - labelBindings.Margin = new Padding(4, 0, 4, 0); - labelBindings.Name = "labelBindings"; - labelBindings.Size = new Size(114, 32); - labelBindings.TabIndex = 40; - labelBindings.Text = "Bindings"; + comboPrimary.BorderColor = Color.White; + comboPrimary.ButtonColor = Color.FromArgb(255, 255, 255); + comboPrimary.FlatStyle = FlatStyle.Flat; + comboPrimary.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); + comboPrimary.FormattingEnabled = true; + comboPrimary.ItemHeight = 32; + comboPrimary.Location = new Point(133, 60); + comboPrimary.Margin = new Padding(4, 11, 4, 8); + comboPrimary.Name = "comboPrimary"; + comboPrimary.Size = new Size(254, 40); + comboPrimary.TabIndex = 27; // // Handheld // AutoScaleDimensions = new SizeF(13F, 32F); AutoScaleMode = AutoScaleMode.Font; AutoSize = true; - ClientSize = new Size(1286, 932); + ClientSize = new Size(1150, 888); Controls.Add(panelBindings); - Controls.Add(panelController); + Controls.Add(panelDeadzones); MaximizeBox = false; MinimizeBox = false; Name = "Handheld"; @@ -659,90 +1028,103 @@ 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(); + panelDeadzones.ResumeLayout(false); + panelDeadzones.PerformLayout(); + panelRight.ResumeLayout(false); + panelRight.PerformLayout(); panelRT.ResumeLayout(false); panelRT.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox4).EndInit(); ((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)pictureBox1).EndInit(); ((System.ComponentModel.ISupportInitialize)trackRSMax).EndInit(); ((System.ComponentModel.ISupportInitialize)trackRSMin).EndInit(); + panelLeft.ResumeLayout(false); + panelLeft.PerformLayout(); + panelVibra.ResumeLayout(false); + panelVibra.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox5).EndInit(); + ((System.ComponentModel.ISupportInitialize)trackVibra).EndInit(); + panelLT.ResumeLayout(false); + panelLT.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox2).EndInit(); + ((System.ComponentModel.ISupportInitialize)trackLTMax).EndInit(); + ((System.ComponentModel.ISupportInitialize)trackLTMin).EndInit(); panelLS.ResumeLayout(false); panelLS.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox3).EndInit(); ((System.ComponentModel.ISupportInitialize)trackLSMax).EndInit(); ((System.ComponentModel.ISupportInitialize)trackLSMin).EndInit(); - panelSDeadzone.ResumeLayout(false); - panelSDeadzone.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)pictureSDeadzone).EndInit(); panelBindings.ResumeLayout(false); - panelBindings.PerformLayout(); - tableBindings.ResumeLayout(false); - tableBindings.PerformLayout(); - panelBindingsTitle.ResumeLayout(false); - panelBindingsTitle.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)pictureBindings).EndInit(); + ((System.ComponentModel.ISupportInitialize)pictureAlly).EndInit(); + panelBinding.ResumeLayout(false); + panelBinding.PerformLayout(); 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 panelDeadzones; + private Panel panelRight; private Panel panelRT; + private PictureBox pictureBox4; private TrackBar trackRTMax; private Label labelRT; private TrackBar trackRTMin; private Label labelRTTitle; + private Panel panelRS; + private PictureBox pictureBox1; + private TrackBar trackRSMax; + private Label labelRS; + private TrackBar trackRSMin; + private Label labelRSTitle; + private Panel panelLeft; + private Panel panelVibra; + private PictureBox pictureBox5; + private Label labelVibra; + private Label labelVibraTitle; + private TrackBar trackVibra; private Panel panelLT; + private PictureBox pictureBox2; 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; + private Panel panelLS; + private PictureBox pictureBox3; + private TrackBar trackLSMax; + private Label labelLS; + private TrackBar trackLSMin; + private Label labelLSTitle; private Panel panelBindings; - private Panel panelBindingsTitle; - private PictureBox pictureBindings; - private Label labelBindings; - private TableLayoutPanel tableBindings; - private Label labelPrimary; + private PictureBox pictureAlly; + private UI.RButton buttonX; + private UI.RButton buttonRS; + private UI.RButton buttonMenu; + private UI.RButton buttonRT; + private UI.RButton buttonRB; + private UI.RButton buttonB; + private UI.RButton buttonA; + private UI.RButton buttonY; + private UI.RButton buttonM1; + private UI.RButton buttonM2; + private UI.RButton buttonLS; + private UI.RButton buttonLT; + private UI.RButton buttonLB; + private UI.RButton buttonDPR; + private UI.RButton buttonDPL; + private UI.RButton buttonDPD; + private UI.RButton buttonDPU; + private UI.RButton buttonView; + private UI.RButton buttonReset; + private Panel panelBinding; + private Label labelBinding; private Label labelSecondary; + private Label labelPrimary; + private UI.RComboBox comboSecondary; + private UI.RComboBox comboPrimary; } } \ No newline at end of file diff --git a/app/Handheld.cs b/app/Handheld.cs index e8619ad3..17ce2cb5 100644 --- a/app/Handheld.cs +++ b/app/Handheld.cs @@ -6,6 +6,9 @@ namespace GHelper public partial class Handheld : RForm { + static string activeBinding = ""; + static RButton? activeButton; + public Handheld() { InitializeComponent(); @@ -41,80 +44,120 @@ namespace GHelper trackVibra.ValueChanged += Controller_Complete; - FillBinding("m1", "M1"); - FillBinding("m2", "M2"); + ButtonBinding("m1", "M1", buttonM1); + ButtonBinding("m2", "M2", buttonM2); - FillBinding("a", "A"); - FillBinding("b", "B"); - FillBinding("x", "X"); - FillBinding("y", "Y"); + ButtonBinding("a", "A", buttonA); + ButtonBinding("b", "B", buttonB); + ButtonBinding("x", "X", buttonX); + ButtonBinding("y", "Y", buttonY); - FillBinding("du", "DPadUp"); - FillBinding("dd", "DPadDown"); + ButtonBinding("du", "DPad Up", buttonDPU); + ButtonBinding("dd", "DPad Down", buttonDPD); - FillBinding("dl", "DPadLeft"); - FillBinding("dr", "DPadRight"); + ButtonBinding("dl", "DPad Left", buttonDPL); + ButtonBinding("dr", "DPad Right", buttonDPR); - FillBinding("rb", "RBumper"); - FillBinding("lb", "LBumper"); + ButtonBinding("rt", "Right Trigger", buttonRT); + ButtonBinding("lt", "Left Trigger", buttonLT); - FillBinding("rs", "RStick"); - FillBinding("ll", "LStick"); + ButtonBinding("rb", "Right Bumper", buttonRB); + ButtonBinding("lb", "Left Bumper", buttonLB); + + ButtonBinding("rs", "Right Stick", buttonRS); + ButtonBinding("ll", "Left Stick", buttonLS); + + ButtonBinding("vb", "View", buttonView); + ButtonBinding("mb", "Menu", buttonMenu); + + ComboBinding(comboPrimary); + ComboBinding(comboSecondary); - FillBinding("vb", "View"); - FillBinding("mb", "Menu"); } - private RComboBox ComboBinding(string name, string value) + private void ComboBinding(RComboBox combo) { - var combo = new RComboBox(); - combo.BorderColor = Color.White; - combo.ButtonColor = Color.FromArgb(255, 255, 255); - combo.Dock = DockStyle.Fill; - combo.Name = name; - combo.Margin = new Padding(5, 5, 5, 5); combo.DropDownStyle = ComboBoxStyle.DropDownList; combo.DisplayMember = "Value"; combo.ValueMember = "Key"; foreach (var item in AllyControl.BindCodes) - { combo.Items.Add(new KeyValuePair(item.Key, item.Value)); - if (item.Key == value) combo.SelectedItem = item; - } + combo.SelectedValueChanged += Binding_SelectedValueChanged; - return combo; - - } - - - private void FillBinding(string binding, string label) - { - tableBindings.RowStyles.Add(new RowStyle(SizeType.AutoSize)); - tableBindings.Controls.Add(new Label { Text = label, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 0, tableBindings.RowCount); - - tableBindings.Controls.Add(ComboBinding("bind_" + binding, AppConfig.GetString("bind_" + binding, "")), 1, tableBindings.RowCount); - tableBindings.Controls.Add(ComboBinding("bind2_" + binding, AppConfig.GetString("bind2_" + binding, "")), 2, tableBindings.RowCount); - - tableBindings.RowCount++; - } private void Binding_SelectedValueChanged(object? sender, EventArgs e) { - if (sender is null) return; RComboBox combo = (RComboBox)sender; string value = ((KeyValuePair)combo.SelectedItem).Key; + string binding = "bind" + (combo.Name == "comboPrimary" ? "" : "2") + "_" + activeBinding; - if (value != "") AppConfig.Set(combo.Name, value); - else AppConfig.Remove(combo.Name); + if (value != "") AppConfig.Set(binding, value); + else AppConfig.Remove(binding); + + VisualiseButton(activeButton, activeBinding); AllyControl.ApplyMode(); } + private void SetComboValue(RComboBox combo, string value) + { + foreach (var item in AllyControl.BindCodes) + if (item.Key == value) + { + combo.SelectedItem = item; + return; + } + + combo.SelectedIndex = 0; + } + + private void VisualiseButton(RButton button, string binding) + { + if (button == null) return; + + string primary = AppConfig.GetString("bind_" + binding, ""); + string secondary = AppConfig.GetString("bind2_" + binding, ""); + + if (primary != "" || secondary != "") + { + button.BorderColor = colorStandard; + button.Activated = true; + } + else + { + button.Activated = false; + } + } + + private void ButtonBinding(string binding, string label, RButton button) + { + button.Click += (sender, EventArgs) => { buttonBinding_Click(sender, EventArgs, binding, label); }; + VisualiseButton(button, binding); + } + + void buttonBinding_Click(object sender, EventArgs e, string binding, string label) + { + + if (sender is null) return; + RButton button = (RButton)sender; + + labelBinding.Text = "Binding: " + label; + activeBinding = binding; + + SetComboValue(comboPrimary, AppConfig.GetString("bind_" + binding, "")); + SetComboValue(comboSecondary, AppConfig.GetString("bind2_" + binding, "")); + + panelBinding.Visible = true; + activeButton = button; + } + + + private void Controller_Complete(object? sender, EventArgs e) { AllyControl.SetDeadzones(); diff --git a/app/Mode/ModeControl.cs b/app/Mode/ModeControl.cs index c7406ed9..cb43f672 100644 --- a/app/Mode/ModeControl.cs +++ b/app/Mode/ModeControl.cs @@ -415,6 +415,8 @@ namespace GHelper.Mode return; } + if (!RyzenControl.IsRingExsists()) return; + try { SetUV(AppConfig.GetMode("cpu_uv", 0)); diff --git a/app/Properties/Resources.Designer.cs b/app/Properties/Resources.Designer.cs index 9d5597ff..c07f6574 100644 --- a/app/Properties/Resources.Designer.cs +++ b/app/Properties/Resources.Designer.cs @@ -60,6 +60,16 @@ namespace GHelper.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ally { + get { + object obj = ResourceManager.GetObject("ally", 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 750793a1..245016f9 100644 --- a/app/Properties/Resources.resx +++ b/app/Properties/Resources.resx @@ -130,6 +130,9 @@ ..\Resources\icons8-microphone-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icons8-controls-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\icons8-maus-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -319,7 +322,7 @@ ..\Resources\icons8-charging-battery-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icons8-controls-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ally.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/ally.png b/app/Resources/ally.png new file mode 100644 index 00000000..f1f7ba82 Binary files /dev/null and b/app/Resources/ally.png differ