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
This commit is contained in:
jays2kings 2014-05-31 00:37:02 -04:00
parent 66d03c3fb9
commit f7883ec543
17 changed files with 869 additions and 747 deletions

View File

@ -94,7 +94,7 @@ namespace DS4Control
}; };
if (haptics.IsLightBarSet()) if (haptics.IsLightBarSet())
{ {
if (Global.getFlashWhenLowBattery(deviceNum)) if (device.Battery <= Global.getFlashAt(deviceNum))
{ {
int level = device.Battery / 10; int level = device.Battery / 10;
if (level >= 10) if (level >= 10)

View File

@ -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) public static void setLedAsBatteryIndicator(int device, bool ledAsBattery)
{ {
m_Config.ledAsBattery[device] = ledAsBattery; m_Config.ledAsBattery[device] = ledAsBattery;
@ -487,6 +498,7 @@ namespace DS4Control
public bool[] doubleTap = { false, false, false, false, false }; public bool[] doubleTap = { false, false, false, false, false };
public int[] scrollSensitivity = { 0, 0, 0, 0, 0 }; public int[] scrollSensitivity = { 0, 0, 0, 0, 0 };
public double[] rainbow = { 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[][] public Byte[][] m_LowLeds = new Byte[][]
{ {
new Byte[] {0,0,0}, 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 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 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 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 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 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); 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]); } try { Item = m_Xdoc.SelectSingleNode("/ScpControl/lowBatteryFlash"); Boolean.TryParse(Item.InnerText, out flashLedLowBattery[device]); }
catch { missingSetting = true; } 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]); } try { Item = m_Xdoc.SelectSingleNode("/ScpControl/touchSensitivity"); Byte.TryParse(Item.InnerText, out touchSensitivity[device]); }
catch { missingSetting = true; } catch { missingSetting = true; }
@ -966,6 +982,9 @@ namespace DS4Control
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/lowBatteryFlash"); Boolean.TryParse(Item.InnerText, out flashLedLowBattery[device]); } try { Item = m_Xdoc.SelectSingleNode("/ScpControl/lowBatteryFlash"); Boolean.TryParse(Item.InnerText, out flashLedLowBattery[device]); }
catch { missingSetting = true; } 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]); } try { Item = m_Xdoc.SelectSingleNode("/ScpControl/touchSensitivity"); Byte.TryParse(Item.InnerText, out touchSensitivity[device]); }
catch { missingSetting = true; } catch { missingSetting = true; }

View File

@ -198,6 +198,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Resources\shell32_export.png" />
<None Include="Resources\USB.png" /> <None Include="Resources\USB.png" />
<None Include="Resources\UpperTouch.png" /> <None Include="Resources\UpperTouch.png" />
<None Include="Resources\shell32_copy.png" /> <None Include="Resources\shell32_copy.png" />
@ -222,6 +223,8 @@
<None Include="Resources\RightTouch.png" /> <None Include="Resources\RightTouch.png" />
<None Include="Resources\imageres_new.png" /> <None Include="Resources\imageres_new.png" />
<None Include="Resources\none.png" /> <None Include="Resources\none.png" />
<None Include="Resources\export.png" />
<None Include="Resources\imageres_import.png" />
<Content Include="Resources\Scp_All.ico" /> <Content Include="Resources\Scp_All.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -479,7 +479,7 @@
// label23 // label23
// //
this.label23.AutoSize = true; 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.Name = "label23";
this.label23.Size = new System.Drawing.Size(58, 13); this.label23.Size = new System.Drawing.Size(58, 13);
this.label23.TabIndex = 3; 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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.lLBUpdate.AutoSize = true; 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.Name = "lLBUpdate";
this.lLBUpdate.Size = new System.Drawing.Size(96, 13); this.lLBUpdate.Size = new System.Drawing.Size(96, 13);
this.lLBUpdate.TabIndex = 48; this.lLBUpdate.TabIndex = 48;

View File

@ -14,8 +14,10 @@ namespace ScpServer
{ {
public partial class Hotkeys : Form public partial class Hotkeys : Form
{ {
public Hotkeys() ScpForm form;
public Hotkeys(ScpForm main)
{ {
form = main;
InitializeComponent(); InitializeComponent();
lbAbout.Text += Global.getVersion().ToString() + ")"; lbAbout.Text += Global.getVersion().ToString() + ")";
ToolTip tt = new ToolTip(); ToolTip tt = new ToolTip();
@ -86,7 +88,7 @@ namespace ScpServer
wc2.DownloadFile(url2, "Updater.exe"); wc2.DownloadFile(url2, "Updater.exe");
} }
System.Diagnostics.Process.Start("Updater.exe"); System.Diagnostics.Process.Start("Updater.exe");
this.Close(); form.Close();
} }
else else
File.Delete(Global.appdatapath + "\\version.txt"); File.Delete(Global.appdatapath + "\\version.txt");

View File

@ -61,6 +61,7 @@
// button2 // button2
// //
this.button2.Anchor = System.Windows.Forms.AnchorStyles.Top; 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.Location = new System.Drawing.Point(276, 5);
this.button2.Name = "button2"; this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23); this.button2.Size = new System.Drawing.Size(75, 23);
@ -75,6 +76,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(242)))), ((int)(((byte)(242))))); 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.ClientSize = new System.Drawing.Size(359, 35);
this.Controls.Add(this.button2); this.Controls.Add(this.button2);
this.Controls.Add(this.tBProfile); this.Controls.Add(this.tBProfile);

