Merge branch 'jay' into vigem-udpserver

This commit is contained in:
Travis Nickles 2018-12-12 20:37:13 -06:00
commit b0797f4fcc
18 changed files with 468 additions and 588 deletions

View File

@ -188,7 +188,7 @@ namespace DS4Windows
Monitor.Pulse(busThrLck); Monitor.Pulse(busThrLck);
} }
public void ChangeUDPStatus(bool state) public void ChangeUDPStatus(bool state, bool openPort=true)
{ {
if (state && _udpServer == null) if (state && _udpServer == null)
{ {
@ -196,19 +196,26 @@ namespace DS4Windows
TestQueueBus(() => TestQueueBus(() =>
{ {
_udpServer = new UdpServer(GetPadDetailForIdx); _udpServer = new UdpServer(GetPadDetailForIdx);
var UDP_SERVER_PORT = Global.getUDPServerPortNum(); if (openPort)
try
{ {
_udpServer.Start(UDP_SERVER_PORT); // Change thread affinity of object to have normal priority
LogDebug("UDP server listening on port " + UDP_SERVER_PORT); Task.Run(() =>
} {
catch (System.Net.Sockets.SocketException ex) var UDP_SERVER_PORT = Global.getUDPServerPortNum();
{
var errMsg = String.Format("Couldn't start UDP server on port {0}, outside applications won't be able to access pad data ({1})", UDP_SERVER_PORT, ex.SocketErrorCode);
LogDebug(errMsg, true); try
AppLogger.LogToTray(errMsg, true, true); {
_udpServer.Start(UDP_SERVER_PORT);
LogDebug("UDP server listening on port " + UDP_SERVER_PORT);
}
catch (System.Net.Sockets.SocketException ex)
{
var errMsg = String.Format("Couldn't start UDP server on port {0}, outside applications won't be able to access pad data ({1})", UDP_SERVER_PORT, ex.SocketErrorCode);
LogDebug(errMsg, true);
AppLogger.LogToTray(errMsg, true, true);
}
}).Wait();
} }
udpChangeStatus = false; udpChangeStatus = false;
@ -353,7 +360,7 @@ namespace DS4Windows
if (isUsingUDPServer() && _udpServer == null) if (isUsingUDPServer() && _udpServer == null)
{ {
ChangeUDPStatus(true); ChangeUDPStatus(true, false);
while (udpChangeStatus == true) while (udpChangeStatus == true)
{ {
Thread.SpinWait(500); Thread.SpinWait(500);
@ -465,6 +472,25 @@ namespace DS4Windows
} }
running = true; running = true;
if (_udpServer != null)
{
//var UDP_SERVER_PORT = 26760;
var UDP_SERVER_PORT = Global.getUDPServerPortNum();
try
{
_udpServer.Start(UDP_SERVER_PORT);
LogDebug("UDP server listening on port " + UDP_SERVER_PORT);
}
catch (System.Net.Sockets.SocketException ex)
{
var errMsg = String.Format("Couldn't start UDP server on port {0}, outside applications won't be able to access pad data ({1})", UDP_SERVER_PORT, ex.SocketErrorCode);
LogDebug(errMsg, true);
AppLogger.LogToTray(errMsg, true, true);
}
}
} }
else else
{ {

View File

@ -5,156 +5,137 @@ namespace DS4Windows
{ {
class InputMethods class InputMethods
{ {
private static INPUT[] sendInputs = new INPUT[2]; // will allow for keyboard + mouse/tablet input within one SendInput call, or two mouse events
private static object lockob = new object();
public static void MoveCursorBy(int x, int y) public static void MoveCursorBy(int x, int y)
{ {
lock (lockob) if (x != 0 || y != 0)
{ {
if (x != 0 || y != 0) INPUT[] tempInput = new INPUT[1];
{ tempInput[0].Type = INPUT_MOUSE;
sendInputs[0].Type = INPUT_MOUSE; tempInput[0].Data.Mouse.ExtraInfo = IntPtr.Zero;
sendInputs[0].Data.Mouse.ExtraInfo = IntPtr.Zero; tempInput[0].Data.Mouse.Flags = MOUSEEVENTF_MOVE;
sendInputs[0].Data.Mouse.Flags = MOUSEEVENTF_MOVE; tempInput[0].Data.Mouse.MouseData = 0;
sendInputs[0].Data.Mouse.MouseData = 0; tempInput[0].Data.Mouse.Time = 0;
sendInputs[0].Data.Mouse.Time = 0; tempInput[0].Data.Mouse.X = x;
sendInputs[0].Data.Mouse.X = x; tempInput[0].Data.Mouse.Y = y;
sendInputs[0].Data.Mouse.Y = y; uint result = SendInput(1, tempInput, Marshal.SizeOf(tempInput[0]));
uint result = SendInput(1, sendInputs, Marshal.SizeOf(sendInputs[0]));
}
} }
} }
public static void MouseWheel(int vertical, int horizontal) public static void MouseWheel(int vertical, int horizontal)
{ {
lock (lockob) INPUT[] tempInput = new INPUT[2];
uint inputs = 0;
if (vertical != 0)
{ {
uint inputs = 0; tempInput[inputs].Type = INPUT_MOUSE;
if (vertical != 0) tempInput[inputs].Data.Mouse.ExtraInfo = IntPtr.Zero;
{ tempInput[inputs].Data.Mouse.Flags = MOUSEEVENTF_WHEEL;
sendInputs[inputs].Type = INPUT_MOUSE; tempInput[inputs].Data.Mouse.MouseData = (uint)vertical;
sendInputs[inputs].Data.Mouse.ExtraInfo = IntPtr.Zero; tempInput[inputs].Data.Mouse.Time = 0;
sendInputs[inputs].Data.Mouse.Flags = MOUSEEVENTF_WHEEL; tempInput[inputs].Data.Mouse.X = 0;
sendInputs[inputs].Data.Mouse.MouseData = (uint)vertical; tempInput[inputs].Data.Mouse.Y = 0;
sendInputs[inputs].Data.Mouse.Time = 0; inputs++;
sendInputs[inputs].Data.Mouse.X = 0;
sendInputs[inputs].Data.Mouse.Y = 0;
inputs++;
}
if (horizontal != 0)
{
sendInputs[inputs].Type = INPUT_MOUSE;
sendInputs[inputs].Data.Mouse.ExtraInfo = IntPtr.Zero;
sendInputs[inputs].Data.Mouse.Flags = MOUSEEVENTF_HWHEEL;
sendInputs[inputs].Data.Mouse.MouseData = (uint)horizontal;
sendInputs[inputs].Data.Mouse.Time = 0;
sendInputs[inputs].Data.Mouse.X = 0;
sendInputs[inputs].Data.Mouse.Y = 0;
inputs++;
}
SendInput(inputs, sendInputs, (int)inputs * Marshal.SizeOf(sendInputs[0]));
} }
if (horizontal != 0)
{
tempInput[inputs].Type = INPUT_MOUSE;
tempInput[inputs].Data.Mouse.ExtraInfo = IntPtr.Zero;
tempInput[inputs].Data.Mouse.Flags = MOUSEEVENTF_HWHEEL;
tempInput[inputs].Data.Mouse.MouseData = (uint)horizontal;
tempInput[inputs].Data.Mouse.Time = 0;
tempInput[inputs].Data.Mouse.X = 0;
tempInput[inputs].Data.Mouse.Y = 0;
inputs++;
}
SendInput(inputs, tempInput, (int)inputs * Marshal.SizeOf(tempInput[0]));
} }
public static void MouseEvent(uint mouseButton) public static void MouseEvent(uint mouseButton)
{ {
lock (lockob) INPUT[] tempInput = new INPUT[1];
{ tempInput[0].Type = INPUT_MOUSE;
sendInputs[0].Type = INPUT_MOUSE; tempInput[0].Data.Mouse.ExtraInfo = IntPtr.Zero;
sendInputs[0].Data.Mouse.ExtraInfo = IntPtr.Zero; tempInput[0].Data.Mouse.Flags = mouseButton;
sendInputs[0].Data.Mouse.Flags = mouseButton; tempInput[0].Data.Mouse.MouseData = 0;
sendInputs[0].Data.Mouse.MouseData = 0; tempInput[0].Data.Mouse.Time = 0;
sendInputs[0].Data.Mouse.Time = 0; tempInput[0].Data.Mouse.X = 0;
sendInputs[0].Data.Mouse.X = 0; tempInput[0].Data.Mouse.Y = 0;
sendInputs[0].Data.Mouse.Y = 0; uint result = SendInput(1, tempInput, Marshal.SizeOf(tempInput[0]));
uint result = SendInput(1, sendInputs, Marshal.SizeOf(sendInputs[0]));
}
} }
public static void MouseEvent(uint mouseButton, int type) public static void MouseEvent(uint mouseButton, int type)
{ {
lock (lockob) INPUT[] tempInput = new INPUT[1];
{ tempInput[0].Type = INPUT_MOUSE;
sendInputs[0].Type = INPUT_MOUSE; tempInput[0].Data.Mouse.ExtraInfo = IntPtr.Zero;
sendInputs[0].Data.Mouse.ExtraInfo = IntPtr.Zero; tempInput[0].Data.Mouse.Flags = mouseButton;
sendInputs[0].Data.Mouse.Flags = mouseButton; tempInput[0].Data.Mouse.MouseData = (uint)type;
sendInputs[0].Data.Mouse.MouseData = (uint)type; tempInput[0].Data.Mouse.Time = 0;
sendInputs[0].Data.Mouse.Time = 0; tempInput[0].Data.Mouse.X = 0;
sendInputs[0].Data.Mouse.X = 0; tempInput[0].Data.Mouse.Y = 0;
sendInputs[0].Data.Mouse.Y = 0; uint result = SendInput(1, tempInput, Marshal.SizeOf(tempInput[0]));
uint result = SendInput(1, sendInputs, Marshal.SizeOf(sendInputs[0]));
}
} }
public static void performSCKeyPress(ushort key) public static void performSCKeyPress(ushort key)
{ {
lock (lockob) INPUT[] tempInput = new INPUT[1];
{ tempInput[0].Type = INPUT_KEYBOARD;
sendInputs[0].Type = INPUT_KEYBOARD; tempInput[0].Data.Keyboard.ExtraInfo = IntPtr.Zero;
sendInputs[0].Data.Keyboard.ExtraInfo = IntPtr.Zero; tempInput[0].Data.Keyboard.Flags = KEYEVENTF_SCANCODE;
sendInputs[0].Data.Keyboard.Flags = KEYEVENTF_SCANCODE; tempInput[0].Data.Keyboard.Scan = MapVirtualKey(key, MAPVK_VK_TO_VSC);
sendInputs[0].Data.Keyboard.Scan = MapVirtualKey(key, MAPVK_VK_TO_VSC); tempInput[0].Data.Keyboard.Time = 0;
sendInputs[0].Data.Keyboard.Time = 0; tempInput[0].Data.Keyboard.Vk = key;
sendInputs[0].Data.Keyboard.Vk = key; uint result = SendInput(1, tempInput, Marshal.SizeOf(tempInput[0]));
uint result = SendInput(1, sendInputs, Marshal.SizeOf(sendInputs[0]));
}
} }
public static void performKeyPress(ushort key) public static void performKeyPress(ushort key)
{ {
lock (lockob) INPUT[] tempInput = new INPUT[1];
{ ushort scancode = scancodeFromVK(key);
ushort scancode = scancodeFromVK(key); bool extended = (scancode & 0x100) != 0;
bool extended = (scancode & 0x100) != 0; uint curflags = extended ? KEYEVENTF_EXTENDEDKEY : 0;
uint curflags = extended ? KEYEVENTF_EXTENDEDKEY : 0;
sendInputs[0].Type = INPUT_KEYBOARD; tempInput[0].Type = INPUT_KEYBOARD;
sendInputs[0].Data.Keyboard.ExtraInfo = IntPtr.Zero; tempInput[0].Data.Keyboard.ExtraInfo = IntPtr.Zero;
sendInputs[0].Data.Keyboard.Flags = curflags; tempInput[0].Data.Keyboard.Flags = curflags;
sendInputs[0].Data.Keyboard.Scan = scancode; tempInput[0].Data.Keyboard.Scan = scancode;
//sendInputs[0].Data.Keyboard.Flags = 1; //sendInputs[0].Data.Keyboard.Flags = 1;
//sendInputs[0].Data.Keyboard.Scan = 0; //sendInputs[0].Data.Keyboard.Scan = 0;
sendInputs[0].Data.Keyboard.Time = 0; tempInput[0].Data.Keyboard.Time = 0;
sendInputs[0].Data.Keyboard.Vk = key; tempInput[0].Data.Keyboard.Vk = key;
uint result = SendInput(1, sendInputs, Marshal.SizeOf(sendInputs[0])); uint result = SendInput(1, tempInput, Marshal.SizeOf(tempInput[0]));
}
} }
public static void performSCKeyRelease(ushort key) public static void performSCKeyRelease(ushort key)
{ {
lock (lockob) INPUT[] tempInput = new INPUT[1];
{ tempInput[0].Type = INPUT_KEYBOARD;
sendInputs[0].Type = INPUT_KEYBOARD; tempInput[0].Data.Keyboard.ExtraInfo = IntPtr.Zero;
sendInputs[0].Data.Keyboard.ExtraInfo = IntPtr.Zero; tempInput[0].Data.Keyboard.Flags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
sendInputs[0].Data.Keyboard.Flags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; tempInput[0].Data.Keyboard.Scan = MapVirtualKey(key, MAPVK_VK_TO_VSC);
sendInputs[0].Data.Keyboard.Scan = MapVirtualKey(key, MAPVK_VK_TO_VSC); tempInput[0].Data.Keyboard.Time = 0;
sendInputs[0].Data.Keyboard.Time = 0; //sendInputs[0].Data.Keyboard.Vk = MapVirtualKey(key, MAPVK_VK_TO_VSC);
//sendInputs[0].Data.Keyboard.Vk = MapVirtualKey(key, MAPVK_VK_TO_VSC); uint result = SendInput(1, tempInput, Marshal.SizeOf(tempInput[0]));
uint result = SendInput(1, sendInputs, Marshal.SizeOf(sendInputs[0]));
}
} }
public static void performKeyRelease(ushort key) public static void performKeyRelease(ushort key)
{ {
lock (lockob) INPUT[] tempInput = new INPUT[1];
{ ushort scancode = scancodeFromVK(key);
ushort scancode = scancodeFromVK(key); bool extended = (scancode & 0x100) != 0;
bool extended = (scancode & 0x100) != 0; uint curflags = extended ? KEYEVENTF_EXTENDEDKEY : 0;
uint curflags = extended ? KEYEVENTF_EXTENDEDKEY : 0;
sendInputs[0].Type = INPUT_KEYBOARD; tempInput[0].Type = INPUT_KEYBOARD;
sendInputs[0].Data.Keyboard.ExtraInfo = IntPtr.Zero; tempInput[0].Data.Keyboard.ExtraInfo = IntPtr.Zero;
sendInputs[0].Data.Keyboard.Flags = curflags | KEYEVENTF_KEYUP; tempInput[0].Data.Keyboard.Flags = curflags | KEYEVENTF_KEYUP;
sendInputs[0].Data.Keyboard.Scan = scancode; tempInput[0].Data.Keyboard.Scan = scancode;
//sendInputs[0].Data.Keyboard.Flags = KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP; //sendInputs[0].Data.Keyboard.Flags = KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP;
//sendInputs[0].Data.Keyboard.Scan = 0; //sendInputs[0].Data.Keyboard.Scan = 0;
sendInputs[0].Data.Keyboard.Time = 0; tempInput[0].Data.Keyboard.Time = 0;
sendInputs[0].Data.Keyboard.Vk = key; tempInput[0].Data.Keyboard.Vk = key;
uint result = SendInput(1, sendInputs, Marshal.SizeOf(sendInputs[0])); uint result = SendInput(1, tempInput, Marshal.SizeOf(tempInput[0]));
}
} }
private static ushort scancodeFromVK(uint vkey) private static ushort scancodeFromVK(uint vkey)

View File

@ -779,28 +779,28 @@ namespace DS4Windows
if (absX <= 0.4) if (absX <= 0.4)
{ {
outputX = 0.481 * absX; outputX = 0.54 * absX;
} }
else if (absX <= 0.75) else if (absX <= 0.75)
{ {
outputX = absX - 0.2076; outputX = absX - 0.184;
} }
else if (absX > 0.75) else if (absX > 0.75)
{ {
outputX = (absX * 1.8304) - 0.8304; outputX = (absX * 1.736) - 0.736;
} }
if (absY <= 0.4) if (absY <= 0.4)
{ {
outputY = 0.481 * absY; outputY = 0.54 * absY;
} }
else if (absY <= 0.75) else if (absY <= 0.75)
{ {
outputY = absY - 0.2076; outputY = absY - 0.184;
} }
else if (absY > 0.75) else if (absY > 0.75)
{ {
outputY = (absY * 1.8304) - 0.8304; outputY = (absY * 1.736) - 0.736;
} }
dState.LX = (byte)(outputX * signX * 127.5 + 127.5); dState.LX = (byte)(outputX * signX * 127.5 + 127.5);
@ -839,28 +839,28 @@ namespace DS4Windows
if (absX <= 0.4) if (absX <= 0.4)
{ {
outputX = 0.481 * absX; outputX = 0.545 * absX;
} }
else if (absX <= 0.75) else if (absX <= 0.75)
{ {
outputX = absX - 0.2076; outputX = absX - 0.182;
} }
else if (absX > 0.75) else if (absX > 0.75)
{ {
outputX = (absX * 1.8304) - 0.8304; outputX = (absX * 1.728) - 0.728;
} }
if (absY <= 0.4) if (absY <= 0.4)
{ {
outputY = 0.481 * absY; outputY = 0.545 * absY;
} }
else if (absY <= 0.75) else if (absY <= 0.75)
{ {
outputY = absY - 0.2076; outputY = absY - 0.182;
} }
else if (absY > 0.75) else if (absY > 0.75)
{ {
outputY = (absY * 1.8304) - 0.8304; outputY = (absY * 1.728) - 0.728;
} }
dState.RX = (byte)(outputX * signX * 127.5 + 127.5); dState.RX = (byte)(outputX * signX * 127.5 + 127.5);

View File

@ -1,36 +0,0 @@
namespace DS4Windows
{
partial class ScpDevice
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}

View File

@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security; using System.Security;
@ -9,7 +8,7 @@ using Microsoft.Win32.SafeHandles;
namespace DS4Windows namespace DS4Windows
{ {
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
public partial class ScpDevice : Component public class ScpDevice
{ {
public virtual Boolean IsActive public virtual Boolean IsActive
{ {
@ -21,23 +20,8 @@ namespace DS4Windows
get { return m_Path; } get { return m_Path; }
} }
public ScpDevice()
{
InitializeComponent();
}
public ScpDevice(IContainer container)
{
container.Add(this);
InitializeComponent();
}
public ScpDevice(String Class) public ScpDevice(String Class)
{ {
InitializeComponent();
this.m_Class = new Guid(Class); this.m_Class = new Guid(Class);
} }

View File

@ -1,13 +1,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles; using Microsoft.Win32.SafeHandles;
namespace DS4Windows namespace DS4Windows
{ {
public partial class X360Device : ScpDevice public class X360Device : ScpDevice
{ {
private const String DS3_BUS_CLASS_GUID = "{F679F562-3164-42CE-A4DB-E7DDBE723909}"; private const String DS3_BUS_CLASS_GUID = "{F679F562-3164-42CE-A4DB-E7DDBE723909}";
private const int CONTROLLER_OFFSET = 1; // Device 0 is the virtual USB hub itself, and we leave devices 1-10 available for other software (like the Scarlet.Crush DualShock driver itself) private const int CONTROLLER_OFFSET = 1; // Device 0 is the virtual USB hub itself, and we leave devices 1-10 available for other software (like the Scarlet.Crush DualShock driver itself)
@ -41,18 +40,8 @@ namespace DS4Windows
public X360Device() public X360Device()
: base(DS3_BUS_CLASS_GUID) : base(DS3_BUS_CLASS_GUID)
{ {
InitializeComponent();
} }
public X360Device(IContainer container)
: base(DS3_BUS_CLASS_GUID)
{
container.Add(this);
InitializeComponent();
}
/* public override Boolean Open(int Instance = 0) /* public override Boolean Open(int Instance = 0)
{ {
if (base.Open(Instance)) if (base.Open(Instance))

View File

@ -1,36 +0,0 @@
namespace DS4Windows
{
partial class X360Device
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}

View File

@ -1374,7 +1374,6 @@
this.Controls.Add(this.pnlButton); this.Controls.Add(this.pnlButton);
this.Name = "DS4Form"; this.Name = "DS4Form";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ScpForm_Closing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ScpForm_Closing);
this.Resize += new System.EventHandler(this.Form_Resize);
this.pnlButton.ResumeLayout(false); this.pnlButton.ResumeLayout(false);
this.pnlButton.PerformLayout(); this.pnlButton.PerformLayout();
this.cMTaskbar.ResumeLayout(false); this.cMTaskbar.ResumeLayout(false);

View File

@ -396,6 +396,8 @@ namespace DS4Windows
} }
instance = this; instance = this;
this.Resize += Form_Resize;
this.LocationChanged += TrackLocationChanged;
Form_Resize(null, null); Form_Resize(null, null);
if (btnStartStop.Enabled && start) if (btnStartStop.Enabled && start)
TaskRunner.Delay(50).ContinueWith((t) => this.BeginInvoke((System.Action)(() => BtnStartStop_Clicked()))); TaskRunner.Delay(50).ContinueWith((t) => this.BeginInvoke((System.Action)(() => BtnStartStop_Clicked())));
@ -941,9 +943,24 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question
FormBorderStyle = FormBorderStyle.Sizable; FormBorderStyle = FormBorderStyle.Sizable;
} }
if (WindowState != FormWindowState.Minimized)
{
FormWidth = Width;
FormHeight = Height;
}
chData.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize); chData.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
} }
private void TrackLocationChanged(object sender, EventArgs e)
{
if (WindowState != FormWindowState.Minimized)
{
FormLocationX = Location.X;
FormLocationY = Location.Y;
}
}
private void BtnStartStop_Click(object sender, EventArgs e) private void BtnStartStop_Click(object sender, EventArgs e)
{ {
BtnStartStop_Clicked(); BtnStartStop_Clicked();
@ -2178,19 +2195,6 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question
DS4LightBar.shuttingdown = true; DS4LightBar.shuttingdown = true;
} }
if (oldsize == new Size(0, 0))
{
FormWidth = this.Width;
FormHeight = this.Height;
}
else
{
FormWidth = oldsize.Width;
FormHeight = oldsize.Height;
}
FormLocationX = Location.X > 0 ? Location.X : 0;
FormLocationY = Location.Y > 0 ? Location.Y : 0;
Global.ControllerRemoved -= ControllerRemovedChange; Global.ControllerRemoved -= ControllerRemovedChange;
if (!string.IsNullOrEmpty(appdatapath)) if (!string.IsNullOrEmpty(appdatapath))

View File

@ -445,10 +445,10 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="bnLight3.Location" type="System.Drawing.Point, System.Drawing"> <data name="bnLight3.Location" type="System.Drawing.Point, System.Drawing">
<value>748, 89</value> <value>746, 89</value>
</data> </data>
<data name="bnLight3.Size" type="System.Drawing.Size, System.Drawing"> <data name="bnLight3.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 22</value> <value>147, 22</value>
</data> </data>
<data name="bnLight3.TabIndex" type="System.Int32, mscorlib"> <data name="bnLight3.TabIndex" type="System.Int32, mscorlib">
<value>50</value> <value>50</value>
@ -472,7 +472,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="pBStatus1.Location" type="System.Drawing.Point, System.Drawing"> <data name="pBStatus1.Location" type="System.Drawing.Point, System.Drawing">
<value>348, 34</value> <value>347, 34</value>
</data> </data>
<data name="pBStatus1.Size" type="System.Drawing.Size, System.Drawing"> <data name="pBStatus1.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value> <value>39, 20</value>
@ -574,7 +574,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="bnEditC3.Location" type="System.Drawing.Point, System.Drawing"> <data name="bnEditC3.Location" type="System.Drawing.Point, System.Drawing">
<value>708, 89</value> <value>706, 89</value>
</data> </data>
<data name="bnEditC3.Size" type="System.Drawing.Size, System.Drawing"> <data name="bnEditC3.Size" type="System.Drawing.Size, System.Drawing">
<value>34, 22</value> <value>34, 22</value>
@ -604,7 +604,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="bnEditC4.Location" type="System.Drawing.Point, System.Drawing"> <data name="bnEditC4.Location" type="System.Drawing.Point, System.Drawing">
<value>708, 117</value> <value>706, 117</value>
</data> </data>
<data name="bnEditC4.Size" type="System.Drawing.Size, System.Drawing"> <data name="bnEditC4.Size" type="System.Drawing.Size, System.Drawing">
<value>34, 22</value> <value>34, 22</value>
@ -703,7 +703,7 @@
<value>None</value> <value>None</value>
</data> </data>
<data name="cBController1.Location" type="System.Drawing.Point, System.Drawing"> <data name="cBController1.Location" type="System.Drawing.Point, System.Drawing">
<value>591, 33</value> <value>589, 33</value>
</data> </data>
<data name="cBController1.Size" type="System.Drawing.Size, System.Drawing"> <data name="cBController1.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value> <value>111, 21</value>
@ -730,7 +730,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="bnEditC2.Location" type="System.Drawing.Point, System.Drawing"> <data name="bnEditC2.Location" type="System.Drawing.Point, System.Drawing">
<value>708, 61</value> <value>706, 61</value>
</data> </data>
<data name="bnEditC2.Size" type="System.Drawing.Size, System.Drawing"> <data name="bnEditC2.Size" type="System.Drawing.Size, System.Drawing">
<value>34, 22</value> <value>34, 22</value>
@ -757,7 +757,7 @@
<value>None</value> <value>None</value>
</data> </data>
<data name="cBController2.Location" type="System.Drawing.Point, System.Drawing"> <data name="cBController2.Location" type="System.Drawing.Point, System.Drawing">
<value>591, 61</value> <value>589, 61</value>
</data> </data>
<data name="cBController2.Size" type="System.Drawing.Size, System.Drawing"> <data name="cBController2.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value> <value>111, 21</value>
@ -781,7 +781,7 @@
<value>None</value> <value>None</value>
</data> </data>
<data name="cBController3.Location" type="System.Drawing.Point, System.Drawing"> <data name="cBController3.Location" type="System.Drawing.Point, System.Drawing">
<value>591, 89</value> <value>589, 89</value>
</data> </data>
<data name="cBController3.Size" type="System.Drawing.Size, System.Drawing"> <data name="cBController3.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value> <value>111, 21</value>
@ -808,7 +808,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="bnEditC1.Location" type="System.Drawing.Point, System.Drawing"> <data name="bnEditC1.Location" type="System.Drawing.Point, System.Drawing">
<value>708, 33</value> <value>706, 33</value>
</data> </data>
<data name="bnEditC1.Size" type="System.Drawing.Size, System.Drawing"> <data name="bnEditC1.Size" type="System.Drawing.Size, System.Drawing">
<value>34, 22</value> <value>34, 22</value>
@ -835,7 +835,7 @@
<value>None</value> <value>None</value>
</data> </data>
<data name="cBController4.Location" type="System.Drawing.Point, System.Drawing"> <data name="cBController4.Location" type="System.Drawing.Point, System.Drawing">
<value>591, 117</value> <value>589, 117</value>
</data> </data>
<data name="cBController4.Size" type="System.Drawing.Size, System.Drawing"> <data name="cBController4.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value> <value>111, 21</value>
@ -868,7 +868,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="lbSelectedProfile.Location" type="System.Drawing.Point, System.Drawing"> <data name="lbSelectedProfile.Location" type="System.Drawing.Point, System.Drawing">
<value>592, 7</value> <value>590, 7</value>
</data> </data>
<data name="lbSelectedProfile.Size" type="System.Drawing.Size, System.Drawing"> <data name="lbSelectedProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>109, 15</value> <value>109, 15</value>
@ -940,7 +940,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="lbStatus.Location" type="System.Drawing.Point, System.Drawing"> <data name="lbStatus.Location" type="System.Drawing.Point, System.Drawing">
<value>344, 7</value> <value>343, 7</value>
</data> </data>
<data name="lbStatus.Size" type="System.Drawing.Size, System.Drawing"> <data name="lbStatus.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 15</value> <value>47, 15</value>
@ -976,7 +976,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="lbBattery.Location" type="System.Drawing.Point, System.Drawing"> <data name="lbBattery.Location" type="System.Drawing.Point, System.Drawing">
<value>437, 7</value> <value>436, 7</value>
</data> </data>
<data name="lbBattery.Size" type="System.Drawing.Size, System.Drawing"> <data name="lbBattery.Size" type="System.Drawing.Size, System.Drawing">
<value>51, 15</value> <value>51, 15</value>
@ -1012,7 +1012,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="lbBatt1.Location" type="System.Drawing.Point, System.Drawing"> <data name="lbBatt1.Location" type="System.Drawing.Point, System.Drawing">
<value>443, 36</value> <value>442, 36</value>
</data> </data>
<data name="lbBatt1.Size" type="System.Drawing.Size, System.Drawing"> <data name="lbBatt1.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value> <value>39, 15</value>
@ -1048,7 +1048,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="lbBatt2.Location" type="System.Drawing.Point, System.Drawing"> <data name="lbBatt2.Location" type="System.Drawing.Point, System.Drawing">
<value>443, 64</value> <value>442, 64</value>
</data> </data>
<data name="lbBatt2.Size" type="System.Drawing.Size, System.Drawing"> <data name="lbBatt2.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value> <value>39, 15</value>
@ -1084,7 +1084,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="lbBatt3.Location" type="System.Drawing.Point, System.Drawing"> <data name="lbBatt3.Location" type="System.Drawing.Point, System.Drawing">
<value>443, 92</value> <value>442, 92</value>
</data> </data>
<data name="lbBatt3.Size" type="System.Drawing.Size, System.Drawing"> <data name="lbBatt3.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value> <value>39, 15</value>
@ -1120,7 +1120,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="lbBatt4.Location" type="System.Drawing.Point, System.Drawing"> <data name="lbBatt4.Location" type="System.Drawing.Point, System.Drawing">
<value>443, 120</value> <value>442, 120</value>
</data> </data>
<data name="lbBatt4.Size" type="System.Drawing.Size, System.Drawing"> <data name="lbBatt4.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value> <value>39, 15</value>
@ -1150,7 +1150,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="pBStatus2.Location" type="System.Drawing.Point, System.Drawing"> <data name="pBStatus2.Location" type="System.Drawing.Point, System.Drawing">
<value>348, 62</value> <value>347, 62</value>
</data> </data>
<data name="pBStatus2.Size" type="System.Drawing.Size, System.Drawing"> <data name="pBStatus2.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value> <value>39, 20</value>
@ -1180,7 +1180,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="pBStatus3.Location" type="System.Drawing.Point, System.Drawing"> <data name="pBStatus3.Location" type="System.Drawing.Point, System.Drawing">
<value>348, 90</value> <value>347, 90</value>
</data> </data>
<data name="pBStatus3.Size" type="System.Drawing.Size, System.Drawing"> <data name="pBStatus3.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value> <value>39, 20</value>
@ -1210,7 +1210,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="pBStatus4.Location" type="System.Drawing.Point, System.Drawing"> <data name="pBStatus4.Location" type="System.Drawing.Point, System.Drawing">
<value>348, 118</value> <value>347, 118</value>
</data> </data>
<data name="pBStatus4.Size" type="System.Drawing.Size, System.Drawing"> <data name="pBStatus4.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value> <value>39, 20</value>
@ -1243,10 +1243,10 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="bnLight1.Location" type="System.Drawing.Point, System.Drawing"> <data name="bnLight1.Location" type="System.Drawing.Point, System.Drawing">
<value>748, 33</value> <value>746, 33</value>
</data> </data>
<data name="bnLight1.Size" type="System.Drawing.Size, System.Drawing"> <data name="bnLight1.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 22</value> <value>147, 22</value>
</data> </data>
<data name="bnLight1.TabIndex" type="System.Int32, mscorlib"> <data name="bnLight1.TabIndex" type="System.Int32, mscorlib">
<value>50</value> <value>50</value>
@ -1273,10 +1273,10 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="bnLight2.Location" type="System.Drawing.Point, System.Drawing"> <data name="bnLight2.Location" type="System.Drawing.Point, System.Drawing">
<value>748, 61</value> <value>746, 61</value>
</data> </data>
<data name="bnLight2.Size" type="System.Drawing.Size, System.Drawing"> <data name="bnLight2.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 22</value> <value>147, 22</value>
</data> </data>
<data name="bnLight2.TabIndex" type="System.Int32, mscorlib"> <data name="bnLight2.TabIndex" type="System.Int32, mscorlib">
<value>51</value> <value>51</value>
@ -1303,10 +1303,10 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="bnLight4.Location" type="System.Drawing.Point, System.Drawing"> <data name="bnLight4.Location" type="System.Drawing.Point, System.Drawing">
<value>748, 117</value> <value>746, 117</value>
</data> </data>
<data name="bnLight4.Size" type="System.Drawing.Size, System.Drawing"> <data name="bnLight4.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 22</value> <value>147, 22</value>
</data> </data>
<data name="bnLight4.TabIndex" type="System.Int32, mscorlib"> <data name="bnLight4.TabIndex" type="System.Int32, mscorlib">
<value>52</value> <value>52</value>
@ -1336,7 +1336,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="lbLinkProfile.Location" type="System.Drawing.Point, System.Drawing"> <data name="lbLinkProfile.Location" type="System.Drawing.Point, System.Drawing">
<value>514, 0</value> <value>512, 0</value>
</data> </data>
<data name="lbLinkProfile.Size" type="System.Drawing.Size, System.Drawing"> <data name="lbLinkProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>67, 30</value> <value>67, 30</value>
@ -1375,7 +1375,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="linkCB1.Location" type="System.Drawing.Point, System.Drawing"> <data name="linkCB1.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 37</value> <value>538, 37</value>
</data> </data>
<data name="linkCB1.Size" type="System.Drawing.Size, System.Drawing"> <data name="linkCB1.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value> <value>15, 14</value>
@ -1408,7 +1408,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="linkCB2.Location" type="System.Drawing.Point, System.Drawing"> <data name="linkCB2.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 65</value> <value>538, 65</value>
</data> </data>
<data name="linkCB2.Size" type="System.Drawing.Size, System.Drawing"> <data name="linkCB2.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value> <value>15, 14</value>
@ -1441,7 +1441,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="linkCB3.Location" type="System.Drawing.Point, System.Drawing"> <data name="linkCB3.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 93</value> <value>538, 93</value>
</data> </data>
<data name="linkCB3.Size" type="System.Drawing.Size, System.Drawing"> <data name="linkCB3.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value> <value>15, 14</value>
@ -1474,7 +1474,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="linkCB4.Location" type="System.Drawing.Point, System.Drawing"> <data name="linkCB4.Location" type="System.Drawing.Point, System.Drawing">
<value>540, 121</value> <value>538, 121</value>
</data> </data>
<data name="linkCB4.Size" type="System.Drawing.Size, System.Drawing"> <data name="linkCB4.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value> <value>15, 14</value>
@ -1522,7 +1522,7 @@
<value>0</value> <value>0</value>
</data> </data>
<data name="tLPControllers.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms"> <data name="tLPControllers.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="bnLight3" Row="3" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbPad1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC3" Row="3" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC4" Row="4" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="lbPad3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="cBController1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="cBController3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbID" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbStatus" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbBattery" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt3" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt4" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus3" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="bnLight1" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight2" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight4" Row="4" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="lbLinkProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,62.29144,Percent,20.02225,Percent,17.68632,Absolute,80,AutoSize,0,AutoSize,0,Absolute,150" /&gt;&lt;Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /&gt;&lt;/TableLayoutSettings&gt;</value> <value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="bnLight3" Row="3" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbPad1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC3" Row="3" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC4" Row="4" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="lbPad3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="cBController1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="cBController3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbID" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbStatus" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbBattery" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt3" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt4" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus3" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="bnLight1" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight2" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight4" Row="4" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="lbLinkProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,62.29144,Percent,20.02225,Percent,17.68632,Absolute,80,AutoSize,0,AutoSize,0,Absolute,151" /&gt;&lt;Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data> </data>
<data name="lbNoControllers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="lbNoControllers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
@ -2935,7 +2935,7 @@
<value>languagePackComboBox1</value> <value>languagePackComboBox1</value>
</data> </data>
<data name="&gt;&gt;languagePackComboBox1.Type" xml:space="preserve"> <data name="&gt;&gt;languagePackComboBox1.Type" xml:space="preserve">
<value>DS4Windows.DS4Forms.LanguagePackComboBox, DS4Windows, Version=1.5.15.0, Culture=neutral, PublicKeyToken=null</value> <value>DS4Windows.DS4Forms.LanguagePackComboBox, DS4Windows, Version=1.5.17.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;languagePackComboBox1.Parent" xml:space="preserve"> <data name="&gt;&gt;languagePackComboBox1.Parent" xml:space="preserve">
<value>fLPSettings</value> <value>fLPSettings</value>
@ -3652,7 +3652,7 @@
<value>advColorDialog</value> <value>advColorDialog</value>
</data> </data>
<data name="&gt;&gt;advColorDialog.Type" xml:space="preserve"> <data name="&gt;&gt;advColorDialog.Type" xml:space="preserve">
<value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.5.15.0, Culture=neutral, PublicKeyToken=null</value> <value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.5.17.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;$this.Name" xml:space="preserve"> <data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>DS4Form</value> <value>DS4Form</value>

View File

@ -39,7 +39,9 @@ namespace DS4Windows.DS4Forms
[System.Diagnostics.CodeAnalysis.SuppressMessage("InvariantCultureText_Changed call will complete when ready, no need for a warning", "CS4014:Await.Warning")] [System.Diagnostics.CodeAnalysis.SuppressMessage("InvariantCultureText_Changed call will complete when ready, no need for a warning", "CS4014:Await.Warning")]
set { set {
InvariantCultureTextValue = value; InvariantCultureTextValue = value;
#pragma warning disable CS4014
InvariantCultureText_Changed(value); InvariantCultureText_Changed(value);
#pragma warning restore CS4014
} }
} }

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -56,18 +56,9 @@
<PropertyGroup> <PropertyGroup>
<StartupObject>DS4Windows.Program</StartupObject> <StartupObject>DS4Windows.Program</StartupObject>
</PropertyGroup> </PropertyGroup>
<PropertyGroup />
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>Resources\DS4W.ico</ApplicationIcon> <ApplicationIcon>Resources\DS4W.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup> <PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>
@ -132,7 +123,6 @@
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" /> <Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
@ -150,20 +140,10 @@
<Compile Include="DS4Control\Mouse.cs" /> <Compile Include="DS4Control\Mouse.cs" />
<Compile Include="DS4Control\MouseCursor.cs" /> <Compile Include="DS4Control\MouseCursor.cs" />
<Compile Include="DS4Control\MouseWheel.cs" /> <Compile Include="DS4Control\MouseWheel.cs" />
<Compile Include="DS4Control\ScpDevice.cs"> <Compile Include="DS4Control\ScpDevice.cs" />
<SubType>Component</SubType>
</Compile>
<Compile Include="DS4Control\ScpDevice.Designer.cs">
<DependentUpon>ScpDevice.cs</DependentUpon>
</Compile>
<Compile Include="DS4Control\ScpUtil.cs" /> <Compile Include="DS4Control\ScpUtil.cs" />
<Compile Include="DS4Control\UdpServer.cs" /> <Compile Include="DS4Control\UdpServer.cs" />
<Compile Include="DS4Control\X360Device.cs"> <Compile Include="DS4Control\X360Device.cs" />
<SubType>Component</SubType>
</Compile>
<Compile Include="DS4Control\X360Device.designer.cs">
<DependentUpon>X360Device.cs</DependentUpon>
</Compile>
<Compile Include="DS4Forms\LanguagePackComboBox.cs"> <Compile Include="DS4Forms\LanguagePackComboBox.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
@ -253,6 +233,7 @@
<Compile Include="HidLibrary\HidDevices.cs" /> <Compile Include="HidLibrary\HidDevices.cs" />
<Compile Include="HidLibrary\NativeMethods.cs" /> <Compile Include="HidLibrary\NativeMethods.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Settings.cs" />
<EmbeddedResource Include="DS4Forms\DS4Form.ar.resx"> <EmbeddedResource Include="DS4Forms\DS4Form.ar.resx">
<DependentUpon>DS4Form.cs</DependentUpon> <DependentUpon>DS4Form.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@ -1078,7 +1059,7 @@
<EmbeddedResource Include="Properties\Resources.pl.resx" /> <EmbeddedResource Include="Properties\Resources.pl.resx" />
<EmbeddedResource Include="Properties\Resources.pt-BR.resx" /> <EmbeddedResource Include="Properties\Resources.pt-BR.resx" />
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
@ -1093,20 +1074,11 @@
<EmbeddedResource Include="Properties\Resources.zh-Hant.resx" /> <EmbeddedResource Include="Properties\Resources.zh-Hant.resx" />
<None Include="app.manifest" /> <None Include="app.manifest" />
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Resources.Designer.cs"> <Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
</Compile> </Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />

View File

@ -33,7 +33,7 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.17")] [assembly: AssemblyVersion("1.5.18")]
[assembly: AssemblyFileVersion("1.5.17")] [assembly: AssemblyFileVersion("1.5.18")]
[assembly: NeutralResourcesLanguage("en")] [assembly: NeutralResourcesLanguage("en")]

File diff suppressed because it is too large Load Diff

View File

@ -566,7 +566,7 @@
<value>EXPERIMENTAL: Auto-Disable BT when connecting to USB</value> <value>EXPERIMENTAL: Auto-Disable BT when connecting to USB</value>
</data> </data>
<data name="QuitOtherPrograms" xml:space="preserve"> <data name="QuitOtherPrograms" xml:space="preserve">
<value>You must quit other applications like Steam, Uplay before activating the 'Hide DS4 Controller' option."</value> <value>You must quit other applications like Steam, Uplay, NVIDIA IN-GAME before activating the 'Hide DS4 Controller' option.</value>
</data> </data>
<data name="rainbow" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="rainbow" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\rainbow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\rainbow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace DS4Windows.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

28
DS4Windows/Settings.cs Normal file
View File

@ -0,0 +1,28 @@
namespace DS4Windows.Properties {
// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved.
public sealed partial class Settings {
public Settings() {
// // To add event handlers for saving and changing settings, uncomment the lines below:
//
// this.SettingChanging += this.SettingChangingEventHandler;
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// Add code to handle the SettingChangingEvent event here.
}
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// Add code to handle the SettingsSaving event here.
}
}
}