From f7883ec543afe73c2e1d02b88cb63c3988847a57 Mon Sep 17 00:00:00 2001 From: jays2kings Date: Sat, 31 May 2014 00:37:02 -0400 Subject: [PATCH] Version 9.111 Bug fix when changing profiles with touchpad Version 9.11 Bug fix for checking updates in Help Version 9.1 Setting to adjust when battery flash begins Import profiles moved to profiles toolbar You can now export Profiles Tool can get even smaller now, as checkboxes and start/stop button are on same line Log clear button moved to log tab UI fixes in About Use Enter or escape to save or cancel profiles respectively in options or when duplicating profile Use Enter, Delete or Ctrl+C in the profile list to edit, delete, or duplicate a profile respectively --- DS4Control/DS4LightBar.cs | 2 +- DS4Control/ScpUtil.cs | 19 + DS4Tool/DS4Tool.csproj | 3 + DS4Tool/Hotkeys.Designer.cs | 4 +- DS4Tool/Hotkeys.cs | 6 +- DS4Tool/MessageTextBox.Designer.cs | 2 + DS4Tool/Options.Designer.cs | 75 +- DS4Tool/Options.cs | 76 +- DS4Tool/Properties/Resources.resx | 6 + DS4Tool/Properties/Resources1.Designer.cs | 20 + DS4Tool/Resources/export.png | Bin 0 -> 3773 bytes DS4Tool/Resources/imageres_import.png | Bin 0 -> 3781 bytes DS4Tool/Resources/shell32_export.png | Bin 0 -> 3764 bytes DS4Tool/ScpForm.Designer.cs | 939 +++++++++++----------- DS4Tool/ScpForm.cs | 270 ++++--- DS4Tool/ScpForm.resx | 184 +++-- DS4Tool/WinProgs.cs | 10 +- 17 files changed, 869 insertions(+), 747 deletions(-) create mode 100644 DS4Tool/Resources/export.png create mode 100644 DS4Tool/Resources/imageres_import.png create mode 100644 DS4Tool/Resources/shell32_export.png diff --git a/DS4Control/DS4LightBar.cs b/DS4Control/DS4LightBar.cs index a685ea0..a8ad79c 100644 --- a/DS4Control/DS4LightBar.cs +++ b/DS4Control/DS4LightBar.cs @@ -94,7 +94,7 @@ namespace DS4Control }; if (haptics.IsLightBarSet()) { - if (Global.getFlashWhenLowBattery(deviceNum)) + if (device.Battery <= Global.getFlashAt(deviceNum)) { int level = device.Battery / 10; if (level >= 10) diff --git a/DS4Control/ScpUtil.cs b/DS4Control/ScpUtil.cs index 2a1cce5..5eb6a91 100644 --- a/DS4Control/ScpUtil.cs +++ b/DS4Control/ScpUtil.cs @@ -166,6 +166,17 @@ namespace DS4Control } + public static void setFlashAt(int device, int when) + { + m_Config.flashAt[device] = when; + + } + public static int getFlashAt(int device) + { + return m_Config.flashAt[device]; + + } + public static void setLedAsBatteryIndicator(int device, bool ledAsBattery) { m_Config.ledAsBattery[device] = ledAsBattery; @@ -487,6 +498,7 @@ namespace DS4Control public bool[] doubleTap = { false, false, false, false, false }; public int[] scrollSensitivity = { 0, 0, 0, 0, 0 }; public double[] rainbow = { 0, 0, 0, 0, 0 }; + public int[] flashAt = { 30, 30, 30, 30, 30 }; public Byte[][] m_LowLeds = new Byte[][] { new Byte[] {0,0,0}, @@ -582,6 +594,7 @@ namespace DS4Control XmlNode xmlRumbleBoost = m_Xdoc.CreateNode(XmlNodeType.Element, "RumbleBoost", null); xmlRumbleBoost.InnerText = m_Rumble[device].ToString(); Node.AppendChild(xmlRumbleBoost); XmlNode xmlLedAsBatteryIndicator = m_Xdoc.CreateNode(XmlNodeType.Element, "ledAsBatteryIndicator", null); xmlLedAsBatteryIndicator.InnerText = ledAsBattery[device].ToString(); Node.AppendChild(xmlLedAsBatteryIndicator); XmlNode xmlLowBatteryFlash = m_Xdoc.CreateNode(XmlNodeType.Element, "lowBatteryFlash", null); xmlLowBatteryFlash.InnerText = flashLedLowBattery[device].ToString(); Node.AppendChild(xmlLowBatteryFlash); + XmlNode xmlFlashBatterAt = m_Xdoc.CreateNode(XmlNodeType.Element, "flashBatteryAt", null); xmlFlashBatterAt.InnerText = flashAt[device].ToString(); Node.AppendChild(xmlFlashBatterAt); XmlNode xmlTouchSensitivity = m_Xdoc.CreateNode(XmlNodeType.Element, "touchSensitivity", null); xmlTouchSensitivity.InnerText = touchSensitivity[device].ToString(); Node.AppendChild(xmlTouchSensitivity); XmlNode xmlLowRed = m_Xdoc.CreateNode(XmlNodeType.Element, "LowRed", null); xmlLowRed.InnerText = m_LowLeds[device][0].ToString(); Node.AppendChild(xmlLowRed); XmlNode xmlLowGreen = m_Xdoc.CreateNode(XmlNodeType.Element, "LowGreen", null); xmlLowGreen.InnerText = m_LowLeds[device][1].ToString(); Node.AppendChild(xmlLowGreen); @@ -795,6 +808,9 @@ namespace DS4Control try { Item = m_Xdoc.SelectSingleNode("/ScpControl/lowBatteryFlash"); Boolean.TryParse(Item.InnerText, out flashLedLowBattery[device]); } catch { missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/flashBatteryAt"); Int32.TryParse(Item.InnerText, out flashAt[device]); } + catch { missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/touchSensitivity"); Byte.TryParse(Item.InnerText, out touchSensitivity[device]); } catch { missingSetting = true; } @@ -966,6 +982,9 @@ namespace DS4Control try { Item = m_Xdoc.SelectSingleNode("/ScpControl/lowBatteryFlash"); Boolean.TryParse(Item.InnerText, out flashLedLowBattery[device]); } catch { missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/flashBatteryAt"); Int32.TryParse(Item.InnerText, out flashAt[device]); } + catch { missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/touchSensitivity"); Byte.TryParse(Item.InnerText, out touchSensitivity[device]); } catch { missingSetting = true; } diff --git a/DS4Tool/DS4Tool.csproj b/DS4Tool/DS4Tool.csproj index 3668b6a..6faa3c2 100644 --- a/DS4Tool/DS4Tool.csproj +++ b/DS4Tool/DS4Tool.csproj @@ -198,6 +198,7 @@ + @@ -222,6 +223,8 @@ + + diff --git a/DS4Tool/Hotkeys.Designer.cs b/DS4Tool/Hotkeys.Designer.cs index 1fa8734..dc9e1a3 100644 --- a/DS4Tool/Hotkeys.Designer.cs +++ b/DS4Tool/Hotkeys.Designer.cs @@ -479,7 +479,7 @@ // label23 // this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(451, 9); + this.label23.Location = new System.Drawing.Point(458, 9); this.label23.Name = "label23"; this.label23.Size = new System.Drawing.Size(58, 13); this.label23.TabIndex = 3; @@ -489,7 +489,7 @@ // this.lLBUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.lLBUpdate.AutoSize = true; - this.lLBUpdate.Location = new System.Drawing.Point(-2, 9); + this.lLBUpdate.Location = new System.Drawing.Point(6, 9); this.lLBUpdate.Name = "lLBUpdate"; this.lLBUpdate.Size = new System.Drawing.Size(96, 13); this.lLBUpdate.TabIndex = 48; diff --git a/DS4Tool/Hotkeys.cs b/DS4Tool/Hotkeys.cs index f1a1635..1af717a 100644 --- a/DS4Tool/Hotkeys.cs +++ b/DS4Tool/Hotkeys.cs @@ -14,8 +14,10 @@ namespace ScpServer { public partial class Hotkeys : Form { - public Hotkeys() + ScpForm form; + public Hotkeys(ScpForm main) { + form = main; InitializeComponent(); lbAbout.Text += Global.getVersion().ToString() + ")"; ToolTip tt = new ToolTip(); @@ -86,7 +88,7 @@ namespace ScpServer wc2.DownloadFile(url2, "Updater.exe"); } System.Diagnostics.Process.Start("Updater.exe"); - this.Close(); + form.Close(); } else File.Delete(Global.appdatapath + "\\version.txt"); diff --git a/DS4Tool/MessageTextBox.Designer.cs b/DS4Tool/MessageTextBox.Designer.cs index b465cfb..bf6d8ef 100644 --- a/DS4Tool/MessageTextBox.Designer.cs +++ b/DS4Tool/MessageTextBox.Designer.cs @@ -61,6 +61,7 @@ // button2 // this.button2.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.button2.Location = new System.Drawing.Point(276, 5); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 23); @@ -75,6 +76,7 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(242)))), ((int)(((byte)(242))))); + this.CancelButton = this.button2; this.ClientSize = new System.Drawing.Size(359, 35); this.Controls.Add(this.button2); this.Controls.Add(this.tBProfile); diff --git a/DS4Tool/Options.Designer.cs b/DS4Tool/Options.Designer.cs index 3a82e4e..9cc2ffd 100644 --- a/DS4Tool/Options.Designer.cs +++ b/DS4Tool/Options.Designer.cs @@ -140,6 +140,9 @@ this.gBRumble = new System.Windows.Forms.GroupBox(); this.gBDeadzone = new System.Windows.Forms.GroupBox(); this.btnCancel = new System.Windows.Forms.Button(); + this.nUDflashLED = new System.Windows.Forms.NumericUpDown(); + this.lBFlashAt = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); this.advColorDialog = new ScpServer.AdvancedColorDialog(); this.MainPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pBController)).BeginInit(); @@ -180,6 +183,7 @@ this.gBLightbar.SuspendLayout(); this.gBRumble.SuspendLayout(); this.gBDeadzone.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDflashLED)).BeginInit(); this.SuspendLayout(); // // bnTouchUpper @@ -445,6 +449,7 @@ this.bnUp.BackColor = System.Drawing.Color.Transparent; this.bnUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.bnUp.Cursor = System.Windows.Forms.Cursors.Default; + this.bnUp.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.bnUp.FlatAppearance.BorderColor = System.Drawing.Color.Red; this.bnUp.FlatAppearance.BorderSize = 0; this.bnUp.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control; @@ -944,22 +949,21 @@ // // numUDRainbow // - this.numUDRainbow.Location = new System.Drawing.Point(160, 15); + this.numUDRainbow.Location = new System.Drawing.Point(180, 16); this.numUDRainbow.Maximum = new decimal(new int[] { 60, 0, 0, 0}); this.numUDRainbow.Name = "numUDRainbow"; - this.numUDRainbow.Size = new System.Drawing.Size(51, 20); + this.numUDRainbow.Size = new System.Drawing.Size(39, 20); this.numUDRainbow.TabIndex = 167; - this.numUDRainbow.Visible = false; this.numUDRainbow.ValueChanged += new System.EventHandler(this.numUDRainbow_ValueChanged); // // pBRainbow // this.pBRainbow.Image = global::ScpServer.Properties.Resources.rainbow; - this.pBRainbow.Location = new System.Drawing.Point(216, 17); + this.pBRainbow.Location = new System.Drawing.Point(161, 18); this.pBRainbow.Name = "pBRainbow"; this.pBRainbow.Size = new System.Drawing.Size(16, 16); this.pBRainbow.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; @@ -970,13 +974,14 @@ // flashLed // this.flashLed.AutoSize = true; - this.flashLed.Location = new System.Drawing.Point(8, 17); + this.flashLed.Location = new System.Drawing.Point(433, 103); this.flashLed.Name = "flashLed"; this.flashLed.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.flashLed.Size = new System.Drawing.Size(116, 17); + this.flashLed.Size = new System.Drawing.Size(103, 17); this.flashLed.TabIndex = 163; - this.flashLed.Text = "Battery Level Flash"; + this.flashLed.Text = "Flash when Low"; this.flashLed.UseVisualStyleBackColor = true; + this.flashLed.Visible = false; this.flashLed.CheckedChanged += new System.EventHandler(this.flashWhenLowBattery_CheckedChanged); // // blueBar @@ -1059,12 +1064,11 @@ // lBspc // this.lBspc.AutoSize = true; - this.lBspc.Location = new System.Drawing.Point(213, 18); + this.lBspc.Location = new System.Drawing.Point(225, 18); this.lBspc.Name = "lBspc"; - this.lBspc.Size = new System.Drawing.Size(93, 13); + this.lBspc.Size = new System.Drawing.Size(59, 13); this.lBspc.TabIndex = 157; - this.lBspc.Text = "seconds per cycle"; - this.lBspc.Visible = false; + this.lBspc.Text = "secs/cycle"; // // lBRed // @@ -1235,7 +1239,6 @@ this.lBL2.Size = new System.Drawing.Size(19, 13); this.lBL2.TabIndex = 196; this.lBL2.Text = "L2"; - this.lBL2.Click += new System.EventHandler(this.lBL2_Click); // // lBR2 // @@ -1245,7 +1248,6 @@ this.lBR2.Size = new System.Drawing.Size(21, 13); this.lBR2.TabIndex = 197; this.lBR2.Text = "R2"; - this.lBR2.Click += new System.EventHandler(this.lBR2_Click); // // lBControllerOff // @@ -1681,7 +1683,6 @@ this.lbRS.Size = new System.Drawing.Size(22, 13); this.lbRS.TabIndex = 197; this.lbRS.Text = "RS"; - this.lbRS.Click += new System.EventHandler(this.lbRS_Click); // // lbLS // @@ -1691,7 +1692,6 @@ this.lbLS.Size = new System.Drawing.Size(20, 13); this.lbLS.TabIndex = 196; this.lbLS.Text = "LS"; - this.lbLS.Click += new System.EventHandler(this.lbLS_Click); // // numUDRS // @@ -1843,9 +1843,11 @@ // // gBLightbar // + this.gBLightbar.Controls.Add(this.label1); + this.gBLightbar.Controls.Add(this.lBFlashAt); this.gBLightbar.Controls.Add(this.pBRainbow); - this.gBLightbar.Controls.Add(this.flashLed); this.gBLightbar.Controls.Add(this.lowBatteryPanel); + this.gBLightbar.Controls.Add(this.nUDflashLED); this.gBLightbar.Controls.Add(this.numUDRainbow); this.gBLightbar.Controls.Add(this.FullPanel); this.gBLightbar.Controls.Add(this.lBspc); @@ -1892,6 +1894,7 @@ // // btnCancel // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.Location = new System.Drawing.Point(352, 7); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(75, 23); @@ -1900,6 +1903,37 @@ this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // + // nUDflashLED + // + this.nUDflashLED.Increment = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.nUDflashLED.Location = new System.Drawing.Point(60, 16); + this.nUDflashLED.Name = "nUDflashLED"; + this.nUDflashLED.Size = new System.Drawing.Size(43, 20); + this.nUDflashLED.TabIndex = 167; + this.nUDflashLED.ValueChanged += new System.EventHandler(this.nUDflashLED_ValueChanged); + // + // lBFlashAt + // + this.lBFlashAt.AutoSize = true; + this.lBFlashAt.Location = new System.Drawing.Point(15, 18); + this.lBFlashAt.Name = "lBFlashAt"; + this.lBFlashAt.Size = new System.Drawing.Size(44, 13); + this.lBFlashAt.TabIndex = 207; + this.lBFlashAt.Text = "Flash at"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(104, 18); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(15, 13); + this.label1.TabIndex = 207; + this.label1.Text = "%"; + // // advColorDialog // this.advColorDialog.AnyColor = true; @@ -1911,8 +1945,10 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(889, 297); + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(888, 297); this.Controls.Add(this.btnCancel); + this.Controls.Add(this.flashLed); this.Controls.Add(this.gBDeadzone); this.Controls.Add(this.gBRumble); this.Controls.Add(this.gBLightbar); @@ -1934,7 +1970,6 @@ this.Name = "Options"; this.Text = "Options"; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Options_Closed); - this.Load += new System.EventHandler(this.Options_Load); this.MainPanel.ResumeLayout(false); this.MainPanel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pBController)).EndInit(); @@ -1984,6 +2019,7 @@ this.gBRumble.PerformLayout(); this.gBDeadzone.ResumeLayout(false); this.gBDeadzone.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDflashLED)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -2106,6 +2142,9 @@ private System.Windows.Forms.CheckBox cBControllerInput; private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.NumericUpDown nUDSixaxis; + private System.Windows.Forms.NumericUpDown nUDflashLED; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label lBFlashAt; } }  \ No newline at end of file diff --git a/DS4Tool/Options.cs b/DS4Tool/Options.cs index 928f49a..a1ba52f 100644 --- a/DS4Tool/Options.cs +++ b/DS4Tool/Options.cs @@ -43,7 +43,8 @@ namespace ScpServer greenBar.Value = color.green; blueBar.Value = color.blue; - batteryLed.Checked = DS4Control.Global.getLedAsBatteryIndicator(device); + batteryLed.Checked = Global.getLedAsBatteryIndicator(device); + nUDflashLED.Value = Global.getFlashAt(device); lowBatteryPanel.Visible = batteryLed.Checked; lbFull.Text = (batteryLed.Checked ? "Full:" : "Color:"); FullPanel.Location = (batteryLed.Checked ? new Point(FullPanel.Location.X, 42) : new Point(FullPanel.Location.X, 48)); @@ -53,8 +54,8 @@ namespace ScpServer lowGreenBar.Value = lowColor.green; lowBlueBar.Value = lowColor.blue; - rumbleBoostBar.Value = DS4Control.Global.loadRumbleBoost(device); - flashLed.Checked = DS4Control.Global.getFlashWhenLowBattery(device); + rumbleBoostBar.Value = Global.loadRumbleBoost(device); + flashLed.Checked = Global.getFlashWhenLowBattery(device); numUDTouch.Value = Global.getTouchSensitivity(device); cBSlide.Checked = Global.getTouchSensitivity(device) > 0; numUDScroll.Value = Global.getScrollSensitivity(device); @@ -246,6 +247,7 @@ namespace ScpServer Global.setRSDeadzone(device, (byte)Math.Round((numUDRS.Value * 127), 0)); Global.setLSDeadzone(device, (byte)Math.Round((numUDLS.Value * 127), 0)); Global.setButtonMouseSensitivity(device, (int)numUDMouseSens.Value); + Global.setFlashAt(device, (int)nUDflashLED.Value); if (numUDRainbow.Value == 0) pBRainbow.Image = greyscale; else pBRainbow.Image = colored; } @@ -362,12 +364,12 @@ namespace ScpServer Global.saveLowColor(device, color.R, color.G, color.B); } } - + int bgc = 255; //Color of the form background, If greyscale color private void redBar_ValueChanged(object sender, EventArgs e) { int value = ((TrackBar)sender).Value; - int sat = 255 - (value < 255 ? value : 255); - int som = 255 + 11 * (int)(value * 0.0039215); + int sat = bgc - (value < bgc ? value : bgc); + int som = bgc + 11 * (int)(value * 0.0039215); ((TrackBar)sender).BackColor = Color.FromArgb(som, sat, sat); alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value)); reg = Color.FromArgb(redBar.Value, greenBar.Value, blueBar.Value); @@ -379,8 +381,8 @@ namespace ScpServer private void greenBar_ValueChanged(object sender, EventArgs e) { int value = ((TrackBar)sender).Value; - int sat = 255 - (value < 255 ? value : 255); - int som = 255 + 11 * (int)(value * 0.0039215); + int sat = bgc - (value < bgc ? value : bgc); + int som = bgc + 11 * (int)(value * 0.0039215); ((TrackBar)sender).BackColor = Color.FromArgb(sat, som, sat); alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value)); reg = Color.FromArgb(redBar.Value, greenBar.Value, blueBar.Value); @@ -392,8 +394,8 @@ namespace ScpServer private void blueBar_ValueChanged(object sender, EventArgs e) { int value = ((TrackBar)sender).Value; - int sat = 255 - (value < 255 ? value : 255); - int som = 255 + 11 * (int)(value * 0.0039215); + int sat = bgc - (value < bgc ? value : bgc); + int som = bgc + 11 * (int)(value * 0.0039215); ((TrackBar)sender).BackColor = Color.FromArgb(sat, sat, som); alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value)); reg = Color.FromArgb(redBar.Value, greenBar.Value, blueBar.Value); @@ -406,8 +408,8 @@ namespace ScpServer private void lowRedBar_ValueChanged(object sender, EventArgs e) { int value = ((TrackBar)sender).Value; - int sat = 255 - (value < 255 ? value : 255); - int som = 255 + 11 * (int)(value * 0.0039215); + int sat = bgc - (value < bgc ? value : bgc); + int som = bgc + 11 * (int)(value * 0.0039215); ((TrackBar)sender).BackColor = Color.FromArgb(som, sat, sat); alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value)); reg = Color.FromArgb(lowRedBar.Value, lowGreenBar.Value, lowBlueBar.Value); @@ -420,8 +422,8 @@ namespace ScpServer private void lowGreenBar_ValueChanged(object sender, EventArgs e) { int value = ((TrackBar)sender).Value; - int sat = 255 - (value < 255 ? value : 255); - int som = 255 + 11 * (int)(value * 0.0039215); + int sat = bgc - (value < bgc ? value : bgc); + int som = bgc + 11 * (int)(value * 0.0039215); ((TrackBar)sender).BackColor = Color.FromArgb(sat, som, sat); alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value)); reg = Color.FromArgb(lowRedBar.Value, lowGreenBar.Value, lowBlueBar.Value); @@ -434,8 +436,8 @@ namespace ScpServer private void lowBlueBar_ValueChanged(object sender, EventArgs e) { int value = ((TrackBar)sender).Value; - int sat = 255 - (value < 255 ? value : 255); - int som = 255 + 11 * (int)(value * 0.0039215); + int sat = bgc - (value < bgc ? value : bgc); + int som = bgc + 11 * (int)(value * 0.0039215); ((TrackBar)sender).BackColor = Color.FromArgb(sat, sat, som); alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value)); reg = Color.FromArgb(lowRedBar.Value, lowGreenBar.Value, lowBlueBar.Value); @@ -717,24 +719,23 @@ namespace ScpServer private void ToggleRainbow(bool on) { - numUDRainbow.Visible = on; + numUDRainbow.Enabled = on; if (on) { - pBRainbow.Location = new Point(216 - 78, pBRainbow.Location.Y); + //pBRainbow.Location = new Point(216 - 78, pBRainbow.Location.Y); pBController.BackgroundImage = Properties.Resources.rainbowC; batteryLed.Text = "Battery Level Dim"; } else { lowBatteryPanel.Enabled = batteryLed.Checked; - pBRainbow.Location = new Point(216, pBRainbow.Location.Y); + //pBRainbow.Location = new Point(216, pBRainbow.Location.Y); pBController.BackgroundImage = null; batteryLed.Text = "Battery Level Color"; } - lBspc.Visible = on; + lBspc.Enabled = on; lowBatteryPanel.Enabled = !on; FullPanel.Enabled = !on; - flashLed.Enabled = !on; } private Bitmap GreyscaleImage(Bitmap image) @@ -813,32 +814,6 @@ namespace ScpServer Global.setButtonMouseSensitivity(device, (int)numUDMouseSens.Value); } - private void lbLS_Click(object sender, EventArgs e) - { - - } - - private void lBL2_Click(object sender, EventArgs e) - { - - } - - private void lbRS_Click(object sender, EventArgs e) - { - - } - - private void lBR2_Click(object sender, EventArgs e) - { - - } - - private void Options_Load(object sender, EventArgs e) - { - - } - - private void LightBar_MouseDown(object sender, MouseEventArgs e) { tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0); @@ -853,5 +828,12 @@ namespace ScpServer { this.Close(); } + + private void nUDflashLED_ValueChanged(object sender, EventArgs e) + { + if (nUDflashLED.Value % 10 != 0) + nUDflashLED.Value = Math.Round(nUDflashLED.Value / 10, 0) * 10; + Global.setFlashAt(device, (int)nUDflashLED.Value); + } } } diff --git a/DS4Tool/Properties/Resources.resx b/DS4Tool/Properties/Resources.resx index 5878c30..3d38138 100644 --- a/DS4Tool/Properties/Resources.resx +++ b/DS4Tool/Properties/Resources.resx @@ -175,4 +175,10 @@ ..\Resources\USB.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\export.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\imageres_import.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/DS4Tool/Properties/Resources1.Designer.cs b/DS4Tool/Properties/Resources1.Designer.cs index 074e161..88a47d5 100644 --- a/DS4Tool/Properties/Resources1.Designer.cs +++ b/DS4Tool/Properties/Resources1.Designer.cs @@ -130,6 +130,26 @@ namespace ScpServer.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap export { + get { + object obj = ResourceManager.GetObject("export", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap import { + get { + object obj = ResourceManager.GetObject("import", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/DS4Tool/Resources/export.png b/DS4Tool/Resources/export.png new file mode 100644 index 0000000000000000000000000000000000000000..6104cfb0f226391e5c388c24e5f3ff2fd8f4e849 GIT binary patch literal 3773 zcmeHK=Tp-Q)BPd67pWp%nt+jB1*r+Wmmpm!LO{fTA|MDRB25sa*C0smO@pC^-g_rN zqzedKX#pvDxc|lb;oX_DXZFL+?4F&S*^M$a)}g1lMFRi;y`HY7`86~B2P)EQFCxZh zaZS|Tx;C!>fcEBpAOSM6I01mh!~+5`HFbyk!e6<=y?ON@5MJ+>a5s7g&arfp#lE%g&V%W?? z=|0lTQm*lRjSbC<{MdiK9F*rd-9*?Jy81q&x>QaCNI1N!&zR!=PYyn6DCTOVutWhRb@^%D~aT}a&PlEVB zg7uAmU_gan1=Is$!G(ajHVFciCS(ERkO7VZF3zifsTklW{BC0cK%h?3gGd0oBtABh zoOpourfZ}o;QkOOA9?gq3$T_1SltXd6@ghXKvK`jO&6%H2e89Tw6y>g9Uy5I8FmjK z3j!Q_1q1?s59t7__JNi1pZk?eo1kl@(rcA5f{I#5J1Q|BN-HbzJ0in+9QRq}oo+Z~ zsEfD1N#~MA$};{u90Y)zc(&_q4=)3T87hZ|UV0H#)5-)fr z_&fESG1ef~RWlZ!Sj~)>L+JwkC~(5PuDj#Jrz?2Tb5d2j98mpCl_V%$tk}VY^u$1z z$=VmYLI8k+MtIw#2o)*9J#=}*pSZ7fsgrXTK)C58_yE9TO+j&Jf1O$n6#!`FAVJj{ z+(&JkqF9RCZR87Wv=@%@AHag0?O-M_%~QnfmyY+!--AWMhpKr%juMmVJhE6b_wYn- z2Jv>w9}FtqjDMY|vfD(Okkn)vy;L`y_~s)?oIhF%#8Ppjhn@1Z>5{QT3-b0wvYPQ5 z#LMYQnSX@xTI%u~sJy(P7-6s75dW|jkbZv=-lQXygse4FnWXy;!4xap`k?)lcJ!&Q zR7MsB1sqrUcL26;C<;ncPyiRvCbgd1ojc0X>d2b8KGS5>hP?LTzYZvBEEH?Ni z)WCe!$>}UD6=AI_Dlp9wcT<8XC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/DS4Tool/Resources/shell32_export.png b/DS4Tool/Resources/shell32_export.png new file mode 100644 index 0000000000000000000000000000000000000000..4bb2c2f7bf4205bdf01c8c70a51e32be464d7d78 GIT binary patch literal 3764 zcmeHJ~z4I-V=u*=f5ut-a@gp{I`Ae}yhG`L7er^Lci(jc+0Ah~om zk970p`7eGiesku|J@aDDnYr`kM(Jv+kP$y21^|FeO;t(no+L@NoVi zg?CuA8Q#3T2#~oxJ6UX9W)BiJ4^qK9U+fq>*35r8{FNxwdUicd<+`5a?wVApiJ=Nf%H1cd) zJ_CTmCb#xK+=RG+4k1g!UUvubH!9g2K%l+aR}TPqqr}b+>#vdTB?JJa>>!>hMaJWH zdfqntr|l1C+exl1#X~{tT^%4w5V39G(|49H%7Q`M;X_qSJeC4~6qrQYpbp`Q?&SO( z1`Xu0?i80+gjwy}%|S$XihYEStypFvajc__*kTFk(!U9}z zQ`Cvg@J}y1svt-kkvN_gh}r6yqNx)ylfLxagPNk{UX6#66{n_U|}v)`~$V0KVYL&qspVMdTd*~#hIe2PuLQF z&)7Ow6G$fUGQaE#TScsPu8OQOuCg4O5+ke?Jbs+(FLUelJE=3QQLc%u;oGGND;nfw z=*<=7z#fUknSjc3kb0HSh@!`$A2K9|LTJ@A^2>9R$DTOQIh;9GZhAI8noEABojPJT zI_tizP7~4_3Fl_Wq$i+LiIdfnIg=TA1YpG_1ts$(BnC$Y1F*Q_H~Rh+$_66(E5$^AQc4X<5V|}1jQa3m z>7s}dc##`S{zriEO%%Ryr)H-P_y;umr^QNh4>O4kLyb2ti!)hi_=g~|F3z7r)1N-_ zG^O1zHO0u56z52SMbt$MYxIti?Bxko(mc+;d1@1Fa2KW?1w_wNAG}z8!B`-wi4w9i zb1q3qO))A}Erph=hykS|ClvS3%^8z3N zn1`DTlRz)_FBELvsQ}KmO14T}3Qa&^Wb($9|52v+;@D%h!oK3txl*xrCAg3&Z@u2-^k*6hN`tGd~5~M1?g`E zx2A*FcUN@oC$=Q|H~Rl`BTGOQF-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>hUE$p6y{86nJoU8o0fqG``}?LxO-T{v zJ;U2Cs~!TS499F}b5bhevZ_*3lVCnXw&X9i@{Vnaznz72btvO$l?7kU&3^adJ^sVx zF&042?gsawaqkxmPi#zWaN%^HN_V>W)GGbl?JozZ-j5rMuiVEeanj(TwV-Gpru4+9 z8PqDKxZIkuZj5b{!y*u@T>e>sk=&xauQq%+YN-7K0au1mO}xDd%>9R1?sE|m9QuAp z&cSHrK2C&I6^MnfEz+|4`xw!y3$pa2R6%2f2MxY=pDuK+$pM9Gw?~Uz=>`8iK@Fm< JQ~|OK{vSHDbZ7to literal 0 HcmV?d00001 diff --git a/DS4Tool/ScpForm.Designer.cs b/DS4Tool/ScpForm.Designer.cs index 41f3e7c..faa5dac 100644 --- a/DS4Tool/ScpForm.Designer.cs +++ b/DS4Tool/ScpForm.Designer.cs @@ -36,15 +36,14 @@ this.tmrUpdate = new System.Windows.Forms.Timer(this.components); this.pnlButton = new System.Windows.Forms.Panel(); this.label1 = new System.Windows.Forms.Label(); - this.btnImportProfiles = new System.Windows.Forms.Button(); this.llbHelp = new System.Windows.Forms.LinkLabel(); this.btnStartStop = new System.Windows.Forms.Button(); - this.btnClear = new System.Windows.Forms.Button(); this.lnkControllers = new System.Windows.Forms.LinkLabel(); this.StartWindowsCheckBox = new System.Windows.Forms.CheckBox(); this.lbLastMessage = new System.Windows.Forms.Label(); this.startMinimizedCheckBox = new System.Windows.Forms.CheckBox(); this.hideDS4CheckBox = new System.Windows.Forms.CheckBox(); + this.btnClear = new System.Windows.Forms.Button(); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.cMTaskbar = new System.Windows.Forms.ContextMenuStrip(this.components); this.editProfileForController1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -58,52 +57,55 @@ this.openProfiles = new System.Windows.Forms.OpenFileDialog(); this.tabMain = new System.Windows.Forms.TabControl(); this.tabControllers = new System.Windows.Forms.TabPage(); + this.tLPControllers = new System.Windows.Forms.TableLayoutPanel(); + this.pBStatus1 = new System.Windows.Forms.PictureBox(); + this.lbPad1 = new System.Windows.Forms.Label(); + this.lbPad2 = new System.Windows.Forms.Label(); + this.bnEditC3 = new System.Windows.Forms.Button(); + this.bnEditC4 = new System.Windows.Forms.Button(); + this.lbPad3 = new System.Windows.Forms.Label(); + this.lbPad4 = new System.Windows.Forms.Label(); + this.cBController1 = new System.Windows.Forms.ComboBox(); + this.bnEditC2 = new System.Windows.Forms.Button(); + this.cBController2 = new System.Windows.Forms.ComboBox(); + this.cBController3 = new System.Windows.Forms.ComboBox(); + this.bnEditC1 = new System.Windows.Forms.Button(); + this.cBController4 = new System.Windows.Forms.ComboBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.lBBatt1 = new System.Windows.Forms.Label(); + this.lBBatt2 = new System.Windows.Forms.Label(); + this.lBBatt3 = new System.Windows.Forms.Label(); + this.lBBatt4 = new System.Windows.Forms.Label(); + this.pBStatus2 = new System.Windows.Forms.PictureBox(); + this.pBStatus3 = new System.Windows.Forms.PictureBox(); + this.pBStatus4 = new System.Windows.Forms.PictureBox(); this.tabProfiles = new System.Windows.Forms.TabPage(); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.tsBNewProfle = new System.Windows.Forms.ToolStripButton(); this.tsBEditProfile = new System.Windows.Forms.ToolStripButton(); this.tsBDeleteProfile = new System.Windows.Forms.ToolStripButton(); this.tSBDupProfile = new System.Windows.Forms.ToolStripButton(); + this.tSBImportProfile = new System.Windows.Forms.ToolStripButton(); + this.tSBExportProfile = new System.Windows.Forms.ToolStripButton(); this.lBProfiles = new System.Windows.Forms.ListBox(); this.tabLog = new System.Windows.Forms.TabPage(); this.tabAutoProfiles = new System.Windows.Forms.TabPage(); - this.pBStatus4 = new System.Windows.Forms.PictureBox(); - this.pBStatus3 = new System.Windows.Forms.PictureBox(); - this.pBStatus2 = new System.Windows.Forms.PictureBox(); - this.lBBatt4 = new System.Windows.Forms.Label(); - this.lBBatt3 = new System.Windows.Forms.Label(); - this.lBBatt2 = new System.Windows.Forms.Label(); - this.lBBatt1 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.cBController4 = new System.Windows.Forms.ComboBox(); - this.bnEditC1 = new System.Windows.Forms.Button(); - this.cBController3 = new System.Windows.Forms.ComboBox(); - this.cBController2 = new System.Windows.Forms.ComboBox(); - this.bnEditC2 = new System.Windows.Forms.Button(); - this.cBController1 = new System.Windows.Forms.ComboBox(); - this.lbPad4 = new System.Windows.Forms.Label(); - this.lbPad3 = new System.Windows.Forms.Label(); - this.bnEditC4 = new System.Windows.Forms.Button(); - this.bnEditC3 = new System.Windows.Forms.Button(); - this.lbPad2 = new System.Windows.Forms.Label(); - this.lbPad1 = new System.Windows.Forms.Label(); - this.pBStatus1 = new System.Windows.Forms.PictureBox(); - this.tLPControllers = new System.Windows.Forms.TableLayoutPanel(); + this.saveProfiles = new System.Windows.Forms.SaveFileDialog(); this.pnlButton.SuspendLayout(); this.cMTaskbar.SuspendLayout(); this.tabMain.SuspendLayout(); this.tabControllers.SuspendLayout(); + this.tLPControllers.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pBStatus1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pBStatus2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pBStatus3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pBStatus4)).BeginInit(); this.tabProfiles.SuspendLayout(); this.toolStrip1.SuspendLayout(); this.tabLog.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pBStatus4)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pBStatus3)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pBStatus2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pBStatus1)).BeginInit(); - this.tLPControllers.SuspendLayout(); this.SuspendLayout(); // // lvDebug @@ -116,7 +118,7 @@ this.lvDebug.FullRowSelect = true; this.lvDebug.Location = new System.Drawing.Point(3, 3); this.lvDebug.Name = "lvDebug"; - this.lvDebug.Size = new System.Drawing.Size(780, 281); + this.lvDebug.Size = new System.Drawing.Size(780, 284); this.lvDebug.TabIndex = 0; this.lvDebug.UseCompatibleStateImageBehavior = false; this.lvDebug.View = System.Windows.Forms.View.Details; @@ -141,48 +143,35 @@ // this.pnlButton.BackColor = System.Drawing.SystemColors.Control; this.pnlButton.Controls.Add(this.label1); - this.pnlButton.Controls.Add(this.btnImportProfiles); this.pnlButton.Controls.Add(this.llbHelp); this.pnlButton.Controls.Add(this.btnStartStop); - this.pnlButton.Controls.Add(this.btnClear); this.pnlButton.Controls.Add(this.lnkControllers); this.pnlButton.Controls.Add(this.StartWindowsCheckBox); this.pnlButton.Controls.Add(this.lbLastMessage); this.pnlButton.Controls.Add(this.startMinimizedCheckBox); this.pnlButton.Controls.Add(this.hideDS4CheckBox); this.pnlButton.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlButton.Location = new System.Drawing.Point(0, 313); + this.pnlButton.Location = new System.Drawing.Point(0, 339); this.pnlButton.Name = "pnlButton"; - this.pnlButton.Size = new System.Drawing.Size(794, 80); + this.pnlButton.Size = new System.Drawing.Size(794, 54); this.pnlButton.TabIndex = 10; // // label1 // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(290, 58); + this.label1.Location = new System.Drawing.Point(526, 5); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(98, 13); this.label1.TabIndex = 46; this.label1.Text = "Used to test values"; this.label1.Visible = false; // - // btnImportProfiles - // - this.btnImportProfiles.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnImportProfiles.Location = new System.Drawing.Point(7, 51); - this.btnImportProfiles.Name = "btnImportProfiles"; - this.btnImportProfiles.Size = new System.Drawing.Size(87, 23); - this.btnImportProfiles.TabIndex = 14; - this.btnImportProfiles.Text = "Import Profile(s)"; - this.btnImportProfiles.UseVisualStyleBackColor = true; - this.btnImportProfiles.Click += new System.EventHandler(this.btnImportProfiles_Click); - // // llbHelp // this.llbHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.llbHelp.AutoSize = true; - this.llbHelp.Location = new System.Drawing.Point(641, 8); + this.llbHelp.Location = new System.Drawing.Point(642, 5); this.llbHelp.Name = "llbHelp"; this.llbHelp.Size = new System.Drawing.Size(79, 13); this.llbHelp.TabIndex = 13; @@ -192,32 +181,20 @@ // // btnStartStop // - this.btnStartStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnStartStop.Location = new System.Drawing.Point(666, 51); + this.btnStartStop.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.btnStartStop.Location = new System.Drawing.Point(535, 26); this.btnStartStop.Name = "btnStartStop"; - this.btnStartStop.Size = new System.Drawing.Size(119, 23); + this.btnStartStop.Size = new System.Drawing.Size(58, 23); this.btnStartStop.TabIndex = 1; this.btnStartStop.Text = "Start"; this.btnStartStop.UseVisualStyleBackColor = true; this.btnStartStop.Click += new System.EventHandler(this.btnStartStop_Click); // - // btnClear - // - this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnClear.Enabled = false; - this.btnClear.Location = new System.Drawing.Point(563, 51); - this.btnClear.Name = "btnClear"; - this.btnClear.Size = new System.Drawing.Size(97, 23); - this.btnClear.TabIndex = 9; - this.btnClear.Text = "Clear"; - this.btnClear.UseVisualStyleBackColor = true; - this.btnClear.Click += new System.EventHandler(this.btnClear_Click); - // // lnkControllers // this.lnkControllers.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.lnkControllers.AutoSize = true; - this.lnkControllers.Location = new System.Drawing.Point(726, 8); + this.lnkControllers.Location = new System.Drawing.Point(727, 5); this.lnkControllers.Name = "lnkControllers"; this.lnkControllers.Size = new System.Drawing.Size(56, 13); this.lnkControllers.TabIndex = 11; @@ -229,11 +206,11 @@ // this.StartWindowsCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.StartWindowsCheckBox.AutoSize = true; - this.StartWindowsCheckBox.Location = new System.Drawing.Point(228, 28); + this.StartWindowsCheckBox.Location = new System.Drawing.Point(206, 30); this.StartWindowsCheckBox.Name = "StartWindowsCheckBox"; - this.StartWindowsCheckBox.Size = new System.Drawing.Size(117, 17); + this.StartWindowsCheckBox.Size = new System.Drawing.Size(95, 17); this.StartWindowsCheckBox.TabIndex = 40; - this.StartWindowsCheckBox.Text = "Start with Windows"; + this.StartWindowsCheckBox.Text = "Run at Startup"; this.StartWindowsCheckBox.UseVisualStyleBackColor = true; this.StartWindowsCheckBox.CheckedChanged += new System.EventHandler(this.StartWindowsCheckBox_CheckedChanged); // @@ -242,7 +219,7 @@ this.lbLastMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lbLastMessage.ForeColor = System.Drawing.SystemColors.GrayText; - this.lbLastMessage.Location = new System.Drawing.Point(7, 8); + this.lbLastMessage.Location = new System.Drawing.Point(8, 5); this.lbLastMessage.Name = "lbLastMessage"; this.lbLastMessage.Size = new System.Drawing.Size(628, 17); this.lbLastMessage.TabIndex = 41; @@ -251,7 +228,7 @@ // this.startMinimizedCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.startMinimizedCheckBox.AutoSize = true; - this.startMinimizedCheckBox.Location = new System.Drawing.Point(348, 28); + this.startMinimizedCheckBox.Location = new System.Drawing.Point(307, 30); this.startMinimizedCheckBox.Name = "startMinimizedCheckBox"; this.startMinimizedCheckBox.Size = new System.Drawing.Size(97, 17); this.startMinimizedCheckBox.TabIndex = 40; @@ -263,7 +240,7 @@ // this.hideDS4CheckBox.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.hideDS4CheckBox.AutoSize = true; - this.hideDS4CheckBox.Location = new System.Drawing.Point(451, 28); + this.hideDS4CheckBox.Location = new System.Drawing.Point(410, 30); this.hideDS4CheckBox.Name = "hideDS4CheckBox"; this.hideDS4CheckBox.Size = new System.Drawing.Size(119, 17); this.hideDS4CheckBox.TabIndex = 13; @@ -271,6 +248,18 @@ this.hideDS4CheckBox.UseVisualStyleBackColor = true; this.hideDS4CheckBox.CheckedChanged += new System.EventHandler(this.hideDS4CheckBox_CheckedChanged); // + // btnClear + // + this.btnClear.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btnClear.Enabled = false; + this.btnClear.Location = new System.Drawing.Point(3, 287); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(780, 23); + this.btnClear.TabIndex = 9; + this.btnClear.Text = "Clear"; + this.btnClear.UseVisualStyleBackColor = true; + this.btnClear.Click += new System.EventHandler(this.btnClear_Click); + // // notifyIcon1 // this.notifyIcon1.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info; @@ -368,401 +357,28 @@ this.tabMain.Location = new System.Drawing.Point(0, 0); this.tabMain.Name = "tabMain"; this.tabMain.SelectedIndex = 0; - this.tabMain.Size = new System.Drawing.Size(794, 313); + this.tabMain.Size = new System.Drawing.Size(794, 339); this.tabMain.TabIndex = 12; - this.tabMain.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); + this.tabMain.SelectedIndexChanged += new System.EventHandler(this.tabMain_SelectedIndexChanged); // // tabControllers // this.tabControllers.Controls.Add(this.tLPControllers); this.tabControllers.Location = new System.Drawing.Point(4, 22); this.tabControllers.Name = "tabControllers"; - this.tabControllers.Size = new System.Drawing.Size(786, 287); + this.tabControllers.Size = new System.Drawing.Size(786, 313); this.tabControllers.TabIndex = 3; this.tabControllers.Text = "Controllers"; this.tabControllers.UseVisualStyleBackColor = true; // - // tabProfiles - // - this.tabProfiles.Controls.Add(this.toolStrip1); - this.tabProfiles.Controls.Add(this.lBProfiles); - this.tabProfiles.Location = new System.Drawing.Point(4, 22); - this.tabProfiles.Name = "tabProfiles"; - this.tabProfiles.Padding = new System.Windows.Forms.Padding(3); - this.tabProfiles.Size = new System.Drawing.Size(786, 287); - this.tabProfiles.TabIndex = 0; - this.tabProfiles.Text = "Profiles"; - this.tabProfiles.UseVisualStyleBackColor = true; - // - // toolStrip1 - // - this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.tsBNewProfle, - this.tsBEditProfile, - this.tsBDeleteProfile, - this.tSBDupProfile}); - this.toolStrip1.Location = new System.Drawing.Point(3, 3); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(780, 25); - this.toolStrip1.TabIndex = 1; - this.toolStrip1.Text = "toolStrip1"; - // - // tsBNewProfle - // - this.tsBNewProfle.Image = global::ScpServer.Properties.Resources.newprofile; - this.tsBNewProfle.ImageTransparentColor = System.Drawing.Color.Magenta; - this.tsBNewProfle.Name = "tsBNewProfle"; - this.tsBNewProfle.Size = new System.Drawing.Size(88, 22); - this.tsBNewProfle.Text = "New Profile"; - this.tsBNewProfle.TextAlign = System.Drawing.ContentAlignment.TopLeft; - this.tsBNewProfle.Click += new System.EventHandler(this.tsBNewProfile_Click); - // - // tsBEditProfile - // - this.tsBEditProfile.Image = global::ScpServer.Properties.Resources.edit; - this.tsBEditProfile.ImageTransparentColor = System.Drawing.Color.Magenta; - this.tsBEditProfile.Name = "tsBEditProfile"; - this.tsBEditProfile.Size = new System.Drawing.Size(84, 22); - this.tsBEditProfile.Text = "Edit Profile"; - this.tsBEditProfile.TextAlign = System.Drawing.ContentAlignment.TopLeft; - this.tsBEditProfile.Click += new System.EventHandler(this.tsBNEditProfile_Click); - // - // tsBDeleteProfile - // - this.tsBDeleteProfile.Image = ((System.Drawing.Image)(resources.GetObject("tsBDeleteProfile.Image"))); - this.tsBDeleteProfile.ImageTransparentColor = System.Drawing.Color.Magenta; - this.tsBDeleteProfile.Name = "tsBDeleteProfile"; - this.tsBDeleteProfile.Size = new System.Drawing.Size(97, 22); - this.tsBDeleteProfile.Text = "Delete Profile"; - this.tsBDeleteProfile.TextAlign = System.Drawing.ContentAlignment.TopLeft; - this.tsBDeleteProfile.Click += new System.EventHandler(this.tsBDeleteProfle_Click); - // - // tSBDupProfile - // - this.tSBDupProfile.Image = ((System.Drawing.Image)(resources.GetObject("tSBDupProfile.Image"))); - this.tSBDupProfile.ImageTransparentColor = System.Drawing.Color.Magenta; - this.tSBDupProfile.Name = "tSBDupProfile"; - this.tSBDupProfile.Size = new System.Drawing.Size(120, 22); - this.tSBDupProfile.Text = "Dupliacate Profile"; - this.tSBDupProfile.TextAlign = System.Drawing.ContentAlignment.TopLeft; - this.tSBDupProfile.Click += new System.EventHandler(this.tSBDupProfile_Click); - // - // lBProfiles - // - this.lBProfiles.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lBProfiles.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.lBProfiles.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lBProfiles.FormattingEnabled = true; - this.lBProfiles.ItemHeight = 16; - this.lBProfiles.Location = new System.Drawing.Point(3, 29); - this.lBProfiles.MultiColumn = true; - this.lBProfiles.Name = "lBProfiles"; - this.lBProfiles.Size = new System.Drawing.Size(780, 256); - this.lBProfiles.TabIndex = 0; - this.lBProfiles.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lBProfiles_MouseDoubleClick); - // - // tabLog - // - this.tabLog.Controls.Add(this.lvDebug); - this.tabLog.Location = new System.Drawing.Point(4, 22); - this.tabLog.Name = "tabLog"; - this.tabLog.Padding = new System.Windows.Forms.Padding(3); - this.tabLog.Size = new System.Drawing.Size(786, 287); - this.tabLog.TabIndex = 1; - this.tabLog.Text = "Log"; - this.tabLog.UseVisualStyleBackColor = true; - // - // tabAutoProfiles - // - this.tabAutoProfiles.Location = new System.Drawing.Point(4, 22); - this.tabAutoProfiles.Name = "tabAutoProfiles"; - this.tabAutoProfiles.Size = new System.Drawing.Size(786, 287); - this.tabAutoProfiles.TabIndex = 2; - this.tabAutoProfiles.Text = "Auto Profiles (Alpha)"; - this.tabAutoProfiles.UseVisualStyleBackColor = true; - // - // pBStatus4 - // - this.pBStatus4.Anchor = System.Windows.Forms.AnchorStyles.None; - this.pBStatus4.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus4.Image"))); - this.pBStatus4.InitialImage = global::ScpServer.Properties.Resources.BT; - this.pBStatus4.Location = new System.Drawing.Point(370, 106); - this.pBStatus4.Name = "pBStatus4"; - this.pBStatus4.Size = new System.Drawing.Size(39, 20); - this.pBStatus4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.pBStatus4.TabIndex = 47; - this.pBStatus4.TabStop = false; - // - // pBStatus3 - // - this.pBStatus3.Anchor = System.Windows.Forms.AnchorStyles.None; - this.pBStatus3.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus3.Image"))); - this.pBStatus3.InitialImage = global::ScpServer.Properties.Resources.BT; - this.pBStatus3.Location = new System.Drawing.Point(370, 77); - this.pBStatus3.Name = "pBStatus3"; - this.pBStatus3.Size = new System.Drawing.Size(39, 20); - this.pBStatus3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.pBStatus3.TabIndex = 47; - this.pBStatus3.TabStop = false; - // - // pBStatus2 - // - this.pBStatus2.Anchor = System.Windows.Forms.AnchorStyles.None; - this.pBStatus2.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus2.Image"))); - this.pBStatus2.InitialImage = global::ScpServer.Properties.Resources.BT; - this.pBStatus2.Location = new System.Drawing.Point(370, 48); - this.pBStatus2.Name = "pBStatus2"; - this.pBStatus2.Size = new System.Drawing.Size(39, 20); - this.pBStatus2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.pBStatus2.TabIndex = 47; - this.pBStatus2.TabStop = false; - // - // lBBatt4 - // - this.lBBatt4.Anchor = System.Windows.Forms.AnchorStyles.None; - this.lBBatt4.AutoSize = true; - this.lBBatt4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lBBatt4.Location = new System.Drawing.Point(521, 109); - this.lBBatt4.Name = "lBBatt4"; - this.lBBatt4.Size = new System.Drawing.Size(39, 15); - this.lBBatt4.TabIndex = 44; - this.lBBatt4.Text = "100%"; - // - // lBBatt3 - // - this.lBBatt3.Anchor = System.Windows.Forms.AnchorStyles.None; - this.lBBatt3.AutoSize = true; - this.lBBatt3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lBBatt3.Location = new System.Drawing.Point(521, 80); - this.lBBatt3.Name = "lBBatt3"; - this.lBBatt3.Size = new System.Drawing.Size(39, 15); - this.lBBatt3.TabIndex = 44; - this.lBBatt3.Text = "100%"; - // - // lBBatt2 - // - this.lBBatt2.Anchor = System.Windows.Forms.AnchorStyles.None; - this.lBBatt2.AutoSize = true; - this.lBBatt2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lBBatt2.Location = new System.Drawing.Point(521, 51); - this.lBBatt2.Name = "lBBatt2"; - this.lBBatt2.Size = new System.Drawing.Size(39, 15); - this.lBBatt2.TabIndex = 44; - this.lBBatt2.Text = "100%"; - // - // lBBatt1 - // - this.lBBatt1.Anchor = System.Windows.Forms.AnchorStyles.None; - this.lBBatt1.AutoSize = true; - this.lBBatt1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lBBatt1.Location = new System.Drawing.Point(521, 22); - this.lBBatt1.Name = "lBBatt1"; - this.lBBatt1.Size = new System.Drawing.Size(39, 15); - this.lBBatt1.TabIndex = 44; - this.lBBatt1.Text = "100%"; - // - // label5 - // - this.label5.Anchor = System.Windows.Forms.AnchorStyles.None; - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.Location = new System.Drawing.Point(515, 0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(51, 15); - this.label5.TabIndex = 45; - this.label5.Text = "Battery"; - // - // label4 - // - this.label4.Anchor = System.Windows.Forms.AnchorStyles.None; - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.Location = new System.Drawing.Point(366, 0); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(47, 15); - this.label4.TabIndex = 45; - this.label4.Text = "Status"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(3, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(21, 15); - this.label3.TabIndex = 45; - this.label3.Text = "ID"; - // - // label2 - // - this.label2.Anchor = System.Windows.Forms.AnchorStyles.None; - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(624, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(109, 15); - this.label2.TabIndex = 45; - this.label2.Text = "Selected Profile"; - // - // cBController4 - // - this.cBController4.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.cBController4.FormattingEnabled = true; - this.cBController4.Location = new System.Drawing.Point(622, 106); - this.cBController4.Name = "cBController4"; - this.cBController4.Size = new System.Drawing.Size(114, 21); - this.cBController4.TabIndex = 42; - this.cBController4.Tag = "3"; - this.cBController4.SelectedValueChanged += new System.EventHandler(this.Profile_Changed); - // - // bnEditC1 - // - this.bnEditC1.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.bnEditC1.Location = new System.Drawing.Point(742, 18); - this.bnEditC1.Name = "bnEditC1"; - this.bnEditC1.Size = new System.Drawing.Size(41, 23); - this.bnEditC1.TabIndex = 43; - this.bnEditC1.Tag = "0"; - this.bnEditC1.Text = "Edit"; - this.bnEditC1.UseVisualStyleBackColor = true; - this.bnEditC1.Click += new System.EventHandler(this.editButtons_Click); - // - // cBController3 - // - this.cBController3.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.cBController3.FormattingEnabled = true; - this.cBController3.Location = new System.Drawing.Point(622, 77); - this.cBController3.Name = "cBController3"; - this.cBController3.Size = new System.Drawing.Size(114, 21); - this.cBController3.TabIndex = 42; - this.cBController3.Tag = "2"; - this.cBController3.SelectedValueChanged += new System.EventHandler(this.Profile_Changed); - // - // cBController2 - // - this.cBController2.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.cBController2.FormattingEnabled = true; - this.cBController2.Location = new System.Drawing.Point(622, 48); - this.cBController2.Name = "cBController2"; - this.cBController2.Size = new System.Drawing.Size(114, 21); - this.cBController2.TabIndex = 42; - this.cBController2.Tag = "1"; - this.cBController2.SelectedValueChanged += new System.EventHandler(this.Profile_Changed); - // - // bnEditC2 - // - this.bnEditC2.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.bnEditC2.Location = new System.Drawing.Point(742, 47); - this.bnEditC2.Name = "bnEditC2"; - this.bnEditC2.Size = new System.Drawing.Size(41, 23); - this.bnEditC2.TabIndex = 43; - this.bnEditC2.Tag = "1"; - this.bnEditC2.Text = "Edit"; - this.bnEditC2.UseVisualStyleBackColor = true; - this.bnEditC2.Click += new System.EventHandler(this.editButtons_Click); - // - // cBController1 - // - this.cBController1.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.cBController1.FormattingEnabled = true; - this.cBController1.Location = new System.Drawing.Point(622, 19); - this.cBController1.Name = "cBController1"; - this.cBController1.Size = new System.Drawing.Size(114, 21); - this.cBController1.TabIndex = 42; - this.cBController1.Tag = "0"; - this.cBController1.SelectedValueChanged += new System.EventHandler(this.Profile_Changed); - // - // lbPad4 - // - this.lbPad4.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lbPad4.AutoSize = true; - this.lbPad4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbPad4.Location = new System.Drawing.Point(3, 109); - this.lbPad4.Name = "lbPad4"; - this.lbPad4.Size = new System.Drawing.Size(123, 15); - this.lbPad4.TabIndex = 44; - this.lbPad4.Text = "Pad 4 : Disconnected"; - // - // lbPad3 - // - this.lbPad3.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lbPad3.AutoSize = true; - this.lbPad3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbPad3.Location = new System.Drawing.Point(3, 80); - this.lbPad3.Name = "lbPad3"; - this.lbPad3.Size = new System.Drawing.Size(123, 15); - this.lbPad3.TabIndex = 44; - this.lbPad3.Text = "Pad 3 : Disconnected"; - // - // bnEditC4 - // - this.bnEditC4.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.bnEditC4.Location = new System.Drawing.Point(742, 105); - this.bnEditC4.Name = "bnEditC4"; - this.bnEditC4.Size = new System.Drawing.Size(41, 23); - this.bnEditC4.TabIndex = 43; - this.bnEditC4.Tag = "3"; - this.bnEditC4.Text = "Edit"; - this.bnEditC4.UseVisualStyleBackColor = true; - this.bnEditC4.Click += new System.EventHandler(this.editButtons_Click); - // - // bnEditC3 - // - this.bnEditC3.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.bnEditC3.Location = new System.Drawing.Point(742, 76); - this.bnEditC3.Name = "bnEditC3"; - this.bnEditC3.Size = new System.Drawing.Size(41, 23); - this.bnEditC3.TabIndex = 43; - this.bnEditC3.Tag = "2"; - this.bnEditC3.Text = "Edit"; - this.bnEditC3.UseVisualStyleBackColor = true; - this.bnEditC3.Click += new System.EventHandler(this.editButtons_Click); - // - // lbPad2 - // - this.lbPad2.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lbPad2.AutoSize = true; - this.lbPad2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbPad2.Location = new System.Drawing.Point(3, 51); - this.lbPad2.Name = "lbPad2"; - this.lbPad2.Size = new System.Drawing.Size(123, 15); - this.lbPad2.TabIndex = 44; - this.lbPad2.Text = "Pad 2 : Disconnected"; - // - // lbPad1 - // - this.lbPad1.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lbPad1.AutoSize = true; - this.lbPad1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbPad1.Location = new System.Drawing.Point(3, 22); - this.lbPad1.Name = "lbPad1"; - this.lbPad1.Size = new System.Drawing.Size(123, 15); - this.lbPad1.TabIndex = 44; - this.lbPad1.Text = "Pad 1 : Disconnected"; - // - // pBStatus1 - // - this.pBStatus1.Anchor = System.Windows.Forms.AnchorStyles.None; - this.pBStatus1.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus1.Image"))); - this.pBStatus1.InitialImage = global::ScpServer.Properties.Resources.BT; - this.pBStatus1.Location = new System.Drawing.Point(370, 19); - this.pBStatus1.Name = "pBStatus1"; - this.pBStatus1.Size = new System.Drawing.Size(39, 20); - this.pBStatus1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.pBStatus1.TabIndex = 47; - this.pBStatus1.TabStop = false; - // // tLPControllers // this.tLPControllers.ColumnCount = 5; this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 51.34884F)); this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 23.34039F)); this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.31077F)); - this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F)); - this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 45F)); + this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 117F)); + this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 44F)); this.tLPControllers.Controls.Add(this.pBStatus1, 1, 1); this.tLPControllers.Controls.Add(this.lbPad1, 0, 1); this.tLPControllers.Controls.Add(this.lbPad2, 0, 2); @@ -799,6 +415,411 @@ this.tLPControllers.Size = new System.Drawing.Size(786, 130); this.tLPControllers.TabIndex = 46; // + // pBStatus1 + // + this.pBStatus1.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pBStatus1.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus1.Image"))); + this.pBStatus1.InitialImage = global::ScpServer.Properties.Resources.BT; + this.pBStatus1.Location = new System.Drawing.Point(373, 19); + this.pBStatus1.Name = "pBStatus1"; + this.pBStatus1.Size = new System.Drawing.Size(39, 20); + this.pBStatus1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pBStatus1.TabIndex = 47; + this.pBStatus1.TabStop = false; + // + // lbPad1 + // + this.lbPad1.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lbPad1.AutoSize = true; + this.lbPad1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbPad1.Location = new System.Drawing.Point(3, 22); + this.lbPad1.Name = "lbPad1"; + this.lbPad1.Size = new System.Drawing.Size(123, 15); + this.lbPad1.TabIndex = 44; + this.lbPad1.Text = "Pad 1 : Disconnected"; + // + // lbPad2 + // + this.lbPad2.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lbPad2.AutoSize = true; + this.lbPad2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbPad2.Location = new System.Drawing.Point(3, 51); + this.lbPad2.Name = "lbPad2"; + this.lbPad2.Size = new System.Drawing.Size(123, 15); + this.lbPad2.TabIndex = 44; + this.lbPad2.Text = "Pad 2 : Disconnected"; + // + // bnEditC3 + // + this.bnEditC3.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.bnEditC3.Location = new System.Drawing.Point(743, 76); + this.bnEditC3.Name = "bnEditC3"; + this.bnEditC3.Size = new System.Drawing.Size(40, 23); + this.bnEditC3.TabIndex = 43; + this.bnEditC3.Tag = "2"; + this.bnEditC3.Text = "Edit"; + this.bnEditC3.UseVisualStyleBackColor = true; + this.bnEditC3.Click += new System.EventHandler(this.editButtons_Click); + // + // bnEditC4 + // + this.bnEditC4.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.bnEditC4.Location = new System.Drawing.Point(743, 105); + this.bnEditC4.Name = "bnEditC4"; + this.bnEditC4.Size = new System.Drawing.Size(40, 23); + this.bnEditC4.TabIndex = 43; + this.bnEditC4.Tag = "3"; + this.bnEditC4.Text = "Edit"; + this.bnEditC4.UseVisualStyleBackColor = true; + this.bnEditC4.Click += new System.EventHandler(this.editButtons_Click); + // + // lbPad3 + // + this.lbPad3.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lbPad3.AutoSize = true; + this.lbPad3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbPad3.Location = new System.Drawing.Point(3, 80); + this.lbPad3.Name = "lbPad3"; + this.lbPad3.Size = new System.Drawing.Size(123, 15); + this.lbPad3.TabIndex = 44; + this.lbPad3.Text = "Pad 3 : Disconnected"; + // + // lbPad4 + // + this.lbPad4.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lbPad4.AutoSize = true; + this.lbPad4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbPad4.Location = new System.Drawing.Point(3, 109); + this.lbPad4.Name = "lbPad4"; + this.lbPad4.Size = new System.Drawing.Size(123, 15); + this.lbPad4.TabIndex = 44; + this.lbPad4.Text = "Pad 4 : Disconnected"; + // + // cBController1 + // + this.cBController1.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.cBController1.FormattingEnabled = true; + this.cBController1.Location = new System.Drawing.Point(626, 19); + this.cBController1.Name = "cBController1"; + this.cBController1.Size = new System.Drawing.Size(111, 21); + this.cBController1.TabIndex = 42; + this.cBController1.Tag = "0"; + this.cBController1.SelectedValueChanged += new System.EventHandler(this.Profile_Changed); + // + // bnEditC2 + // + this.bnEditC2.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.bnEditC2.Location = new System.Drawing.Point(743, 47); + this.bnEditC2.Name = "bnEditC2"; + this.bnEditC2.Size = new System.Drawing.Size(40, 23); + this.bnEditC2.TabIndex = 43; + this.bnEditC2.Tag = "1"; + this.bnEditC2.Text = "Edit"; + this.bnEditC2.UseVisualStyleBackColor = true; + this.bnEditC2.Click += new System.EventHandler(this.editButtons_Click); + // + // cBController2 + // + this.cBController2.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.cBController2.FormattingEnabled = true; + this.cBController2.Location = new System.Drawing.Point(626, 48); + this.cBController2.Name = "cBController2"; + this.cBController2.Size = new System.Drawing.Size(111, 21); + this.cBController2.TabIndex = 42; + this.cBController2.Tag = "1"; + this.cBController2.SelectedValueChanged += new System.EventHandler(this.Profile_Changed); + // + // cBController3 + // + this.cBController3.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.cBController3.FormattingEnabled = true; + this.cBController3.Location = new System.Drawing.Point(626, 77); + this.cBController3.Name = "cBController3"; + this.cBController3.Size = new System.Drawing.Size(111, 21); + this.cBController3.TabIndex = 42; + this.cBController3.Tag = "2"; + this.cBController3.SelectedValueChanged += new System.EventHandler(this.Profile_Changed); + // + // bnEditC1 + // + this.bnEditC1.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.bnEditC1.Location = new System.Drawing.Point(743, 18); + this.bnEditC1.Name = "bnEditC1"; + this.bnEditC1.Size = new System.Drawing.Size(40, 23); + this.bnEditC1.TabIndex = 43; + this.bnEditC1.Tag = "0"; + this.bnEditC1.Text = "Edit"; + this.bnEditC1.UseVisualStyleBackColor = true; + this.bnEditC1.Click += new System.EventHandler(this.editButtons_Click); + // + // cBController4 + // + this.cBController4.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.cBController4.FormattingEnabled = true; + this.cBController4.Location = new System.Drawing.Point(626, 106); + this.cBController4.Name = "cBController4"; + this.cBController4.Size = new System.Drawing.Size(111, 21); + this.cBController4.TabIndex = 42; + this.cBController4.Tag = "3"; + this.cBController4.SelectedValueChanged += new System.EventHandler(this.Profile_Changed); + // + // label2 + // + this.label2.Anchor = System.Windows.Forms.AnchorStyles.None; + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(627, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(109, 15); + this.label2.TabIndex = 45; + this.label2.Text = "Selected Profile"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(3, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(21, 15); + this.label3.TabIndex = 45; + this.label3.Text = "ID"; + // + // label4 + // + this.label4.Anchor = System.Windows.Forms.AnchorStyles.None; + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(369, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(47, 15); + this.label4.TabIndex = 45; + this.label4.Text = "Status"; + // + // label5 + // + this.label5.Anchor = System.Windows.Forms.AnchorStyles.None; + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(518, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(51, 15); + this.label5.TabIndex = 45; + this.label5.Text = "Battery"; + // + // lBBatt1 + // + this.lBBatt1.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lBBatt1.AutoSize = true; + this.lBBatt1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lBBatt1.Location = new System.Drawing.Point(524, 22); + this.lBBatt1.Name = "lBBatt1"; + this.lBBatt1.Size = new System.Drawing.Size(39, 15); + this.lBBatt1.TabIndex = 44; + this.lBBatt1.Text = "100%"; + // + // lBBatt2 + // + this.lBBatt2.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lBBatt2.AutoSize = true; + this.lBBatt2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lBBatt2.Location = new System.Drawing.Point(524, 51); + this.lBBatt2.Name = "lBBatt2"; + this.lBBatt2.Size = new System.Drawing.Size(39, 15); + this.lBBatt2.TabIndex = 44; + this.lBBatt2.Text = "100%"; + // + // lBBatt3 + // + this.lBBatt3.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lBBatt3.AutoSize = true; + this.lBBatt3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lBBatt3.Location = new System.Drawing.Point(524, 80); + this.lBBatt3.Name = "lBBatt3"; + this.lBBatt3.Size = new System.Drawing.Size(39, 15); + this.lBBatt3.TabIndex = 44; + this.lBBatt3.Text = "100%"; + // + // lBBatt4 + // + this.lBBatt4.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lBBatt4.AutoSize = true; + this.lBBatt4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lBBatt4.Location = new System.Drawing.Point(524, 109); + this.lBBatt4.Name = "lBBatt4"; + this.lBBatt4.Size = new System.Drawing.Size(39, 15); + this.lBBatt4.TabIndex = 44; + this.lBBatt4.Text = "100%"; + // + // pBStatus2 + // + this.pBStatus2.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pBStatus2.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus2.Image"))); + this.pBStatus2.InitialImage = global::ScpServer.Properties.Resources.BT; + this.pBStatus2.Location = new System.Drawing.Point(373, 48); + this.pBStatus2.Name = "pBStatus2"; + this.pBStatus2.Size = new System.Drawing.Size(39, 20); + this.pBStatus2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pBStatus2.TabIndex = 47; + this.pBStatus2.TabStop = false; + // + // pBStatus3 + // + this.pBStatus3.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pBStatus3.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus3.Image"))); + this.pBStatus3.InitialImage = global::ScpServer.Properties.Resources.BT; + this.pBStatus3.Location = new System.Drawing.Point(373, 77); + this.pBStatus3.Name = "pBStatus3"; + this.pBStatus3.Size = new System.Drawing.Size(39, 20); + this.pBStatus3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pBStatus3.TabIndex = 47; + this.pBStatus3.TabStop = false; + // + // pBStatus4 + // + this.pBStatus4.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pBStatus4.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus4.Image"))); + this.pBStatus4.InitialImage = global::ScpServer.Properties.Resources.BT; + this.pBStatus4.Location = new System.Drawing.Point(373, 106); + this.pBStatus4.Name = "pBStatus4"; + this.pBStatus4.Size = new System.Drawing.Size(39, 20); + this.pBStatus4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pBStatus4.TabIndex = 47; + this.pBStatus4.TabStop = false; + // + // tabProfiles + // + this.tabProfiles.Controls.Add(this.toolStrip1); + this.tabProfiles.Controls.Add(this.lBProfiles); + this.tabProfiles.Location = new System.Drawing.Point(4, 22); + this.tabProfiles.Name = "tabProfiles"; + this.tabProfiles.Padding = new System.Windows.Forms.Padding(3); + this.tabProfiles.Size = new System.Drawing.Size(786, 313); + this.tabProfiles.TabIndex = 0; + this.tabProfiles.Text = "Profiles"; + this.tabProfiles.UseVisualStyleBackColor = true; + // + // toolStrip1 + // + this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsBNewProfle, + this.tsBEditProfile, + this.tsBDeleteProfile, + this.tSBDupProfile, + this.tSBImportProfile, + this.tSBExportProfile}); + this.toolStrip1.Location = new System.Drawing.Point(3, 3); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(780, 25); + this.toolStrip1.TabIndex = 1; + this.toolStrip1.Text = "toolStrip1"; + // + // tsBNewProfle + // + this.tsBNewProfle.Image = global::ScpServer.Properties.Resources.newprofile; + this.tsBNewProfle.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsBNewProfle.Name = "tsBNewProfle"; + this.tsBNewProfle.Size = new System.Drawing.Size(51, 22); + this.tsBNewProfle.Text = "New"; + this.tsBNewProfle.TextAlign = System.Drawing.ContentAlignment.TopLeft; + this.tsBNewProfle.ToolTipText = "Make New Profile"; + this.tsBNewProfle.Click += new System.EventHandler(this.tsBNewProfile_Click); + // + // tsBEditProfile + // + this.tsBEditProfile.Image = global::ScpServer.Properties.Resources.edit; + this.tsBEditProfile.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsBEditProfile.Name = "tsBEditProfile"; + this.tsBEditProfile.Size = new System.Drawing.Size(47, 22); + this.tsBEditProfile.Text = "Edit"; + this.tsBEditProfile.TextAlign = System.Drawing.ContentAlignment.TopLeft; + this.tsBEditProfile.ToolTipText = "Edit Selected Profile (Enter)"; + this.tsBEditProfile.Click += new System.EventHandler(this.tsBNEditProfile_Click); + // + // tsBDeleteProfile + // + this.tsBDeleteProfile.Image = ((System.Drawing.Image)(resources.GetObject("tsBDeleteProfile.Image"))); + this.tsBDeleteProfile.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsBDeleteProfile.Name = "tsBDeleteProfile"; + this.tsBDeleteProfile.Size = new System.Drawing.Size(60, 22); + this.tsBDeleteProfile.Text = "Delete"; + this.tsBDeleteProfile.TextAlign = System.Drawing.ContentAlignment.TopLeft; + this.tsBDeleteProfile.ToolTipText = "Delete Selected Profle (Delete)"; + this.tsBDeleteProfile.Click += new System.EventHandler(this.tsBDeleteProfle_Click); + // + // tSBDupProfile + // + this.tSBDupProfile.Image = ((System.Drawing.Image)(resources.GetObject("tSBDupProfile.Image"))); + this.tSBDupProfile.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tSBDupProfile.Name = "tSBDupProfile"; + this.tSBDupProfile.Size = new System.Drawing.Size(83, 22); + this.tSBDupProfile.Text = "Dupliacate"; + this.tSBDupProfile.TextAlign = System.Drawing.ContentAlignment.TopLeft; + this.tSBDupProfile.ToolTipText = "Dupliacate Selected Profile (Ctrl+C)"; + this.tSBDupProfile.Click += new System.EventHandler(this.tSBDupProfile_Click); + // + // tSBImportProfile + // + this.tSBImportProfile.Image = global::ScpServer.Properties.Resources.import; + this.tSBImportProfile.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tSBImportProfile.Name = "tSBImportProfile"; + this.tSBImportProfile.Size = new System.Drawing.Size(63, 22); + this.tSBImportProfile.Text = "Import"; + this.tSBImportProfile.ToolTipText = "Import Profile or Profiles"; + this.tSBImportProfile.Click += new System.EventHandler(this.tSBImportProfile_Click); + // + // tSBExportProfile + // + this.tSBExportProfile.Image = ((System.Drawing.Image)(resources.GetObject("tSBExportProfile.Image"))); + this.tSBExportProfile.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tSBExportProfile.Name = "tSBExportProfile"; + this.tSBExportProfile.Size = new System.Drawing.Size(60, 22); + this.tSBExportProfile.Text = "Export"; + this.tSBExportProfile.ToolTipText = "Export Selected Profile"; + this.tSBExportProfile.Click += new System.EventHandler(this.tSBExportProfile_Click); + // + // lBProfiles + // + this.lBProfiles.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lBProfiles.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.lBProfiles.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lBProfiles.FormattingEnabled = true; + this.lBProfiles.ItemHeight = 16; + this.lBProfiles.Location = new System.Drawing.Point(3, 29); + this.lBProfiles.MultiColumn = true; + this.lBProfiles.Name = "lBProfiles"; + this.lBProfiles.Size = new System.Drawing.Size(780, 272); + this.lBProfiles.TabIndex = 0; + this.lBProfiles.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lBProfiles_KeyDown); + this.lBProfiles.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lBProfiles_MouseDoubleClick); + // + // tabLog + // + this.tabLog.Controls.Add(this.lvDebug); + this.tabLog.Controls.Add(this.btnClear); + this.tabLog.Location = new System.Drawing.Point(4, 22); + this.tabLog.Name = "tabLog"; + this.tabLog.Padding = new System.Windows.Forms.Padding(3); + this.tabLog.Size = new System.Drawing.Size(786, 313); + this.tabLog.TabIndex = 1; + this.tabLog.Text = "Log"; + this.tabLog.UseVisualStyleBackColor = true; + // + // tabAutoProfiles + // + this.tabAutoProfiles.Location = new System.Drawing.Point(4, 22); + this.tabAutoProfiles.Name = "tabAutoProfiles"; + this.tabAutoProfiles.Size = new System.Drawing.Size(786, 313); + this.tabAutoProfiles.TabIndex = 2; + this.tabAutoProfiles.Text = "Auto Profiles (Alpha)"; + this.tabAutoProfiles.UseVisualStyleBackColor = true; + // + // saveProfiles + // + this.saveProfiles.Filter = "XML Files (*.xml)|*.xml"; + // // ScpForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -807,7 +828,7 @@ this.ClientSize = new System.Drawing.Size(794, 393); this.Controls.Add(this.tabMain); this.Controls.Add(this.pnlButton); - this.MinimumSize = new System.Drawing.Size(420, 190); + this.MinimumSize = new System.Drawing.Size(420, 161); this.Name = "ScpForm"; this.Text = "DS4Windows 1.0 Beta J2K Build"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_Close); @@ -818,17 +839,17 @@ this.cMTaskbar.ResumeLayout(false); this.tabMain.ResumeLayout(false); this.tabControllers.ResumeLayout(false); + this.tLPControllers.ResumeLayout(false); + this.tLPControllers.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pBStatus1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pBStatus2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pBStatus3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pBStatus4)).EndInit(); this.tabProfiles.ResumeLayout(false); this.tabProfiles.PerformLayout(); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.tabLog.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pBStatus4)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pBStatus3)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pBStatus2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pBStatus1)).EndInit(); - this.tLPControllers.ResumeLayout(false); - this.tLPControllers.PerformLayout(); this.ResumeLayout(false); } @@ -858,7 +879,6 @@ private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.OpenFileDialog openProfiles; private System.Windows.Forms.LinkLabel llbHelp; - private System.Windows.Forms.Button btnImportProfiles; private System.Windows.Forms.CheckBox StartWindowsCheckBox; private System.Windows.Forms.Label label1; private System.Windows.Forms.TabControl tabMain; @@ -897,6 +917,9 @@ private System.Windows.Forms.PictureBox pBStatus2; private System.Windows.Forms.PictureBox pBStatus3; private System.Windows.Forms.PictureBox pBStatus4; + private System.Windows.Forms.ToolStripButton tSBImportProfile; + private System.Windows.Forms.ToolStripButton tSBExportProfile; + private System.Windows.Forms.SaveFileDialog saveProfiles; //private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; } } diff --git a/DS4Tool/ScpForm.cs b/DS4Tool/ScpForm.cs index 96e3fb3..bbc2d37 100644 --- a/DS4Tool/ScpForm.cs +++ b/DS4Tool/ScpForm.cs @@ -15,7 +15,7 @@ namespace ScpServer { public partial class ScpForm : Form { - double version = 9; + double version = 9.111; private DS4Control.Control rootHub; delegate void LogDebugDelegate(DateTime Time, String Data); @@ -104,11 +104,67 @@ namespace ScpServer SetupArrays(); foreach (ToolStripMenuItem t in shortcuts) t.DropDownItemClicked += Profile_Changed_Menu; - CheckDrivers(); + CheckDrivers(); + } + + protected void Form_Load(object sender, EventArgs e) + { + Icon = Properties.Resources.DS4; + notifyIcon1.Icon = Properties.Resources.DS4; + rootHub = new DS4Control.Control(); + rootHub.Debug += On_Debug; + Log.GuiLog += On_Debug; + Log.TrayIconLog += ShowNotification; + // tmrUpdate.Enabled = true; TODO remove tmrUpdate and leave tick() + Global.Load(); + Global.setVersion(version); + Global.Save(); + hideDS4CheckBox.CheckedChanged -= hideDS4CheckBox_CheckedChanged; + hideDS4CheckBox.Checked = Global.getUseExclusiveMode(); + hideDS4CheckBox.CheckedChanged += hideDS4CheckBox_CheckedChanged; + + // New settings + this.Width = Global.getFormWidth(); + this.Height = Global.getFormHeight(); + startMinimizedCheckBox.CheckedChanged -= startMinimizedCheckBox_CheckedChanged; + startMinimizedCheckBox.Checked = Global.getStartMinimized(); + startMinimizedCheckBox.CheckedChanged += startMinimizedCheckBox_CheckedChanged; + + RegistryKey KeyLoc = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", false); + StartWindowsCheckBox.Checked = (KeyLoc.GetValue("DS4Tool") != null); + + SetupArrays(); + if (startMinimizedCheckBox.Checked) + { + this.WindowState = FormWindowState.Minimized; + Form_Resize(sender, e); + } + RefreshProfiles(); + for (int i = 0; i < 4; i++) + Global.LoadProfile(i); + Global.ControllerStatusChange += ControllerStatusChange; + ControllerStatusChanged(); + if (btnStartStop.Enabled) + btnStartStop_Clicked(); + Uri url = new Uri("https://dl.dropboxusercontent.com/u/16364552/DS4Tool/newest%20version.txt"); //Sorry other devs, gonna have to find your own server + Directory.CreateDirectory(Global.appdatapath); + if (DateTime.Now >= Global.getLastChecked() + TimeSpan.FromHours(1)) + { + wc.DownloadFileAsync(url, Global.appdatapath + "\\version.txt"); + wc.DownloadFileCompleted += Check_Version; + Global.setLastChecked(DateTime.Now); + } + WinProgs WP = new WinProgs(profilenames.ToArray()); + WP.TopLevel = false; + WP.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + WP.Visible = true; + WP.Dock = DockStyle.Fill; + WP.Enabled = false; + tabAutoProfiles.Controls.Add(WP); //test.Start(); //processcheck.Start(); processcheck.Tick += processcheck_Tick; - test.Tick += test_Tick; + test.Tick += test_Tick; } void processcheck_Tick(object sender, EventArgs e) @@ -211,62 +267,7 @@ namespace ScpServer } catch { }; } - - protected void Form_Load(object sender, EventArgs e) - { - Icon = Properties.Resources.DS4; - notifyIcon1.Icon = Properties.Resources.DS4; - rootHub = new DS4Control.Control(); - rootHub.Debug += On_Debug; - Log.GuiLog += On_Debug; - Log.TrayIconLog += ShowNotification; - // tmrUpdate.Enabled = true; TODO remove tmrUpdate and leave tick() - Global.Load(); - Global.setVersion(version); - Global.Save(); - hideDS4CheckBox.CheckedChanged -= hideDS4CheckBox_CheckedChanged; - hideDS4CheckBox.Checked = Global.getUseExclusiveMode(); - hideDS4CheckBox.CheckedChanged += hideDS4CheckBox_CheckedChanged; - - // New settings - this.Width = Global.getFormWidth(); - this.Height = Global.getFormHeight(); - startMinimizedCheckBox.CheckedChanged -= startMinimizedCheckBox_CheckedChanged; - startMinimizedCheckBox.Checked = Global.getStartMinimized(); - startMinimizedCheckBox.CheckedChanged += startMinimizedCheckBox_CheckedChanged; - - RegistryKey KeyLoc = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", false); - StartWindowsCheckBox.Checked = (KeyLoc.GetValue("DS4Tool") != null); - - SetupArrays(); - if (startMinimizedCheckBox.Checked) - { - this.WindowState = FormWindowState.Minimized; - Form_Resize(sender, e); - } - RefreshProfiles(); - for (int i = 0; i < 4; i++) - Global.LoadProfile(i); - Global.ControllerStatusChange += ControllerStatusChange; - ControllerStatusChanged(); - if (btnStartStop.Enabled) - btnStartStop_Clicked(); - Uri url = new Uri("https://dl.dropboxusercontent.com/u/16364552/DS4Tool/newest%20version.txt"); //Sorry other devs, gonna have to find your own server - Directory.CreateDirectory(Global.appdatapath); - if (DateTime.Now >= Global.getLastChecked() + TimeSpan.FromHours(1)) - { - wc.DownloadFileAsync(url, Global.appdatapath + "\\version.txt"); - wc.DownloadFileCompleted += Check_Version; - Global.setLastChecked(DateTime.Now); - } - WinProgs WP = new WinProgs(profilenames.ToArray()); - WP.TopLevel = false; - WP.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - WP.Visible = true; - WP.Dock = DockStyle.Fill; - WP.Enabled = false; - tabAutoProfiles.Controls.Add(WP); - } + List profilenames = new List(); public void RefreshProfiles() { @@ -441,8 +442,6 @@ namespace ScpServer } protected void ControllerStatusChanged() { - // If controllers are detected, but not checked, automatically check #1 - //bool checkFirst = true; String tooltip = "DS4Windows v" + version; for (Int32 Index = 0; Index < Pads.Length; Index++) { @@ -459,45 +458,37 @@ namespace ScpServer Pads[Index].Enabled = true; if (Pads[Index].Text != "Connecting...") { - cbs[Index].Enabled = true; - ebns[Index].Enabled = true; - shortcuts[Index].Enabled = true; - Batteries[Index].Enabled = true; - MinimumSize = new Size(MinimumSize.Width, 190 + 29 * Index); + Enable_Controls(Index, true); + MinimumSize = new Size(MinimumSize.Width, 161 + 29 * Index); rootHub.DS4Controllers[Index].Report += ScpForm_Report; } - // As above - //if (checkFirst && (Pads[Index].Checked && Index != 0)) - // checkFirst = false; } else { Pads[Index].Text = "Disconnected"; - Pads[Index].Enabled = false; - cbs[Index].Enabled = false; - ebns[Index].Enabled = false; - Batteries[Index].Enabled = false; + Enable_Controls(Index, false); if (opt != null && opt.device == Index) { opt.Close(); opt = null; } shortcuts[Index].Enabled = false; - // As above - //if (Index == 0) - // checkFirst = false; } if (rootHub.getShortDS4ControllerInfo(Index) != "None") tooltip += "\n" + (Index + 1) + ": " + rootHub.getShortDS4ControllerInfo(Index); // Carefully stay under the 63 character limit. } btnClear.Enabled = lvDebug.Items.Count > 0; - - // As above - //if (checkFirst && btnClear.Enabled) - // Pads[0].Checked = true; notifyIcon1.Text = tooltip; } + + private void Enable_Controls(int device, bool on) + { + ebns[device].Enabled = on; + cbs[device].Enabled = on; + shortcuts[device].Enabled = on; + Batteries[device].Enabled = on; + } delegate void HotKeysDelegate(object sender, EventArgs e); void ScpForm_Report(object sender, EventArgs e) { @@ -515,7 +506,7 @@ namespace ScpServer string slide = rootHub.TouchpadSlide(0); if (slide == "left") { - if (cbs[i].SelectedIndex == 0) + if (cbs[i].SelectedIndex <= 0) cbs[i].SelectedIndex = cbs[0].Items.Count - 2; else cbs[i].SelectedIndex--; @@ -548,6 +539,20 @@ namespace ScpServer } + private void lBProfiles_KeyDown(object sender, KeyEventArgs e) + { + if (lBProfiles.SelectedIndex >= 0 && opt == null) + { + if (e.KeyValue == 13) + ShowOptions(4, lBProfiles.SelectedItem.ToString()); + if (e.KeyValue == 46) + tsBDeleteProfle_Click(this, e); + if (e.KeyValue == 67 && e.Modifiers == Keys.Control) + tSBDupProfile_Click(this, e); + } + + } + private void tsBNewProfile_Click(object sender, EventArgs e) { ShowOptions(4, ""); @@ -593,7 +598,37 @@ namespace ScpServer MTB.FormClosed += delegate { toolStrip1.Enabled = true; lBProfiles.Enabled = true; }; } } - //private Options[] OptionsDialog = { null, null, null, null }; + + + + private void tSBImportProfile_Click(object sender, EventArgs e) + { + openProfiles.InitialDirectory = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + @"\Profiles\"; + if (openProfiles.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + string[] files = openProfiles.FileNames; + for (int i = 0; i < files.Length; i++) + File.Copy(openProfiles.FileNames[i], Global.appdatapath + "\\Profiles\\" + Path.GetFileName(files[i]), true); + RefreshProfiles(); + } + } + + private void tSBExportProfile_Click(object sender, EventArgs e) + { + if (lBProfiles.SelectedIndex >= 0) + { + Stream stream; + Stream profile = new StreamReader(Global.appdatapath + "\\Profiles\\" + lBProfiles.SelectedItem.ToString() + ".xml").BaseStream; + if (saveProfiles.ShowDialog() == System.Windows.Forms.DialogResult.OK) + if ((stream = saveProfiles.OpenFile()) != null) + { + profile.CopyTo(stream); + profile.Close(); + stream.Close(); + } + } + } + Options opt; private System.Drawing.Size oldsize; private void ShowOptions(int devID, string profile) @@ -625,8 +660,8 @@ namespace ScpServer toolStrip1.Enabled = true; }; oldsize = this.Size; - if (this.Size.Height < 470) - this.Size = new System.Drawing.Size(this.Size.Width, 470); + if (this.Size.Height < 442) + this.Size = new System.Drawing.Size(this.Size.Width, 442); if (this.Size.Width < 910) this.Size = new System.Drawing.Size(910, this.Size.Height); tabMain.SelectedIndex = 1; @@ -652,19 +687,7 @@ namespace ScpServer if (((ToolStripMenuItem)em.DropDownItems[t]).Checked) ShowOptions(i, ((ToolStripMenuItem)em.DropDownItems[t]).Text); } - private void Enable_Controls(int device, bool on) - { - ebns[device].Enabled = on; - cbs[device].Enabled = on; - shortcuts[device].Enabled = on; - } - private void hotkeysButton_Click(object sender, EventArgs e) - { - Hotkeys hotkeysForm = new Hotkeys(); - hotkeysForm.Icon = this.Icon; - hotkeysForm.ShowDialog(); - } private void lnkControllers_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("control", "joy.cpl"); @@ -776,39 +799,11 @@ namespace ScpServer private void llbHelp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - Hotkeys hotkeysForm = new Hotkeys(); + Hotkeys hotkeysForm = new Hotkeys(this); hotkeysForm.Icon = this.Icon; hotkeysForm.ShowDialog(); } - private void btnImportProfiles_Click(object sender, EventArgs e) - { - openProfiles.InitialDirectory = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + @"\Profiles\"; - if (openProfiles.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - string[] files = openProfiles.FileNames; - for (int i = 0; i < files.Length; i++) - File.Copy(openProfiles.FileNames[i], Global.appdatapath + "\\Profiles\\" + Path.GetFileName(files[i]), true); - RefreshProfiles(); - } - } - - protected void Form_Close(object sender, FormClosingEventArgs e) - { - if (oldsize == new System.Drawing.Size(0, 0)) - { - Global.setFormWidth(this.Width); - Global.setFormHeight(this.Height); - } - else - { - Global.setFormWidth(oldsize.Width); - Global.setFormHeight(oldsize.Height); - } - Global.Save(); - rootHub.Stop(); - } - private void StartWindowsCheckBox_CheckedChanged(object sender, EventArgs e) { RegistryKey KeyLoc = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); @@ -824,15 +819,15 @@ namespace ScpServer WP.ShowDialog(); } - private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + private void tabMain_SelectedIndexChanged(object sender, EventArgs e) { lbLastMessage.Visible = tabMain.SelectedIndex != 2; if (tabMain.SelectedIndex == 3 && opt == null) { - if (this.Size.Width < 755 || this.Size.Height < 355) + if (this.Size.Width < 755 || this.Size.Height < 340) oldsize = Size; - if (this.Size.Height < 355) - this.Size = new System.Drawing.Size(this.Size.Width, 355); + if (this.Size.Height < 340) + this.Size = new System.Drawing.Size(this.Size.Width, 340); if (this.Size.Width < 755) this.Size = new System.Drawing.Size(755, this.Size.Height); @@ -845,8 +840,21 @@ namespace ScpServer } - - + protected void Form_Close(object sender, FormClosingEventArgs e) + { + if (oldsize == new System.Drawing.Size(0, 0)) + { + Global.setFormWidth(this.Width); + Global.setFormHeight(this.Height); + } + else + { + Global.setFormWidth(oldsize.Width); + Global.setFormHeight(oldsize.Height); + } + Global.Save(); + rootHub.Stop(); + } } public class ThemeUtil diff --git a/DS4Tool/ScpForm.resx b/DS4Tool/ScpForm.resx index 002297b..ae85d3f 100644 --- a/DS4Tool/ScpForm.resx +++ b/DS4Tool/ScpForm.resx @@ -6302,90 +6302,7 @@ 449, 17 - - 568, 17 - - - 568, 17 - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEpSURBVDhPYxhc4GJ69P+zyRH/oVwMsMXX/f9GL2fs8ucS - gv9/XDnz/8eZHf932ZtgKFqgp/7/9YJJ/193F/1faqaPacipaL//76c2/P8+p/X/x96y/xvN9eCKQJpB - hn+bWgs2YKGhNnZXgGx+3ZD6/0Nb1v+Xdcn/V+ir/wdpfregDy42Q0Eau2YYANn8NMf3//OSULAGkI3P - C4PAYtPlpfBrhgGQzQ/S3P4/SLD7fyfEAIwJ2owMQM5+mBv0/6a/FhwTbTtYc2Mm3GYYvuavR9gQkOZH - 7cVgp9+KsgY7G6QJxIaJ4TRkvZM1WDMosO6leqL4GaQJJAaSu5Psjj0a19ib/7+X6Q/2O7YAAxkCkgPh - +fpa2F0B8sI8HTXskkAAksMnPxCAgQEAgp/brMfRrFIAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADQSURBVDhPlZCxCsIwEIbziO76CL6CXYNjJl1dMnQpLobu - Lm7ViuCkUwW1jtItcmdPbXoh8YOflHD5+nNCa225iFhg2AXu8jyPk/gEQJSEhsvz3a6PV/yGh8aYT9pR - Hq4BkCQJm14rEuxON2ywKi423VQ47EKS9ukbt0HTPPH0CQCl1FcSajBdHuwk3aNYSomPKR2BC9cAqB81 - picINRgvSjucb+1AFXj/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vz3a6PV/yGh8aYT9pR + Hq4BkCQJm14rEuxON2ywKi423VQ47EKS9ukbt0HTPPH0CQCl1FcSajBdHuwk3aNYSomPKR2BC9cAqB81 + picINRgvSjucb+1AFXj/dwPaDZ0dgZssy9gGoxnTwAcsjIC//gYICmAACO7ABwl8RAlCEUKIFyWXYHlY + K643AAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAG7SURBVDhPjZNNSwJRFIbd9AVFLfoV/pQW0qagdcuIFolF + kK0SpTQkosTogyaIYHITRhkZiEaSVARRmhliSlBYfhRRdvI9zr2ZCHXgcGfu3Oc5Z+7c0SEeow5Cpi8s + nLdhI+Vj43QdNPE18iwwxCMDtQHoLb0kBYXUPN2dO+k9G6KvVy+PyI+cp74EEBZiAfLpxs4V4xEbPd/v + SRGeBT39fwuQp75Bih5PsKR6Purv/p8AlSBw7y6S3hEgvfuS2ifDPMosz0tBKbfJYDGjcKJS+GiaAvtm + Urc3eHHbygM1KUXq3PrkEcJfAoCll3XexJDax6+BxJ7YvQo1uzIMipQdJE7MsnI+ucwCdIDXgACdYHE1 + jG6kAN8coIBRER2INNhWf1UH3OqM/QjwbXEOcolZeaDQwYHSSzPKMDWMHUoYYOOASh2mHRZLQSG5wJWz + cSufQsC+tR4yWKcYQtUWS4RhzIODRApQVSTuIUAXEIiWAadifimQIQSojA3FPWBtIX9zwKNzI9TlUvlZ + hdQCQDUsOoAAEGDROmBsrIZW4ipgrBzd8kNcYxQCZK1Aw+oH/kLIaqtgx+WmydDpvgHDWmdFLR8MQgAA + AABJRU5ErkJggg== + + + + 673, 17 + \ No newline at end of file diff --git a/DS4Tool/WinProgs.cs b/DS4Tool/WinProgs.cs index e2551f7..9c523dd 100644 --- a/DS4Tool/WinProgs.cs +++ b/DS4Tool/WinProgs.cs @@ -63,15 +63,19 @@ namespace ScpServer foreach (string st in lods) //if (!st.Contains("etup") && !st.Contains("dotnet") && !st.Contains("SETUP") && !st.Contains("edist") && !st.Contains("nstall")) listBox2.Items.Add(Path.GetFileNameWithoutExtension(st)); + if (listBox2.Items.Count == 1 && listBox2.SelectedIndex != 0) + listBox2.SelectedIndex = 0; } private void listBox2_SelectedIndexChanged(object sender, EventArgs e) { - if (listBox2.SelectedIndex >= 0) + if (listBox2.SelectedIndex >= 0) { label1.Text = lods[listBox2.SelectedIndex]; LoadP(); } + else + label1.Text = ""; } protected String m_Profile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool\\Auto Profiles.xml"; @@ -167,8 +171,8 @@ namespace ScpServer cbs[i].SelectedIndex = j; break; } - //else - //cbs[i].Text = "(none)"; + //else + //cbs[i].Text = "(none)"; } catch { cbs[i].Text = "(none)"; } }