View File

@ -140,6 +140,9 @@
this.gBRumble = new System.Windows.Forms.GroupBox(); this.gBRumble = new System.Windows.Forms.GroupBox();
this.gBDeadzone = new System.Windows.Forms.GroupBox(); this.gBDeadzone = new System.Windows.Forms.GroupBox();
this.btnCancel = new System.Windows.Forms.Button(); 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.advColorDialog = new ScpServer.AdvancedColorDialog();
this.MainPanel.SuspendLayout(); this.MainPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pBController)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pBController)).BeginInit();
@ -180,6 +183,7 @@
this.gBLightbar.SuspendLayout(); this.gBLightbar.SuspendLayout();
this.gBRumble.SuspendLayout(); this.gBRumble.SuspendLayout();
this.gBDeadzone.SuspendLayout(); this.gBDeadzone.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nUDflashLED)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// bnTouchUpper // bnTouchUpper
@ -445,6 +449,7 @@
this.bnUp.BackColor = System.Drawing.Color.Transparent; this.bnUp.BackColor = System.Drawing.Color.Transparent;
this.bnUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.bnUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.bnUp.Cursor = System.Windows.Forms.Cursors.Default; 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.BorderColor = System.Drawing.Color.Red;
this.bnUp.FlatAppearance.BorderSize = 0; this.bnUp.FlatAppearance.BorderSize = 0;
this.bnUp.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control; this.bnUp.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control;
@ -944,22 +949,21 @@
// //
// numUDRainbow // 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[] { this.numUDRainbow.Maximum = new decimal(new int[] {
60, 60,
0, 0,
0, 0,
0}); 0});
this.numUDRainbow.Name = "numUDRainbow"; 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.TabIndex = 167;
this.numUDRainbow.Visible = false;
this.numUDRainbow.ValueChanged += new System.EventHandler(this.numUDRainbow_ValueChanged); this.numUDRainbow.ValueChanged += new System.EventHandler(this.numUDRainbow_ValueChanged);
// //
// pBRainbow // pBRainbow
// //
this.pBRainbow.Image = global::ScpServer.Properties.Resources.rainbow; 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.Name = "pBRainbow";
this.pBRainbow.Size = new System.Drawing.Size(16, 16); this.pBRainbow.Size = new System.Drawing.Size(16, 16);
this.pBRainbow.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pBRainbow.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@ -970,13 +974,14 @@
// flashLed // flashLed
// //
this.flashLed.AutoSize = true; 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.Name = "flashLed";
this.flashLed.RightToLeft = System.Windows.Forms.RightToLeft.Yes; 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.TabIndex = 163;
this.flashLed.Text = "Battery Level Flash"; this.flashLed.Text = "Flash when Low";
this.flashLed.UseVisualStyleBackColor = true; this.flashLed.UseVisualStyleBackColor = true;
this.flashLed.Visible = false;
this.flashLed.CheckedChanged += new System.EventHandler(this.flashWhenLowBattery_CheckedChanged); this.flashLed.CheckedChanged += new System.EventHandler(this.flashWhenLowBattery_CheckedChanged);
// //
// blueBar // blueBar
@ -1059,12 +1064,11 @@
// lBspc // lBspc
// //
this.lBspc.AutoSize = true; 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.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.TabIndex = 157;
this.lBspc.Text = "seconds per cycle"; this.lBspc.Text = "secs/cycle";
this.lBspc.Visible = false;
// //
// lBRed // lBRed
// //
@ -1235,7 +1239,6 @@
this.lBL2.Size = new System.Drawing.Size(19, 13); this.lBL2.Size = new System.Drawing.Size(19, 13);
this.lBL2.TabIndex = 196; this.lBL2.TabIndex = 196;
this.lBL2.Text = "L2"; this.lBL2.Text = "L2";
this.lBL2.Click += new System.EventHandler(this.lBL2_Click);
// //
// lBR2 // lBR2
// //
@ -1245,7 +1248,6 @@
this.lBR2.Size = new System.Drawing.Size(21, 13); this.lBR2.Size = new System.Drawing.Size(21, 13);
this.lBR2.TabIndex = 197; this.lBR2.TabIndex = 197;
this.lBR2.Text = "R2"; this.lBR2.Text = "R2";
this.lBR2.Click += new System.EventHandler(this.lBR2_Click);
// //
// lBControllerOff // lBControllerOff
// //
@ -1681,7 +1683,6 @@
this.lbRS.Size = new System.Drawing.Size(22, 13); this.lbRS.Size = new System.Drawing.Size(22, 13);
this.lbRS.TabIndex = 197; this.lbRS.TabIndex = 197;
this.lbRS.Text = "RS"; this.lbRS.Text = "RS";
this.lbRS.Click += new System.EventHandler(this.lbRS_Click);
// //
// lbLS // lbLS
// //
@ -1691,7 +1692,6 @@
this.lbLS.Size = new System.Drawing.Size(20, 13); this.lbLS.Size = new System.Drawing.Size(20, 13);
this.lbLS.TabIndex = 196; this.lbLS.TabIndex = 196;
this.lbLS.Text = "LS"; this.lbLS.Text = "LS";
this.lbLS.Click += new System.EventHandler(this.lbLS_Click);
// //
// numUDRS // numUDRS
// //
@ -1843,9 +1843,11 @@
// //
// gBLightbar // gBLightbar
// //
this.gBLightbar.Controls.Add(this.label1);
this.gBLightbar.Controls.Add(this.lBFlashAt);
this.gBLightbar.Controls.Add(this.pBRainbow); this.gBLightbar.Controls.Add(this.pBRainbow);
this.gBLightbar.Controls.Add(this.flashLed);
this.gBLightbar.Controls.Add(this.lowBatteryPanel); this.gBLightbar.Controls.Add(this.lowBatteryPanel);
this.gBLightbar.Controls.Add(this.nUDflashLED);
this.gBLightbar.Controls.Add(this.numUDRainbow); this.gBLightbar.Controls.Add(this.numUDRainbow);
this.gBLightbar.Controls.Add(this.FullPanel); this.gBLightbar.Controls.Add(this.FullPanel);
this.gBLightbar.Controls.Add(this.lBspc); this.gBLightbar.Controls.Add(this.lBspc);
@ -1892,6 +1894,7 @@
// //
// btnCancel // btnCancel
// //
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(352, 7); this.btnCancel.Location = new System.Drawing.Point(352, 7);
this.btnCancel.Name = "btnCancel"; this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23); this.btnCancel.Size = new System.Drawing.Size(75, 23);
@ -1900,6 +1903,37 @@
this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); 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 // advColorDialog
// //
this.advColorDialog.AnyColor = true; this.advColorDialog.AnyColor = true;
@ -1911,8 +1945,10 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White; 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.btnCancel);
this.Controls.Add(this.flashLed);
this.Controls.Add(this.gBDeadzone); this.Controls.Add(this.gBDeadzone);
this.Controls.Add(this.gBRumble); this.Controls.Add(this.gBRumble);
this.Controls.Add(this.gBLightbar); this.Controls.Add(this.gBLightbar);
@ -1934,7 +1970,6 @@
this.Name = "Options"; this.Name = "Options";
this.Text = "Options"; this.Text = "Options";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Options_Closed); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Options_Closed);
this.Load += new System.EventHandler(this.Options_Load);
this.MainPanel.ResumeLayout(false); this.MainPanel.ResumeLayout(false);
this.MainPanel.PerformLayout(); this.MainPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pBController)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pBController)).EndInit();
@ -1984,6 +2019,7 @@
this.gBRumble.PerformLayout(); this.gBRumble.PerformLayout();
this.gBDeadzone.ResumeLayout(false); this.gBDeadzone.ResumeLayout(false);
this.gBDeadzone.PerformLayout(); this.gBDeadzone.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nUDflashLED)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -2106,6 +2142,9 @@
private System.Windows.Forms.CheckBox cBControllerInput; private System.Windows.Forms.CheckBox cBControllerInput;
private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.NumericUpDown nUDSixaxis; private System.Windows.Forms.NumericUpDown nUDSixaxis;
private System.Windows.Forms.NumericUpDown nUDflashLED;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lBFlashAt;
} }
} }
 

