From 0f4297bd9ee82422996ce865159f9827ac5e5464 Mon Sep 17 00:00:00 2001 From: jays2kings Date: Mon, 13 Oct 2014 17:56:04 -0400 Subject: [PATCH] Version 1.4.0.7 Improved mapping support: can better handle the switching of controls: ie triangle and circle/dpad and left stick/L1+R1 and L2+R2. If you have a profile with swap buttons, they may not work until you open the profile in settings and resave. Servers moved to ds4winsdows.com Remove DS4Windows from Alt+tab menu if minimized to tray (thanks youturnjason) Basic support for command line arguments (right now just "-stop" is supported: starts program up without starting the ds4) --- DS4Control/Mapping.cs | 132 +++++++++++++------------ DS4Tool/Options.Designer.cs | 64 ++++++------ DS4Tool/Options.cs | 8 +- DS4Tool/Options.resx | 150 ++++++++++++++--------------- DS4Tool/Program.cs | 4 +- DS4Tool/Properties/AssemblyInfo.cs | 4 +- DS4Tool/ScpForm.cs | 29 ++++-- DS4Tool/WelcomeDialog.cs | 2 +- 8 files changed, 206 insertions(+), 187 deletions(-) diff --git a/DS4Control/Mapping.cs b/DS4Control/Mapping.cs index f27bee2..b409554 100644 --- a/DS4Control/Mapping.cs +++ b/DS4Control/Mapping.cs @@ -666,7 +666,7 @@ namespace DS4Control Global.getShiftCustomButton(device, customButton.Key) == X360Controls.None)) { if (customButton.Key == DS4Controls.Square) - Console.WriteLine("hello"); + Console.WriteLine("hello"); DS4KeyType keyType = Global.getCustomKeyType(device, customButton.Key); int keyvalue = 0; switch (customButton.Value) @@ -702,68 +702,73 @@ namespace DS4Control //once++; - resetToDefaultValue(customButton.Key, MappedState); // erase default mappings for things that are remapped + if (customButton.Key == DS4Controls.L2 || customButton.Key == DS4Controls.R2 || + customButton.Key == DS4Controls.LXNeg || customButton.Key == DS4Controls.LXPos || + customButton.Key == DS4Controls.LYNeg || customButton.Key == DS4Controls.LYPos || + customButton.Key == DS4Controls.RXNeg || customButton.Key == DS4Controls.RXPos || + customButton.Key == DS4Controls.RYNeg || customButton.Key == DS4Controls.RYPos) + resetToDefaultValue(customButton.Key, MappedState); // erase default mappings for things that are remapped switch (customButton.Value) { case X360Controls.A: - if (!MappedState.Cross) - MappedState.Cross = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.Cross) + MappedState.Cross = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.B: - if (!MappedState.Circle) - MappedState.Circle = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.Circle) + MappedState.Circle = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.X: - if (!MappedState.Square) - MappedState.Square = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.Square) + MappedState.Square = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.Y: - if (!MappedState.Triangle) - MappedState.Triangle = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.Triangle) + MappedState.Triangle = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.LB: - if (!MappedState.L1) - MappedState.L1 = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.L1) + MappedState.L1 = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.LS: - if (!MappedState.L3) - MappedState.L3 = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.L3) + MappedState.L3 = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.RB: - if (!MappedState.R1) - MappedState.R1 = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.R1) + MappedState.R1 = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.RS: - if (!MappedState.R3) - MappedState.R3 = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.R3) + MappedState.R3 = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.DpadUp: - if (!MappedState.DpadUp) - MappedState.DpadUp = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.DpadUp) + MappedState.DpadUp = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.DpadDown: - if (!MappedState.DpadDown) - MappedState.DpadDown = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.DpadDown) + MappedState.DpadDown = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.DpadLeft: - if (!MappedState.DpadLeft) - MappedState.DpadLeft = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.DpadLeft) + MappedState.DpadLeft = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.DpadRight: - if (!MappedState.DpadRight) - MappedState.DpadRight = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.DpadRight) + MappedState.DpadRight = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.Guide: - if (!MappedState.PS) - MappedState.PS = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.PS) + MappedState.PS = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.Back: - if (!MappedState.Share) - MappedState.Share = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.Share) + MappedState.Share = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.Start: - if (!MappedState.Options) - MappedState.Options = getBoolMapping(customButton.Key, cState, eState); + //if (!MappedState.Options) + MappedState.Options = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.LXNeg: if (LXChanged) @@ -864,8 +869,7 @@ namespace DS4Control } } } - //if (!LX) - if (Math.Abs(127 - MappedState.LX) <= 5)// || (Math.Abs(127 - cState.LX) > 5)) + if (Math.Abs(127 - MappedState.LX) <= 5) MappedState.LX = cState.LX; if (Math.Abs(127 - MappedState.LY) <= 5) MappedState.LY = cState.LY; @@ -1025,8 +1029,6 @@ namespace DS4Control // resetToDefaultValue(customButton.Key, MappedState); // erase default mappings for things that are remapped foreach (KeyValuePair customButton in customButtons) { - if (customButton.Key == DS4Controls.Square) - Console.WriteLine("Hi"); DS4KeyType keyType = Global.getShiftCustomKeyType(device, customButton.Key); int keyvalue = 0; switch (customButton.Value) @@ -1061,108 +1063,112 @@ namespace DS4Control bool RYChanged = Math.Abs(127 - MappedState.RY) <= 5; //once++; - - resetToDefaultValue(customButton.Key, MappedState); // erase default mappings for things that are remapped + if (customButton.Key == DS4Controls.L2 || customButton.Key == DS4Controls.R2 || + customButton.Key == DS4Controls.LXNeg || customButton.Key == DS4Controls.LXPos || + customButton.Key == DS4Controls.LYNeg || customButton.Key == DS4Controls.LYPos || + customButton.Key == DS4Controls.RXNeg || customButton.Key == DS4Controls.RXPos || + customButton.Key == DS4Controls.RYNeg || customButton.Key == DS4Controls.RYPos) + resetToDefaultValue(customButton.Key, MappedState); // erase default mappings for things that are remapped switch (customButton.Value) { case X360Controls.A: - if (!MappedState.Cross) + //if (!MappedState.Cross) MappedState.Cross = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.B: - if (!MappedState.Circle) + //if (!MappedState.Circle) MappedState.Circle = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.X: - if (!MappedState.Square) + //if (!MappedState.Square) MappedState.Square = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.Y: - if (!MappedState.Triangle) + //if (!MappedState.Triangle) MappedState.Triangle = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.LB: - if (!MappedState.L1) + //if (!MappedState.L1) MappedState.L1 = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.LS: - if (!MappedState.L3) + //if (!MappedState.L3) MappedState.L3 = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.RB: - if (!MappedState.R1) + //if (!MappedState.R1) MappedState.R1 = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.RS: - if (!MappedState.R3) + //if (!MappedState.R3) MappedState.R3 = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.DpadUp: - if (!MappedState.DpadUp) + //if (!MappedState.DpadUp) MappedState.DpadUp = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.DpadDown: - if (!MappedState.DpadDown) + //if (!MappedState.DpadDown) MappedState.DpadDown = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.DpadLeft: - if (!MappedState.DpadLeft) + //if (!MappedState.DpadLeft) MappedState.DpadLeft = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.DpadRight: - if (!MappedState.DpadRight) + //if (!MappedState.DpadRight) MappedState.DpadRight = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.Guide: - if (!MappedState.PS) + //if (!MappedState.PS) MappedState.PS = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.Back: - if (!MappedState.Share) + //if (!MappedState.Share) MappedState.Share = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.Start: - if (!MappedState.Options) + //if (!MappedState.Options) MappedState.Options = getBoolMapping(customButton.Key, cState, eState); break; case X360Controls.LXNeg: - if (LXChanged) + //if (LXChanged) MappedState.LX = getXYAxisMapping(device, customButton.Key, cState, eState); break; case X360Controls.LYNeg: - if (LYChanged) + //if (LYChanged) MappedState.LY = getXYAxisMapping(device, customButton.Key, cState, eState); break; case X360Controls.RXNeg: - if (RXChanged) + //if (RXChanged) MappedState.RX = getXYAxisMapping(device, customButton.Key, cState, eState); break; case X360Controls.RYNeg: - if (RYChanged) + //if (RYChanged) MappedState.RY = getXYAxisMapping(device, customButton.Key, cState, eState); break; case X360Controls.LXPos: - if (LXChanged) + //if (LXChanged) MappedState.LX = getXYAxisMapping(device, customButton.Key, cState, eState, true); break; case X360Controls.LYPos: - if (LYChanged) + //if (LYChanged) MappedState.LY = getXYAxisMapping(device, customButton.Key, cState, eState, true); break; case X360Controls.RXPos: - if (RXChanged) + //if (RXChanged) MappedState.RX = getXYAxisMapping(device, customButton.Key, cState, eState, true); break; case X360Controls.RYPos: - if (RYChanged) + //if (RYChanged) MappedState.RY = getXYAxisMapping(device, customButton.Key, cState, eState, true); break; case X360Controls.LT: - if (MappedState.L2 == 0) + //if (MappedState.L2 == 0) MappedState.L2 = getByteMapping(device, customButton.Key, cState, eState); break; case X360Controls.RT: - if (MappedState.R2 == 0) + //if (MappedState.R2 == 0) MappedState.R2 = getByteMapping(device, customButton.Key, cState, eState); break; case X360Controls.LeftMouse: diff --git a/DS4Tool/Options.Designer.cs b/DS4Tool/Options.Designer.cs index b29ea9c..6294d3c 100644 --- a/DS4Tool/Options.Designer.cs +++ b/DS4Tool/Options.Designer.cs @@ -29,6 +29,8 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Options)); + this.bnL2 = new System.Windows.Forms.Button(); + this.bnR2 = new System.Windows.Forms.Button(); this.bnTouchUpper = new System.Windows.Forms.Button(); this.bnTouchMulti = new System.Windows.Forms.Button(); this.bnTouchRight = new System.Windows.Forms.Button(); @@ -45,9 +47,7 @@ this.bnUp = new System.Windows.Forms.Button(); this.btnLeftStick = new System.Windows.Forms.Button(); this.bnDown = new System.Windows.Forms.Button(); - this.bnL2 = new System.Windows.Forms.Button(); this.bnRight = new System.Windows.Forms.Button(); - this.bnR2 = new System.Windows.Forms.Button(); this.bnLeft = new System.Windows.Forms.Button(); this.bnL1 = new System.Windows.Forms.Button(); this.bnOptions = new System.Windows.Forms.Button(); @@ -300,6 +300,34 @@ ((System.ComponentModel.ISupportInitialize)(this.tBL2)).BeginInit(); this.SuspendLayout(); // + // bnL2 + // + this.bnL2.BackColor = System.Drawing.Color.Transparent; + resources.ApplyResources(this.bnL2, "bnL2"); + this.bnL2.Cursor = System.Windows.Forms.Cursors.Default; + this.bnL2.FlatAppearance.BorderColor = System.Drawing.Color.Red; + this.bnL2.FlatAppearance.BorderSize = 0; + this.bnL2.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control; + this.bnL2.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.Control; + this.bnL2.ForeColor = System.Drawing.SystemColors.WindowText; + this.bnL2.Name = "bnL2"; + this.bnL2.UseVisualStyleBackColor = false; + this.bnL2.Click += new System.EventHandler(this.Show_ControlsBn); + // + // bnR2 + // + this.bnR2.BackColor = System.Drawing.Color.Transparent; + resources.ApplyResources(this.bnR2, "bnR2"); + this.bnR2.Cursor = System.Windows.Forms.Cursors.Default; + this.bnR2.FlatAppearance.BorderColor = System.Drawing.Color.Red; + this.bnR2.FlatAppearance.BorderSize = 0; + this.bnR2.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control; + this.bnR2.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.Control; + this.bnR2.ForeColor = System.Drawing.SystemColors.WindowText; + this.bnR2.Name = "bnR2"; + this.bnR2.UseVisualStyleBackColor = false; + this.bnR2.Click += new System.EventHandler(this.Show_ControlsBn); + // // bnTouchUpper // this.bnTouchUpper.BackColor = System.Drawing.Color.Transparent; @@ -381,14 +409,14 @@ this.MainPanel.Controls.Add(this.bnUp); this.MainPanel.Controls.Add(this.btnLeftStick); this.MainPanel.Controls.Add(this.bnDown); - this.MainPanel.Controls.Add(this.bnL2); this.MainPanel.Controls.Add(this.bnRight); - this.MainPanel.Controls.Add(this.bnR2); this.MainPanel.Controls.Add(this.bnLeft); this.MainPanel.Controls.Add(this.bnL1); this.MainPanel.Controls.Add(this.bnOptions); this.MainPanel.Controls.Add(this.bnPS); this.MainPanel.Controls.Add(this.bnShare); + this.MainPanel.Controls.Add(this.bnL2); + this.MainPanel.Controls.Add(this.bnR2); resources.ApplyResources(this.MainPanel, "MainPanel"); this.MainPanel.Name = "MainPanel"; // @@ -540,20 +568,6 @@ this.bnDown.UseVisualStyleBackColor = false; this.bnDown.Click += new System.EventHandler(this.Show_ControlsBn); // - // bnL2 - // - this.bnL2.BackColor = System.Drawing.Color.Transparent; - resources.ApplyResources(this.bnL2, "bnL2"); - this.bnL2.Cursor = System.Windows.Forms.Cursors.Default; - this.bnL2.FlatAppearance.BorderColor = System.Drawing.Color.Red; - this.bnL2.FlatAppearance.BorderSize = 0; - this.bnL2.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control; - this.bnL2.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.Control; - this.bnL2.ForeColor = System.Drawing.SystemColors.WindowText; - this.bnL2.Name = "bnL2"; - this.bnL2.UseVisualStyleBackColor = false; - this.bnL2.Click += new System.EventHandler(this.Show_ControlsBn); - // // bnRight // this.bnRight.BackColor = System.Drawing.Color.Transparent; @@ -568,20 +582,6 @@ this.bnRight.UseVisualStyleBackColor = false; this.bnRight.Click += new System.EventHandler(this.Show_ControlsBn); // - // bnR2 - // - this.bnR2.BackColor = System.Drawing.Color.Transparent; - resources.ApplyResources(this.bnR2, "bnR2"); - this.bnR2.Cursor = System.Windows.Forms.Cursors.Default; - this.bnR2.FlatAppearance.BorderColor = System.Drawing.Color.Red; - this.bnR2.FlatAppearance.BorderSize = 0; - this.bnR2.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control; - this.bnR2.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.Control; - this.bnR2.ForeColor = System.Drawing.SystemColors.WindowText; - this.bnR2.Name = "bnR2"; - this.bnR2.UseVisualStyleBackColor = false; - this.bnR2.Click += new System.EventHandler(this.Show_ControlsBn); - // // bnLeft // this.bnLeft.BackColor = System.Drawing.Color.Transparent; diff --git a/DS4Tool/Options.cs b/DS4Tool/Options.cs index 44c918f..cd500b7 100644 --- a/DS4Tool/Options.cs +++ b/DS4Tool/Options.cs @@ -34,11 +34,11 @@ namespace ScpServer root = rt; g = CreateGraphics(); greyscale = GreyscaleImage((Bitmap)pBRainbow.Image); - foreach (System.Windows.Forms.Control control in MainPanel.Controls) + foreach (System.Windows.Forms.Control control in SticksPanel.Controls) if (control is Button) if (!((Button)control).Name.Contains("btn")) buttons.Add((Button)control); - foreach (System.Windows.Forms.Control control in SticksPanel.Controls) + foreach (System.Windows.Forms.Control control in MainPanel.Controls) if (control is Button) if (!((Button)control).Name.Contains("btn")) buttons.Add((Button)control); @@ -58,6 +58,10 @@ namespace ScpServer if (control is Button) if (!((Button)control).Name.Contains("sbtn")) subbuttons.Add((Button)control); + string butts = ""; + foreach (Button b in buttons) + butts += "\n" + b.Name; + //MessageBox.Show(butts); root.lbLastMessage.ForeColor = Color.Black; root.lbLastMessage.Text = "Hover over items to see description or more about"; foreach (System.Windows.Forms.Control control in Controls) diff --git a/DS4Tool/Options.resx b/DS4Tool/Options.resx index 8bc157e..ef4cb79 100644 --- a/DS4Tool/Options.resx +++ b/DS4Tool/Options.resx @@ -118,6 +118,74 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + None + + + Flat + + + NoControl + + + + 31, 0 + + + 43, 12 + + + + 90 + + + Left Trigger + + + bnL2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MainPanel + + + 21 + + + None + + + Flat + + + NoControl + + + 174, 0 + + + 40, 13 + + + 89 + + + Right Trigger + + + bnR2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MainPanel + + + 22 + None @@ -127,14 +195,12 @@ NoControl - 84, 25 78, 16 - 193 @@ -615,39 +681,6 @@ 14 - - None - - - Flat - - - NoControl - - - 31, 0 - - - 43, 12 - - - 90 - - - Left Trigger - - - bnL2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MainPanel - - - 15 - None @@ -679,40 +712,7 @@ MainPanel - 16 - - - None - - - Flat - - - NoControl - - - 174, 0 - - - 40, 13 - - - 89 - - - Right Trigger - - - bnR2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MainPanel - - - 17 + 15 None @@ -745,7 +745,7 @@ MainPanel - 18 + 16 None @@ -778,7 +778,7 @@ MainPanel - 19 + 17 None @@ -811,7 +811,7 @@ MainPanel - 20 + 18 None @@ -844,7 +844,7 @@ MainPanel - 21 + 19 None @@ -877,7 +877,7 @@ MainPanel - 22 + 20 6, 42 @@ -6784,7 +6784,7 @@ with profile advColorDialog - ScpServer.AdvancedColorDialog, DS4Windows, Version=1.4.0.6, Culture=neutral, PublicKeyToken=null + ScpServer.AdvancedColorDialog, DS4Windows, Version=1.4.0.61, Culture=neutral, PublicKeyToken=null Options diff --git a/DS4Tool/Program.cs b/DS4Tool/Program.cs index 0c015c4..1d8f651 100644 --- a/DS4Tool/Program.cs +++ b/DS4Tool/Program.cs @@ -20,7 +20,7 @@ namespace ScpServer /// The main entry point for the application. /// [STAThread] - static void Main() + static void Main(string [] args) { System.Runtime.GCSettings.LatencyMode = System.Runtime.GCLatencyMode.LowLatency; try @@ -38,7 +38,7 @@ namespace ScpServer { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new ScpForm()); + Application.Run(new ScpForm(args)); } else { diff --git a/DS4Tool/Properties/AssemblyInfo.cs b/DS4Tool/Properties/AssemblyInfo.cs index 91f80ac..a6c20f9 100644 --- a/DS4Tool/Properties/AssemblyInfo.cs +++ b/DS4Tool/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.0.61")] -[assembly: AssemblyFileVersion("1.4.0.61")] +[assembly: AssemblyVersion("1.4.0.7")] +[assembly: AssemblyFileVersion("1.4.0.7")] diff --git a/DS4Tool/ScpForm.cs b/DS4Tool/ScpForm.cs index 6da2c25..2150993 100644 --- a/DS4Tool/ScpForm.cs +++ b/DS4Tool/ScpForm.cs @@ -18,6 +18,7 @@ namespace ScpServer { public partial class ScpForm : Form { + public string[] arguements; private DS4Control.Control rootHub; delegate void LogDebugDelegate(DateTime Time, String Data); @@ -80,10 +81,10 @@ namespace ScpServer [DllImport("psapi.dll")] private static extern uint GetModuleFileNameEx(IntPtr hWnd, IntPtr hModule, StringBuilder lpFileName, int nSize); - public ScpForm() + public ScpForm(string [] args) { InitializeComponent(); - + arguements = args; ThemeUtil.SetTheme(lvDebug); SetupArrays(); //CheckDrivers(); @@ -228,8 +229,14 @@ namespace ScpServer } LoadP(); Global.ControllerStatusChange += ControllerStatusChange; - ControllerStatusChanged(); - if (btnStartStop.Enabled) + bool start = true; + foreach (string s in arguements) + if (s == "stop") + { + start = false; + break; + } + if (btnStartStop.Enabled && start) btnStartStop_Clicked(); startToolStripMenuItem.Text = btnStartStop.Text; cBNotifications.Checked = Global.getNotifications(); @@ -246,7 +253,7 @@ namespace ScpServer cBUpdateTime.SelectedIndex = 0; nUDUpdateTime.Value = checkwhen; } - Uri url = new Uri("https://dl.dropboxusercontent.com/u/16364552/DS4Windows/newest%20version.txt"); //Sorry other devs, gonna have to find your own server + Uri url = new Uri("http://ds4windows.com/Files/Builds/newest.txt"); //Sorry other devs, gonna have to find your own server if (checkwhen > 0 && DateTime.Now >= Global.getLastChecked() + TimeSpan.FromHours(checkwhen)) @@ -397,14 +404,14 @@ namespace ScpServer if (!File.Exists(exepath + "\\DS4Updater.exe") || (File.Exists(exepath + "\\DS4Updater.exe") && (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo("1.1.0.0") == -1))) { - Uri url2 = new Uri("https://dl.dropboxusercontent.com/u/16364552/DS4Windows/DS4Updater.exe"); + Uri url2 = new Uri("http://ds4windows.com/Files/DS4Updater.exe"); WebClient wc2 = new WebClient(); if (Global.appdatapath == exepath) wc2.DownloadFile(url2, exepath + "\\DS4Updater.exe"); else { MessageBox.Show(Properties.Resources.PleaseDownloadUpdater); - Process.Start("https://www.dropbox.com/s/tlqtdkdumdo0yir/DS4Updater.exe"); + Process.Start("http://ds4windows.com/Files/DS4Updater.exe"); } } Process p = new Process(); @@ -545,12 +552,14 @@ namespace ScpServer { this.Hide(); this.ShowInTaskbar = false; + this.FormBorderStyle = FormBorderStyle.SizableToolWindow; } else if (FormWindowState.Normal == this.WindowState) { this.Show(); this.ShowInTaskbar = true; + this.FormBorderStyle = FormBorderStyle.Sizable; } chData.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize); } @@ -1214,7 +1223,7 @@ namespace ScpServer private void lLBUpdate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - Uri url = new Uri("https://dl.dropboxusercontent.com/u/16364552/DS4Windows/newest%20version.txt"); //Sorry other devs, gonna have to find your own server + Uri url = new Uri("http://ds4windows.com/Files/Builds/newest.txt"); //Sorry other devs, gonna have to find your own server WebClient wct = new WebClient(); wct.DownloadFileAsync(url, Global.appdatapath + "\\version.txt"); wct.DownloadFileCompleted += wct_DownloadFileCompleted; @@ -1237,14 +1246,14 @@ namespace ScpServer if (!File.Exists(exepath + "\\DS4Updater.exe") || (File.Exists(exepath + "\\DS4Updater.exe") && (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo("1.1.0.0") == -1))) { - Uri url2 = new Uri("https://dl.dropboxusercontent.com/u/16364552/DS4Windows/DS4Updater.exe"); + Uri url2 = new Uri("http://ds4windows.com/Files/DS4Updater.exe"); WebClient wc2 = new WebClient(); if (Global.appdatapath == exepath) wc2.DownloadFile(url2, exepath + "\\DS4Updater.exe"); else { MessageBox.Show(Properties.Resources.PleaseDownloadUpdater); - Process.Start("https://www.dropbox.com/s/tlqtdkdumdo0yir/DS4Updater.exe"); + Process.Start("http://ds4windows.com/Files/DS4Updater.exe"); } } Process p = new Process(); diff --git a/DS4Tool/WelcomeDialog.cs b/DS4Tool/WelcomeDialog.cs index b2c7947..03ff05c 100644 --- a/DS4Tool/WelcomeDialog.cs +++ b/DS4Tool/WelcomeDialog.cs @@ -42,7 +42,7 @@ namespace ScpServer WebClient wb = new WebClient(); if (bnStep1.Text == Properties.Resources.Step1) { - wb.DownloadFileAsync(new Uri("https://docs.google.com/uc?authuser=0&id=0BwPaAe9M8N9mYVdPakJ6OXpMUlU&export=download"), Global.appdatapath + "\\VBus.zip"); + wb.DownloadFileAsync(new Uri("http://ds4windows.com/Files/Virtual Bus Driver.zip"), Global.appdatapath + "\\VBus.zip"); wb.DownloadProgressChanged += wb_DownloadProgressChanged; wb.DownloadFileCompleted += wb_DownloadFileCompleted; }