View File

@ -43,7 +43,8 @@ namespace ScpServer
greenBar.Value = color.green; greenBar.Value = color.green;
blueBar.Value = color.blue; blueBar.Value = color.blue;
batteryLed.Checked = DS4Control.Global.getLedAsBatteryIndicator(device); batteryLed.Checked = Global.getLedAsBatteryIndicator(device);
nUDflashLED.Value = Global.getFlashAt(device);
lowBatteryPanel.Visible = batteryLed.Checked; lowBatteryPanel.Visible = batteryLed.Checked;
lbFull.Text = (batteryLed.Checked ? "Full:" : "Color:"); lbFull.Text = (batteryLed.Checked ? "Full:" : "Color:");
FullPanel.Location = (batteryLed.Checked ? new Point(FullPanel.Location.X, 42) : new Point(FullPanel.Location.X, 48)); 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; lowGreenBar.Value = lowColor.green;
lowBlueBar.Value = lowColor.blue; lowBlueBar.Value = lowColor.blue;
rumbleBoostBar.Value = DS4Control.Global.loadRumbleBoost(device); rumbleBoostBar.Value = Global.loadRumbleBoost(device);
flashLed.Checked = DS4Control.Global.getFlashWhenLowBattery(device); flashLed.Checked = Global.getFlashWhenLowBattery(device);
numUDTouch.Value = Global.getTouchSensitivity(device); numUDTouch.Value = Global.getTouchSensitivity(device);
cBSlide.Checked = Global.getTouchSensitivity(device) > 0; cBSlide.Checked = Global.getTouchSensitivity(device) > 0;
numUDScroll.Value = Global.getScrollSensitivity(device); numUDScroll.Value = Global.getScrollSensitivity(device);
@ -246,6 +247,7 @@ namespace ScpServer
Global.setRSDeadzone(device, (byte)Math.Round((numUDRS.Value * 127), 0)); Global.setRSDeadzone(device, (byte)Math.Round((numUDRS.Value * 127), 0));
Global.setLSDeadzone(device, (byte)Math.Round((numUDLS.Value * 127), 0)); Global.setLSDeadzone(device, (byte)Math.Round((numUDLS.Value * 127), 0));
Global.setButtonMouseSensitivity(device, (int)numUDMouseSens.Value); Global.setButtonMouseSensitivity(device, (int)numUDMouseSens.Value);
Global.setFlashAt(device, (int)nUDflashLED.Value);
if (numUDRainbow.Value == 0) pBRainbow.Image = greyscale; if (numUDRainbow.Value == 0) pBRainbow.Image = greyscale;
else pBRainbow.Image = colored; else pBRainbow.Image = colored;
} }
@ -362,12 +364,12 @@ namespace ScpServer
Global.saveLowColor(device, color.R, color.G, color.B); 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) private void redBar_ValueChanged(object sender, EventArgs e)
{ {
int value = ((TrackBar)sender).Value; int value = ((TrackBar)sender).Value;
int sat = 255 - (value < 255 ? value : 255); int sat = bgc - (value < bgc ? value : bgc);
int som = 255 + 11 * (int)(value * 0.0039215); int som = bgc + 11 * (int)(value * 0.0039215);
((TrackBar)sender).BackColor = Color.FromArgb(som, sat, sat); ((TrackBar)sender).BackColor = Color.FromArgb(som, sat, sat);
alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value)); alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value));
reg = Color.FromArgb(redBar.Value, 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) private void greenBar_ValueChanged(object sender, EventArgs e)
{ {
int value = ((TrackBar)sender).Value; int value = ((TrackBar)sender).Value;
int sat = 255 - (value < 255 ? value : 255); int sat = bgc - (value < bgc ? value : bgc);
int som = 255 + 11 * (int)(value * 0.0039215); int som = bgc + 11 * (int)(value * 0.0039215);
((TrackBar)sender).BackColor = Color.FromArgb(sat, som, sat); ((TrackBar)sender).BackColor = Color.FromArgb(sat, som, sat);
alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value)); alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value));
reg = Color.FromArgb(redBar.Value, 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) private void blueBar_ValueChanged(object sender, EventArgs e)
{ {
int value = ((TrackBar)sender).Value; int value = ((TrackBar)sender).Value;
int sat = 255 - (value < 255 ? value : 255); int sat = bgc - (value < bgc ? value : bgc);
int som = 255 + 11 * (int)(value * 0.0039215); int som = bgc + 11 * (int)(value * 0.0039215);
((TrackBar)sender).BackColor = Color.FromArgb(sat, sat, som); ((TrackBar)sender).BackColor = Color.FromArgb(sat, sat, som);
alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value)); alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value));
reg = Color.FromArgb(redBar.Value, 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) private void lowRedBar_ValueChanged(object sender, EventArgs e)
{ {
int value = ((TrackBar)sender).Value; int value = ((TrackBar)sender).Value;
int sat = 255 - (value < 255 ? value : 255); int sat = bgc - (value < bgc ? value : bgc);
int som = 255 + 11 * (int)(value * 0.0039215); int som = bgc + 11 * (int)(value * 0.0039215);
((TrackBar)sender).BackColor = Color.FromArgb(som, sat, sat); ((TrackBar)sender).BackColor = Color.FromArgb(som, sat, sat);
alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value)); alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value));
reg = Color.FromArgb(lowRedBar.Value, 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) private void lowGreenBar_ValueChanged(object sender, EventArgs e)
{ {
int value = ((TrackBar)sender).Value; int value = ((TrackBar)sender).Value;
int sat = 255 - (value < 255 ? value : 255); int sat = bgc - (value < bgc ? value : bgc);
int som = 255 + 11 * (int)(value * 0.0039215); int som = bgc + 11 * (int)(value * 0.0039215);
((TrackBar)sender).BackColor = Color.FromArgb(sat, som, sat); ((TrackBar)sender).BackColor = Color.FromArgb(sat, som, sat);
alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value)); alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value));
reg = Color.FromArgb(lowRedBar.Value, 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) private void lowBlueBar_ValueChanged(object sender, EventArgs e)
{ {
int value = ((TrackBar)sender).Value; int value = ((TrackBar)sender).Value;
int sat = 255 - (value < 255 ? value : 255); int sat = bgc - (value < bgc ? value : bgc);
int som = 255 + 11 * (int)(value * 0.0039215); int som = bgc + 11 * (int)(value * 0.0039215);
((TrackBar)sender).BackColor = Color.FromArgb(sat, sat, som); ((TrackBar)sender).BackColor = Color.FromArgb(sat, sat, som);
alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value)); alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value));
reg = Color.FromArgb(lowRedBar.Value, lowGreenBar.Value, lowBlueBar.Value); reg = Color.FromArgb(lowRedBar.Value, lowGreenBar.Value, lowBlueBar.Value);
@ -717,24 +719,23 @@ namespace ScpServer
private void ToggleRainbow(bool on) private void ToggleRainbow(bool on)
{ {
numUDRainbow.Visible = on; numUDRainbow.Enabled = on;
if (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; pBController.BackgroundImage = Properties.Resources.rainbowC;
batteryLed.Text = "Battery Level Dim"; batteryLed.Text = "Battery Level Dim";
} }
else else
{ {
lowBatteryPanel.Enabled = batteryLed.Checked; lowBatteryPanel.Enabled = batteryLed.Checked;
pBRainbow.Location = new Point(216, pBRainbow.Location.Y); //pBRainbow.Location = new Point(216, pBRainbow.Location.Y);
pBController.BackgroundImage = null; pBController.BackgroundImage = null;
batteryLed.Text = "Battery Level Color"; batteryLed.Text = "Battery Level Color";
} }
lBspc.Visible = on; lBspc.Enabled = on;
lowBatteryPanel.Enabled = !on; lowBatteryPanel.Enabled = !on;
FullPanel.Enabled = !on; FullPanel.Enabled = !on;
flashLed.Enabled = !on;
} }
private Bitmap GreyscaleImage(Bitmap image) private Bitmap GreyscaleImage(Bitmap image)
@ -813,32 +814,6 @@ namespace ScpServer
Global.setButtonMouseSensitivity(device, (int)numUDMouseSens.Value); 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) private void LightBar_MouseDown(object sender, MouseEventArgs e)
{ {
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0); tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0);
@ -853,5 +828,12 @@ namespace ScpServer
{ {
this.Close(); 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);
}
} }
} }

View File

@ -175,4 +175,10 @@
<data name="USB" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="USB" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\USB.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\USB.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="export" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\export.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="import" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\imageres_import.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

View File

@ -130,6 +130,26 @@ namespace ScpServer.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap export {
get {
object obj = ResourceManager.GetObject("export", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap import {
get {
object obj = ResourceManager.GetObject("import", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@ namespace ScpServer
{ {
public partial class ScpForm : Form public partial class ScpForm : Form
{ {
double version = 9; double version = 9.111;
private DS4Control.Control rootHub; private DS4Control.Control rootHub;
delegate void LogDebugDelegate(DateTime Time, String Data); delegate void LogDebugDelegate(DateTime Time, String Data);
@ -105,6 +105,62 @@ namespace ScpServer
foreach (ToolStripMenuItem t in shortcuts) foreach (ToolStripMenuItem t in shortcuts)
t.DropDownItemClicked += Profile_Changed_Menu; 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(); //test.Start();
//processcheck.Start(); //processcheck.Start();
processcheck.Tick += processcheck_Tick; processcheck.Tick += processcheck_Tick;
@ -212,61 +268,6 @@ namespace ScpServer
catch { }; 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<string> profilenames = new List<string>(); List<string> profilenames = new List<string>();
public void RefreshProfiles() public void RefreshProfiles()
{ {
@ -441,8 +442,6 @@ namespace ScpServer
} }
protected void ControllerStatusChanged() protected void ControllerStatusChanged()
{ {
// If controllers are detected, but not checked, automatically check #1
//bool checkFirst = true;
String tooltip = "DS4Windows v" + version; String tooltip = "DS4Windows v" + version;
for (Int32 Index = 0; Index < Pads.Length; Index++) for (Int32 Index = 0; Index < Pads.Length; Index++)
{ {
@ -459,45 +458,37 @@ namespace ScpServer
Pads[Index].Enabled = true; Pads[Index].Enabled = true;
if (Pads[Index].Text != "Connecting...") if (Pads[Index].Text != "Connecting...")
{ {
cbs[Index].Enabled = true; Enable_Controls(Index, true);
ebns[Index].Enabled = true; MinimumSize = new Size(MinimumSize.Width, 161 + 29 * Index);
shortcuts[Index].Enabled = true;
Batteries[Index].Enabled = true;
MinimumSize = new Size(MinimumSize.Width, 190 + 29 * Index);
rootHub.DS4Controllers[Index].Report += ScpForm_Report; rootHub.DS4Controllers[Index].Report += ScpForm_Report;
} }
// As above
//if (checkFirst && (Pads[Index].Checked && Index != 0))
// checkFirst = false;
} }
else else
{ {
Pads[Index].Text = "Disconnected"; Pads[Index].Text = "Disconnected";
Pads[Index].Enabled = false; Enable_Controls(Index, false);
cbs[Index].Enabled = false;
ebns[Index].Enabled = false;
Batteries[Index].Enabled = false;
if (opt != null && opt.device == Index) if (opt != null && opt.device == Index)
{ {
opt.Close(); opt.Close();
opt = null; opt = null;
} }
shortcuts[Index].Enabled = false; shortcuts[Index].Enabled = false;
// As above
//if (Index == 0)
// checkFirst = false;
} }
if (rootHub.getShortDS4ControllerInfo(Index) != "None") if (rootHub.getShortDS4ControllerInfo(Index) != "None")
tooltip += "\n" + (Index + 1) + ": " + rootHub.getShortDS4ControllerInfo(Index); // Carefully stay under the 63 character limit. tooltip += "\n" + (Index + 1) + ": " + rootHub.getShortDS4ControllerInfo(Index); // Carefully stay under the 63 character limit.
} }
btnClear.Enabled = lvDebug.Items.Count > 0; btnClear.Enabled = lvDebug.Items.Count > 0;
// As above
//if (checkFirst && btnClear.Enabled)
// Pads[0].Checked = true;
notifyIcon1.Text = tooltip; 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); delegate void HotKeysDelegate(object sender, EventArgs e);
void ScpForm_Report(object sender, EventArgs e) void ScpForm_Report(object sender, EventArgs e)
{ {
@ -515,7 +506,7 @@ namespace ScpServer
string slide = rootHub.TouchpadSlide(0); string slide = rootHub.TouchpadSlide(0);
if (slide == "left") if (slide == "left")
{ {
if (cbs[i].SelectedIndex == 0) if (cbs[i].SelectedIndex <= 0)
cbs[i].SelectedIndex = cbs[0].Items.Count - 2; cbs[i].SelectedIndex = cbs[0].Items.Count - 2;
else else
cbs[i].SelectedIndex--; 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) private void tsBNewProfile_Click(object sender, EventArgs e)
{ {
ShowOptions(4, ""); ShowOptions(4, "");
@ -593,7 +598,37 @@ namespace ScpServer
MTB.FormClosed += delegate { toolStrip1.Enabled = true; lBProfiles.Enabled = true; }; 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; Options opt;
private System.Drawing.Size oldsize; private System.Drawing.Size oldsize;
private void ShowOptions(int devID, string profile) private void ShowOptions(int devID, string profile)
@ -625,8 +660,8 @@ namespace ScpServer
toolStrip1.Enabled = true; toolStrip1.Enabled = true;
}; };
oldsize = this.Size; oldsize = this.Size;
if (this.Size.Height < 470) if (this.Size.Height < 442)
this.Size = new System.Drawing.Size(this.Size.Width, 470); this.Size = new System.Drawing.Size(this.Size.Width, 442);
if (this.Size.Width < 910) if (this.Size.Width < 910)
this.Size = new System.Drawing.Size(910, this.Size.Height); this.Size = new System.Drawing.Size(910, this.Size.Height);
tabMain.SelectedIndex = 1; tabMain.SelectedIndex = 1;
@ -652,19 +687,7 @@ namespace ScpServer
if (((ToolStripMenuItem)em.DropDownItems[t]).Checked) if (((ToolStripMenuItem)em.DropDownItems[t]).Checked)
ShowOptions(i, ((ToolStripMenuItem)em.DropDownItems[t]).Text); 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) private void lnkControllers_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{ {
System.Diagnostics.Process.Start("control", "joy.cpl"); System.Diagnostics.Process.Start("control", "joy.cpl");
@ -776,39 +799,11 @@ namespace ScpServer
private void llbHelp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) private void llbHelp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{ {
Hotkeys hotkeysForm = new Hotkeys(); Hotkeys hotkeysForm = new Hotkeys(this);
hotkeysForm.Icon = this.Icon; hotkeysForm.Icon = this.Icon;
hotkeysForm.ShowDialog(); 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) private void StartWindowsCheckBox_CheckedChanged(object sender, EventArgs e)
{ {
RegistryKey KeyLoc = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); RegistryKey KeyLoc = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
@ -824,15 +819,15 @@ namespace ScpServer
WP.ShowDialog(); WP.ShowDialog();
} }
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) private void tabMain_SelectedIndexChanged(object sender, EventArgs e)
{ {
lbLastMessage.Visible = tabMain.SelectedIndex != 2; lbLastMessage.Visible = tabMain.SelectedIndex != 2;
if (tabMain.SelectedIndex == 3 && opt == null) 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; oldsize = Size;
if (this.Size.Height < 355) if (this.Size.Height < 340)
this.Size = new System.Drawing.Size(this.Size.Width, 355); this.Size = new System.Drawing.Size(this.Size.Width, 340);
if (this.Size.Width < 755) if (this.Size.Width < 755)
this.Size = new System.Drawing.Size(755, this.Size.Height); 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 public class ThemeUtil

View File

@ -6302,90 +6302,7 @@
<metadata name="openProfiles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="openProfiles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>449, 17</value> <value>449, 17</value>
</metadata> </metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <data name="pBStatus1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>568, 17</value>
</metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>568, 17</value>
</metadata>
<data name="tsBDeleteProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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=
</value>
</data>
<data name="tSBDupProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADQSURBVDhPlZCxCsIwEIbziO76CL6CXYNjJl1dMnQpLobu
Lm7ViuCkUwW1jtItcmdPbXoh8YOflHD5+nNCa225iFhg2AXu8jyPk/gEQJSEhsvz3a6PV/yGh8aYT9pR
Hq4BkCQJm14rEuxON2ywKi423VQ47EKS9ukbt0HTPPH0CQCl1FcSajBdHuwk3aNYSomPKR2BC9cAqB81
picINRgvSjucb+1AFXj/dwPaDZ0dgZssy9gGoxnTwAcsjIC//gYICmAACO7ABwl8RAlCEUKIFyWXYHlY
K643AAAAAElFTkSuQmCC
</value>
</data>
<data name="pBStatus4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACcAAAAUCAYAAAAOTSQ2AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
bGUAAEjHnZZ3VFTXFofPvXd6oc0wAlKG3rvAANJ7k15FYZgZYCgDDjM0sSGiAhFFRJoiSFDEgNFQJFZE
sRAUVLAHJAgoMRhFVCxvRtaLrqy89/Ly++Osb+2z97n77L3PWhcAkqcvl5cGSwGQyhPwgzyc6RGRUXTs
AIABHmCAKQBMVka6X7B7CBDJy82FniFyAl8EAfB6WLwCcNPQM4BOB/+fpFnpfIHomAARm7M5GSwRF4g4
JUuQLrbPipgalyxmGCVmvihBEcuJOWGRDT77LLKjmNmpPLaIxTmns1PZYu4V8bZMIUfEiK+ICzO5nCwR
3xKxRoowlSviN+LYVA4zAwAUSWwXcFiJIjYRMYkfEuQi4uUA4EgJX3HcVyzgZAvEl3JJS8/hcxMSBXQd
li7d1NqaQffkZKVwBALDACYrmcln013SUtOZvBwAFu/8WTLi2tJFRbY0tba0NDQzMv2qUP91829K3NtF
ehn4uWcQrf+L7a/80hoAYMyJarPziy2uCoDOLQDI3fti0zgAgKSobx3Xv7oPTTwviQJBuo2xcVZ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sEGyvLkuq6FjHYVFVVwmmatioMsPId
sLGiKChNUwrDULB2YxJWvgNOiU0dj8cHn9gaYOVSEIZzyo1JPhXIyiUg7Ha7iXPGcSxOiSD8l25tICtf
4bquCMM5T6fTj3cMQXCYZVm2/afEcRw6n88igHv5EYgZOBwO28YBnFXX9acPxuyv+RJYqQqsVAVWqgIr
1WDefQHxFbbcLCQjmgAAAABJRU5ErkJggg==
</value>
</data>
<data name="pBStatus3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAACcAAAAUCAYAAAAOTSQ2AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH iVBORw0KGgoAAAANSUhEUgAAACcAAAAUCAYAAAAOTSQ2AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@ -6497,7 +6414,7 @@
1WDefQHxFbbcLCQjmgAAAABJRU5ErkJggg== 1WDefQHxFbbcLCQjmgAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="pBStatus1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="pBStatus3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAACcAAAAUCAYAAAAOTSQ2AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH iVBORw0KGgoAAAANSUhEUgAAACcAAAAUCAYAAAAOTSQ2AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@ -6553,4 +6470,101 @@
1WDefQHxFbbcLCQjmgAAAABJRU5ErkJggg== 1WDefQHxFbbcLCQjmgAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="pBStatus4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACcAAAAUCAYAAAAOTSQ2AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
bGUAAEjHnZZ3VFTXFofPvXd6oc0wAlKG3rvAANJ7k15FYZgZYCgDDjM0sSGiAhFFRJoiSFDEgNFQJFZE
sRAUVLAHJAgoMRhFVCxvRtaLrqy89/Ly++Osb+2z97n77L3PWhcAkqcvl5cGSwGQyhPwgzyc6RGRUXTs
AIABHmCAKQBMVka6X7B7CBDJy82FniFyAl8EAfB6WLwCcNPQM4BOB/+fpFnpfIHomAARm7M5GSwRF4g4
JUuQLrbPipgalyxmGCVmvihBEcuJOWGRDT77LLKjmNmpPLaIxTmns1PZYu4V8bZMIUfEiK+ICzO5nCwR
3xKxRoowlSviN+LYVA4zAwAUSWwXcFiJIjYRMYkfEuQi4uUA4EgJX3HcVyzgZAvEl3JJS8/hcxMSBXQd
li7d1NqaQffkZKVwBALDACYrmcln013SUtOZvBwAFu/8WTLi2tJFRbY0tba0NDQzMv2qUP91829K3NtF
ehn4uWcQrf+L7a/80hoAYMyJarPziy2uCoDOLQDI3fti0zgAgKSobx3Xv7oPTTwviQJBuo2xcVZWlhGX
wzISF/QP/U+Hv6GvvmckPu6P8tBdOfFMYYqALq4bKy0lTcinZ6QzWRy64Z+H+B8H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Zzyo1JPhXIyiUg7Ha7iXPGcSxOiSD8l25tICtf
4bquCMM5T6fTj3cMQXCYZVm2/afEcRw6n88igHv5EYgZOBwO28YBnFXX9acPxuyv+RJYqQqsVAVWqgIr
1WDefQHxFbbcLCQjmgAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>568, 17</value>
</metadata>
<data name="tsBDeleteProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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=
</value>
</data>
<data name="tSBDupProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADQSURBVDhPlZCxCsIwEIbziO76CL6CXYNjJl1dMnQpLobu
Lm7ViuCkUwW1jtItcmdPbXoh8YOflHD5+nNCa225iFhg2AXu8jyPk/gEQJSEhsvz3a6PV/yGh8aYT9pR
Hq4BkCQJm14rEuxON2ywKi423VQ47EKS9ukbt0HTPPH0CQCl1FcSajBdHuwk3aNYSomPKR2BC9cAqB81
picINRgvSjucb+1AFXj/dwPaDZ0dgZssy9gGoxnTwAcsjIC//gYICmAACO7ABwl8RAlCEUKIFyWXYHlY
K643AAAAAElFTkSuQmCC
</value>
</data>
<data name="tSBExportProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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==
</value>
</data>
<metadata name="saveProfiles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>673, 17</value>
</metadata>
</root> </root>

View File

@ -63,6 +63,8 @@ namespace ScpServer
foreach (string st in lods) foreach (string st in lods)
//if (!st.Contains("etup") && !st.Contains("dotnet") && !st.Contains("SETUP") && !st.Contains("edist") && !st.Contains("nstall")) //if (!st.Contains("etup") && !st.Contains("dotnet") && !st.Contains("SETUP") && !st.Contains("edist") && !st.Contains("nstall"))
listBox2.Items.Add(Path.GetFileNameWithoutExtension(st)); 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) private void listBox2_SelectedIndexChanged(object sender, EventArgs e)
@ -72,6 +74,8 @@ namespace ScpServer
label1.Text = lods[listBox2.SelectedIndex]; label1.Text = lods[listBox2.SelectedIndex];
LoadP(); LoadP();
} }
else
label1.Text = "";
} }
protected String m_Profile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool\\Auto Profiles.xml"; protected String m_Profile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool\\Auto Profiles.xml";