Version 1.4.266

Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
This commit is contained in:
jays2kings 2015-07-30 23:34:22 -04:00
parent 39cf56c71a
commit 86079b029e
237 changed files with 8824 additions and 7625 deletions

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

View File

@ -1,11 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS4Windows", "DS4Windows.csproj", "{B1081607-B630-4F57-9580-8A4897145890}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ookii.Dialogs", "..\..\..\Downloads\Ookii.Dialogs\src\Ookii.Dialogs\Ookii.Dialogs.csproj", "{779E62B3-C5A6-494D-9D87-96C0DEC7FFB0}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS4Windows", "DS4Windows\DS4Windows.csproj", "{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -13,14 +11,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B1081607-B630-4F57-9580-8A4897145890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1081607-B630-4F57-9580-8A4897145890}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1081607-B630-4F57-9580-8A4897145890}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B1081607-B630-4F57-9580-8A4897145890}.Release|Any CPU.Build.0 = Release|Any CPU
{779E62B3-C5A6-494D-9D87-96C0DEC7FFB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{779E62B3-C5A6-494D-9D87-96C0DEC7FFB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{779E62B3-C5A6-494D-9D87-96C0DEC7FFB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{779E62B3-C5A6-494D-9D87-96C0DEC7FFB0}.Release|Any CPU.Build.0 = Release|Any CPU
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -7,6 +7,7 @@ using System.IO;
using System.Reflection;
using System.Media;
using System.Threading.Tasks;
using static DS4Windows.Global;
namespace DS4Windows
{
public class ControlService
@ -92,7 +93,7 @@ namespace DS4Windows
await System.Threading.Tasks.Task.Delay(5);
String message = Properties.Resources.CouldNotOpenDS4.Replace("*Mac address*", device.MacAddress) + " " + Properties.Resources.QuitOtherPrograms;
LogDebug(message, true);
Log.LogToTray(message);
Log.LogToTray(message, true);
}
}
public bool Start(bool showlog = true)
@ -101,7 +102,7 @@ namespace DS4Windows
{
if (showlog)
LogDebug(Properties.Resources.Starting);
DS4Devices.isExclusiveMode = Global.UseExclusiveMode;
DS4Devices.isExclusiveMode = UseExclusiveMode;
if (showlog)
{
LogDebug(Properties.Resources.SearchingController);
@ -123,17 +124,17 @@ namespace DS4Windows
device.Removal += this.On_DS4Removal;
device.Removal += DS4Devices.On_Removal;
touchPad[ind] = new Mouse(ind, device);
device.LightBarColor = Global.MainColor[ind];
if (!Global.DinputOnly[ind])
device.LightBarColor = MainColor[ind];
if (!DinputOnly[ind])
x360Bus.Plugin(ind);
device.Report += this.On_Report;
TouchPadOn(ind, device);
//string filename = Global.ProfilePath[ind];
//string filename = ProfilePath[ind];
ind++;
if (showlog)
if (System.IO.File.Exists(Global.appdatapath + "\\Profiles\\" + Global.ProfilePath[ind-1] + ".xml"))
if (System.IO.File.Exists(appdatapath + "\\Profiles\\" + ProfilePath[ind-1] + ".xml"))
{
string prolog = Properties.Resources.UsingProfile.Replace("*number*", ind.ToString()).Replace("*Profile name*", Global.ProfilePath[ind-1]);
string prolog = Properties.Resources.UsingProfile.Replace("*number*", ind.ToString()).Replace("*Profile name*", ProfilePath[ind-1]);
LogDebug(prolog);
Log.LogToTray(prolog);
}
@ -170,7 +171,7 @@ namespace DS4Windows
{
if (DS4Controllers[i] != null)
{
if (Global.DCBTatStop && !DS4Controllers[i].Charging && showlog)
if (DCBTatStop && !DS4Controllers[i].Charging && showlog)
DS4Controllers[i].DisconnectBT();
else
{
@ -196,7 +197,7 @@ namespace DS4Windows
DS4Devices.stopControllers();
if (showlog)
LogDebug(Properties.Resources.StoppedDS4Windows);
Global.ControllerStatusChanged(this);
ControllerStatusChanged(this);
}
return true;
}
@ -229,15 +230,15 @@ namespace DS4Windows
device.Removal += this.On_DS4Removal;
device.Removal += DS4Devices.On_Removal;
touchPad[Index] = new Mouse(Index, device);
device.LightBarColor = Global.MainColor[Index];
device.LightBarColor = MainColor[Index];
device.Report += this.On_Report;
if (!Global.DinputOnly[Index])
if (!DinputOnly[Index])
x360Bus.Plugin(Index);
TouchPadOn(Index, device);
//string filename = Path.GetFileName(Global.ProfilePath[Index]);
if (System.IO.File.Exists(Global.appdatapath + "\\Profiles\\" + Global.ProfilePath[Index] + ".xml"))
//string filename = Path.GetFileName(ProfilePath[Index]);
if (System.IO.File.Exists(appdatapath + "\\Profiles\\" + ProfilePath[Index] + ".xml"))
{
string prolog = Properties.Resources.UsingProfile.Replace("*number*", (Index + 1).ToString()).Replace("*Profile name*", Global.ProfilePath[Index]);
string prolog = Properties.Resources.UsingProfile.Replace("*number*", (Index + 1).ToString()).Replace("*Profile name*", ProfilePath[Index]);
LogDebug(prolog);
Log.LogToTray(prolog);
}
@ -266,7 +267,7 @@ namespace DS4Windows
device.Touchpad.TouchUnchanged += tPad.touchUnchanged;
//LogDebug("Touchpad mode for " + device.MacAddress + " is now " + tmode.ToString());
//Log.LogToTray("Touchpad mode for " + device.MacAddress + " is now " + tmode.ToString());
Global.ControllerStatusChanged(this);
ControllerStatusChanged(this);
}
public void TimeoutConnection(DS4Device d)
@ -432,7 +433,7 @@ namespace DS4Windows
System.Threading.Thread.Sleep(XINPUT_UNPLUG_SETTLE_TIME);
DS4Controllers[ind] = null;
touchPad[ind] = null;
Global.ControllerStatusChanged(this);
ControllerStatusChanged(this);
}
}
public bool[] lag = { false, false, false, false };
@ -449,7 +450,7 @@ namespace DS4Windows
if (ind != -1)
{
if (Global.FlushHIDQueue[ind])
if (FlushHIDQueue[ind])
device.FlushHID();
if (!string.IsNullOrEmpty(device.error))
{
@ -457,9 +458,9 @@ namespace DS4Windows
}
if (DateTime.UtcNow - device.firstActive > TimeSpan.FromSeconds(5))
{
if (device.Latency >= 10 && !lag[ind])
if (device.Latency >= FlashWhenLateAt && !lag[ind])
LagFlashWarning(ind, true);
else if (device.Latency < 10 && lag[ind])
else if (device.Latency < FlashWhenLateAt && lag[ind])
LagFlashWarning(ind, false);
}
device.getExposedState(ExposedState[ind], CurrentState[ind]);
@ -467,21 +468,21 @@ namespace DS4Windows
device.getPreviousState(PreviousState[ind]);
DS4State pState = PreviousState[ind];
if (pState.Battery != cState.Battery)
Global.ControllerStatusChanged(this);
ControllerStatusChanged(this);
CheckForHotkeys(ind, cState, pState);
if (eastertime)
EasterTime(ind);
GetInputkeys(ind);
if (Global.LSCurve[ind] != 0 || Global.RSCurve[ind] != 0 || Global.LSDeadzone[ind] != 0 || Global.RSDeadzone[ind] != 0 ||
Global.L2Deadzone[ind] != 0 || Global.R2Deadzone[ind] != 0) //if a curve or deadzone is in place
if (LSCurve[ind] != 0 || RSCurve[ind] != 0 || LSDeadzone[ind] != 0 || RSDeadzone[ind] != 0 ||
L2Deadzone[ind] != 0 || R2Deadzone[ind] != 0) //if a curve or deadzone is in place
cState = Mapping.SetCurveAndDeadzone(ind, cState);
if (!recordingMacro && (!string.IsNullOrEmpty(Global.tempprofilename[ind]) ||
Global.getHasCustomKeysorButtons(ind) || Global.getHasShiftCustomKeysorButtons(ind) || Global.ProfileActions[ind].Count > 0))
if (!recordingMacro && (!string.IsNullOrEmpty(tempprofilename[ind]) ||
getHasCustomKeysorButtons(ind) || getHasShiftCustomKeysorButtons(ind) || ProfileActions[ind].Count > 0))
{
Mapping.MapCustom(ind, cState, MappedState[ind], ExposedState[ind], touchPad[ind], this);
cState = MappedState[ind];
}
if (Global.getHasCustomExtras(ind))
if (getHasCustomExtras(ind))
DoExtras(ind);
// Update the GUI/whatever.
@ -504,7 +505,7 @@ namespace DS4Windows
// Output any synthetic events.
Mapping.Commit(ind);
// Pull settings updates.
device.IdleTimeout = Global.IdleDisconnectTimeout[ind];
device.IdleTimeout = IdleDisconnectTimeout[ind];
}
}
@ -514,7 +515,7 @@ namespace DS4Windows
{
lag[ind] = true;
LogDebug(Properties.Resources.LatencyOverTen.Replace("*number*", (ind + 1).ToString()), true);
if (Global.FlashWhenLate)
if (FlashWhenLate)
{
DS4Color color = new DS4Color { red = 50, green = 0, blue = 0 };
DS4LightBar.forcedColor[ind] = color;
@ -537,7 +538,7 @@ namespace DS4Windows
DS4StateExposed eState = ExposedState[ind];
Mouse tp = touchPad[ind];
DS4Controls helddown = DS4Controls.None;
foreach (KeyValuePair<DS4Controls, string> p in Global.getCustomExtras(ind))
foreach (KeyValuePair<DS4Controls, string> p in getCustomExtras(ind))
{
if (Mapping.getBoolMapping(p.Key, cState, eState, tp))
{
@ -547,7 +548,7 @@ namespace DS4Windows
}
if (helddown != DS4Controls.None)
{
string p = Global.getCustomExtras(ind)[helddown];
string p = getCustomExtras(ind)[helddown];
string[] extraS = p.Split(',');
int[] extras = new int[extraS.Length];
for (int i = 0; i < extraS.Length; i++)
@ -571,8 +572,8 @@ namespace DS4Windows
if (extras[7] == 1)
{
if (oldmouse[ind] == -1)
oldmouse[ind] = Global.ButtonMouseSensitivity[ind];
Global.ButtonMouseSensitivity[ind] = extras[8];
oldmouse[ind] = ButtonMouseSensitivity[ind];
ButtonMouseSensitivity[ind] = extras[8];
}
}
catch { }
@ -581,7 +582,7 @@ namespace DS4Windows
{
DS4LightBar.forcelight[ind] = false;
DS4LightBar.forcedFlash[ind] = 0;
Global.ButtonMouseSensitivity[ind] = oldmouse[ind];
ButtonMouseSensitivity[ind] = oldmouse[ind];
oldmouse[ind] = -1;
setRumble(0, 0, ind);
held[ind] = false;
@ -747,24 +748,24 @@ namespace DS4Windows
public int[] oldscrollvalue = { 0, 0, 0, 0 };
protected virtual void CheckForHotkeys(int deviceID, DS4State cState, DS4State pState)
{
if (!Global.UseTPforControls[deviceID] && cState.Touch1 && pState.PS)
if (!UseTPforControls[deviceID] && cState.Touch1 && pState.PS)
{
if (Global.TouchSensitivity[deviceID] > 0 && touchreleased[deviceID])
if (TouchSensitivity[deviceID] > 0 && touchreleased[deviceID])
{
oldtouchvalue[deviceID] = Global.TouchSensitivity[deviceID];
oldscrollvalue[deviceID] = Global.ScrollSensitivity[deviceID];
Global.TouchSensitivity[deviceID] = 0;
Global.ScrollSensitivity[deviceID] = 0;
LogDebug(Global.TouchSensitivity[deviceID] > 0 ? Properties.Resources.TouchpadMovementOn : Properties.Resources.TouchpadMovementOff);
Log.LogToTray(Global.TouchSensitivity[deviceID] > 0 ? Properties.Resources.TouchpadMovementOn : Properties.Resources.TouchpadMovementOff);
oldtouchvalue[deviceID] = TouchSensitivity[deviceID];
oldscrollvalue[deviceID] = ScrollSensitivity[deviceID];
TouchSensitivity[deviceID] = 0;
ScrollSensitivity[deviceID] = 0;
LogDebug(TouchSensitivity[deviceID] > 0 ? Properties.Resources.TouchpadMovementOn : Properties.Resources.TouchpadMovementOff);
Log.LogToTray(TouchSensitivity[deviceID] > 0 ? Properties.Resources.TouchpadMovementOn : Properties.Resources.TouchpadMovementOff);
touchreleased[deviceID] = false;
}
else if (touchreleased[deviceID])
{
Global.TouchSensitivity[deviceID] = oldtouchvalue[deviceID];
Global.ScrollSensitivity[deviceID] = oldscrollvalue[deviceID];
LogDebug(Global.TouchSensitivity[deviceID] > 0 ? Properties.Resources.TouchpadMovementOn : Properties.Resources.TouchpadMovementOff);
Log.LogToTray(Global.TouchSensitivity[deviceID] > 0 ? Properties.Resources.TouchpadMovementOn : Properties.Resources.TouchpadMovementOff);
TouchSensitivity[deviceID] = oldtouchvalue[deviceID];
ScrollSensitivity[deviceID] = oldscrollvalue[deviceID];
LogDebug(TouchSensitivity[deviceID] > 0 ? Properties.Resources.TouchpadMovementOn : Properties.Resources.TouchpadMovementOff);
Log.LogToTray(TouchSensitivity[deviceID] > 0 ? Properties.Resources.TouchpadMovementOn : Properties.Resources.TouchpadMovementOff);
touchreleased[deviceID] = false;
}
}
@ -776,10 +777,10 @@ namespace DS4Windows
{
if (deviceID < 4)
{
oldtouchvalue[deviceID] = Global.TouchSensitivity[deviceID];
oldscrollvalue[deviceID] = Global.ScrollSensitivity[deviceID];
Global.TouchSensitivity[deviceID] = 0;
Global.ScrollSensitivity[deviceID] = 0;
oldtouchvalue[deviceID] = TouchSensitivity[deviceID];
oldscrollvalue[deviceID] = ScrollSensitivity[deviceID];
TouchSensitivity[deviceID] = 0;
ScrollSensitivity[deviceID] = 0;
}
}
@ -824,7 +825,7 @@ namespace DS4Windows
//sets the rumble adjusted with rumble boost
public virtual void setRumble(byte heavyMotor, byte lightMotor, int deviceNum)
{
byte boost = Global.RumbleBoost[deviceNum];
byte boost = RumbleBoost[deviceNum];
uint lightBoosted = ((uint)lightMotor * (uint)boost) / 100;
if (lightBoosted > 255)
lightBoosted = 255;

View File

@ -3,7 +3,8 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using static System.Math;
using static DS4Windows.Global;
namespace DS4Windows
{
public class DS4LightBar
@ -33,56 +34,56 @@ namespace DS4Windows
DS4Color color;
if (!defualtLight && !forcelight[deviceNum])
{
if (Global.ShiftColorOn[deviceNum] && Global.ShiftModifier[deviceNum] > 0 && shiftMod(device, deviceNum, cState, eState, tp))
if (ShiftColorOn[deviceNum] && ShiftModifier[deviceNum] > 0 && shiftMod(device, deviceNum, cState, eState, tp))
{
color = Global.ShiftColor[deviceNum];
color = ShiftColor[deviceNum];
}
else
{
if (Global.Rainbow[deviceNum] > 0)
if (Rainbow[deviceNum] > 0)
{// Display rainbow
DateTime now = DateTime.UtcNow;
if (now >= oldnow + TimeSpan.FromMilliseconds(10)) //update by the millisecond that way it's a smooth transtion
{
oldnow = now;
if (device.Charging)
counters[deviceNum] -= 1.5 * 3 / Global.Rainbow[deviceNum];
counters[deviceNum] -= 1.5 * 3 / Rainbow[deviceNum];
else
counters[deviceNum] += 1.5 * 3 / Global.Rainbow[deviceNum];
counters[deviceNum] += 1.5 * 3 / Rainbow[deviceNum];
}
if (counters[deviceNum] < 0)
counters[deviceNum] = 180000;
if (counters[deviceNum] > 180000)
counters[deviceNum] = 0;
if (Global.LedAsBatteryIndicator[deviceNum])
if (LedAsBatteryIndicator[deviceNum])
color = HuetoRGB((float)counters[deviceNum] % 360, (byte)(2.55 * device.Battery));
else
color = HuetoRGB((float)counters[deviceNum] % 360, 255);
}
else if (Global.LedAsBatteryIndicator[deviceNum])
else if (LedAsBatteryIndicator[deviceNum])
{
//if (device.Charging == false || device.Battery >= 100) // when charged, don't show the charging animation
{
DS4Color fullColor = Global.MainColor[deviceNum];
DS4Color lowColor = Global.LowColor[deviceNum];
DS4Color fullColor = MainColor[deviceNum];
DS4Color lowColor = LowColor[deviceNum];
color = Global.getTransitionedColor(lowColor, fullColor, (uint)device.Battery);
color = getTransitionedColor(lowColor, fullColor, (uint)device.Battery);
}
}
else
{
color = Global.MainColor[deviceNum];
color = MainColor[deviceNum];
}
if (device.Battery <= Global.FlashAt[deviceNum] && !defualtLight && !device.Charging)
if (device.Battery <= FlashAt[deviceNum] && !defualtLight && !device.Charging)
{
if (!(Global.FlashColor[deviceNum].red == 0 &&
Global.FlashColor[deviceNum].green == 0 &&
Global.FlashColor[deviceNum].blue == 0))
color = Global.FlashColor[deviceNum];
if (Global.FlashType[deviceNum] == 1)
if (!(FlashColor[deviceNum].red == 0 &&
FlashColor[deviceNum].green == 0 &&
FlashColor[deviceNum].blue == 0))
color = FlashColor[deviceNum];
if (FlashType[deviceNum] == 1)
{
if (fadetimer[deviceNum] <= 0)
fadedirection[deviceNum] = true;
@ -92,23 +93,23 @@ namespace DS4Windows
fadetimer[deviceNum] += 1;
else
fadetimer[deviceNum] -= 1;
color = Global.getTransitionedColor(color, new DS4Color(0,0,0), fadetimer[deviceNum]);
color = getTransitionedColor(color, new DS4Color(0,0,0), fadetimer[deviceNum]);
}
}
if (Global.IdleDisconnectTimeout[deviceNum] > 0 && Global.LedAsBatteryIndicator[deviceNum] && (!device.Charging || device.Battery >= 100))
if (IdleDisconnectTimeout[deviceNum] > 0 && LedAsBatteryIndicator[deviceNum] && (!device.Charging || device.Battery >= 100))
{//Fade lightbar by idle time
TimeSpan timeratio = new TimeSpan(DateTime.UtcNow.Ticks - device.lastActive.Ticks);
double botratio = timeratio.TotalMilliseconds;
double topratio = TimeSpan.FromSeconds(Global.IdleDisconnectTimeout[deviceNum]).TotalMilliseconds;
double topratio = TimeSpan.FromSeconds(IdleDisconnectTimeout[deviceNum]).TotalMilliseconds;
double ratio = ((botratio / topratio) * 100);
if (ratio >= 50 && ratio <= 100)
color = Global.getTransitionedColor(color, new DS4Color(0, 0, 0), (uint)((ratio - 50) * 2));
color = getTransitionedColor(color, new DS4Color(0, 0, 0), (uint)((ratio - 50) * 2));
else if (ratio >= 100)
color = Global.getTransitionedColor(color, new DS4Color(0, 0, 0), 100);
color = getTransitionedColor(color, new DS4Color(0, 0, 0), 100);
}
if (device.Charging && device.Battery < 100)
switch (Global.ChargingType[deviceNum])
switch (ChargingType[deviceNum])
{
case 1:
if (fadetimer[deviceNum] <= 0)
@ -119,14 +120,14 @@ namespace DS4Windows
fadetimer[deviceNum] += .1;
else
fadetimer[deviceNum] -= .1;
color = Global.getTransitionedColor(color, new DS4Color(0, 0, 0), fadetimer[deviceNum]);
color = getTransitionedColor(color, new DS4Color(0, 0, 0), fadetimer[deviceNum]);
break;
case 2:
counters[deviceNum] += .167;
color = HuetoRGB((float)counters[deviceNum] % 360, 255);
break;
case 3:
color = Global.ChargingColor[deviceNum];
color = ChargingColor[deviceNum];
break;
default:
break;
@ -146,15 +147,15 @@ namespace DS4Windows
else
color = new DS4Color(0, 0, 0);
}
bool distanceprofile = (Global.ProfilePath[deviceNum].ToLower().Contains("distance") || Global.tempprofilename[deviceNum].ToLower().Contains("distance"));
bool distanceprofile = (ProfilePath[deviceNum].ToLower().Contains("distance") || tempprofilename[deviceNum].ToLower().Contains("distance"));
if (distanceprofile && !defualtLight)
{ //Thing I did for Distance
float rumble = device.LeftHeavySlowRumble / 2.55f;
byte max = Math.Max(color.red, Math.Max(color.green, color.blue));
byte max = Max(color.red, Max(color.green, color.blue));
if (device.LeftHeavySlowRumble > 100)
color = Global.getTransitionedColor(new DS4Color(max, max, 0), new DS4Color(255, 0, 0), rumble);
color = getTransitionedColor(new DS4Color(max, max, 0), new DS4Color(255, 0, 0), rumble);
else
color = Global.getTransitionedColor(color, Global.getTransitionedColor(new DS4Color(max, max, 0), new DS4Color(255, 0, 0), 39.6078f), device.LeftHeavySlowRumble);
color = getTransitionedColor(color, getTransitionedColor(new DS4Color(max, max, 0), new DS4Color(255, 0, 0), 39.6078f), device.LeftHeavySlowRumble);
}
DS4HapticState haptics = new DS4HapticState
{
@ -167,7 +168,7 @@ namespace DS4Windows
haptics.LightBarFlashDurationOff = haptics.LightBarFlashDurationOn = (byte)(25 - forcedFlash[deviceNum]);
haptics.LightBarExplicitlyOff = true;
}
else if (device.Battery <= Global.FlashAt[deviceNum] && Global.FlashType[deviceNum] == 0 && !defualtLight && !device.Charging)
else if (device.Battery <= FlashAt[deviceNum] && FlashType[deviceNum] == 0 && !defualtLight && !device.Charging)
{
int level = device.Battery / 10;
//if (level >= 10)
@ -203,7 +204,7 @@ namespace DS4Windows
public static bool shiftMod(DS4Device device, int deviceNum, DS4State cState, DS4StateExposed eState, Mouse tp)
{
bool shift;
switch (Global.ShiftModifier[deviceNum])
switch (ShiftModifier[deviceNum])
{
case 1: shift = Mapping.getBoolMapping(DS4Controls.Cross, cState, eState, tp); break;
case 2: shift = Mapping.getBoolMapping(DS4Controls.Circle, cState, eState, tp); break;

View File

@ -18,14 +18,14 @@ namespace DS4Windows
}
}
public static void LogToTray(string data, bool ignoreSettings = false)
public static void LogToTray(string data, bool warning = false, bool ignoreSettings = false)
{
if (TrayIconLog != null)
{
if (ignoreSettings)
TrayIconLog(ignoreSettings, new DebugEventArgs(data, false));
TrayIconLog(ignoreSettings, new DebugEventArgs(data, warning));
else
TrayIconLog(null, new DebugEventArgs(data, false));
TrayIconLog(null, new DebugEventArgs(data, warning));
}
}
}

View File

@ -70,6 +70,8 @@ namespace DS4Windows
public static DateTime[] oldnowAction = { DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue };
public static int[] untriggerindex = { -1, -1, -1, -1 };
public static DateTime[] oldnowKeyAct = { DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue };
private static bool tappedOnce = false, firstTouch = false, secondtouchbegin = false;
private static DateTime pastTime, firstTap, TimeofEnd;
//special macros
static bool altTabDone = true;
@ -1418,8 +1420,8 @@ namespace DS4Windows
string[] dets = action.details.Split(',');
if (bool.Parse(dets[1]) && !actionDone[device, index])
{
Log.LogToTray("Controller " + (device + 1) + ": " +
ctrl.getDS4Battery(device), true);
Log.LogToTray("Controller " + (device + 1) + ": " +
ctrl.getDS4Battery(device), true);
}
if (bool.Parse(dets[2]))
{
@ -1433,7 +1435,7 @@ namespace DS4Windows
DS4Color full = new DS4Color(byte.Parse(dets[6]), byte.Parse(dets[7]), byte.Parse(dets[8]));
DS4Color trans = Global.getTransitionedColor(empty, full, d.Battery);
if (fadetimer[device] < 100)
DS4LightBar.forcedColor[device] = Global.getTransitionedColor(lastColor[device], trans, fadetimer[device] += 2);
DS4LightBar.forcedColor[device] = Global.getTransitionedColor(lastColor[device], trans, fadetimer[device] += 2);
}
actionDone[device, index] = true;
}
@ -1453,6 +1455,98 @@ namespace DS4Windows
actionDone[device, index] = false;
}
}
else if (action.type == "XboxGameDVR")
{
if (Global.getCustomButton(device, action.trigger[0]) != X360Controls.Unbound)
Global.getCustomButtons(device)[action.trigger[0]] = X360Controls.Unbound;
string[] dets = action.details.Split(',');
DS4Device d = ctrl.DS4Controllers[device];
//Global.cus
if (getBoolMapping(action.trigger[0], cState, eState, tp) && !getBoolMapping(action.trigger[0], d.getPreviousState(), eState, tp))
{//pressed down
pastTime = DateTime.UtcNow;
if (DateTime.UtcNow <= (firstTap + TimeSpan.FromMilliseconds(150)))
{
tappedOnce = false;
secondtouchbegin = true;
}
else
firstTouch = true;
}
else if (!getBoolMapping(action.trigger[0], cState, eState, tp) && getBoolMapping(action.trigger[0], d.getPreviousState(), eState, tp))
{//released
if (secondtouchbegin)
{
firstTouch = false;
secondtouchbegin = false;
}
else if (firstTouch)
{
firstTouch = false;
if (DateTime.UtcNow <= (pastTime + TimeSpan.FromMilliseconds(200)) && !tappedOnce)
{
tappedOnce = true;
firstTap = DateTime.UtcNow;
TimeofEnd = DateTime.UtcNow;
}
}
}
int type = 0;
string macro = "91/71/71/91";
if (tappedOnce) //single tap
{
if (int.TryParse(dets[0], out type))
{
switch (type)
{
case 0: macro = "91/71/71/91"; break;
case 1: macro = "91/164/82/82/164/91"; break;
case 2: macro = "91/164/44/44/164/91"; break;
case 3: macro = dets[3] + "/" + dets[3]; break;
case 4: macro = "91/164/71/71/164/91"; break;
}
}
if ((DateTime.UtcNow - TimeofEnd) > TimeSpan.FromMilliseconds(150))
{
PlayMacro(device, macroControl, macro, DS4Controls.None, DS4KeyType.None);
tappedOnce = false;
}
//if it fails the method resets, and tries again with a new tester value (gives tap a delay so tap and hold can work)
}
else if (firstTouch && (DateTime.UtcNow - pastTime) > TimeSpan.FromMilliseconds(1000)) //helddown
{
if (int.TryParse(dets[1], out type))
{
switch (type)
{
case 0: macro = "91/71/71/91"; break;
case 1: macro = "91/164/82/82/164/91"; break;
case 2: macro = "91/164/44/44/164/91"; break;
case 3: macro = dets[3] + "/" + dets[3]; break;
case 4: macro = "91/164/71/71/164/91"; break;
}
}
PlayMacro(device, macroControl, macro, DS4Controls.None, DS4KeyType.None);
firstTouch = false;
}
else if (secondtouchbegin) //if double tap
{
if (int.TryParse(dets[2], out type))
{
switch (type)
{
case 0: macro = "91/71/71/91"; break;
case 1: macro = "91/164/82/82/164/91"; break;
case 2: macro = "91/164/44/44/164/91"; break;
case 3: macro = dets[3] + "/" + dets[3]; break;
case 4: macro = "91/164/71/71/164/91"; break;
}
}
PlayMacro(device, macroControl, macro, DS4Controls.None, DS4KeyType.None);
secondtouchbegin = false;
}
}
else
actionDone[device, index] = false;
}

View File

@ -27,19 +27,9 @@ namespace DS4Windows
warning = warn;
}
public DateTime Time
{
get { return m_Time; }
}
public String Data
{
get { return m_Data; }
}
public bool Warning
{
get { return warning; }
}
public DateTime Time => m_Time;
public String Data => m_Data;
public bool Warning => warning;
}
public class MappingDoneEventArgs : EventArgs
@ -51,10 +41,7 @@ namespace DS4Windows
deviceNum = DeviceID;
}
public int DeviceID
{
get { return deviceNum; }
}
public int DeviceID => deviceNum;
}
public class ReportEventArgs : EventArgs
@ -147,7 +134,7 @@ namespace DS4Windows
set { m_Config.CheckWhen = value; }
get { return m_Config.CheckWhen; }
}
public static bool Notifications
public static int Notifications
{
set { m_Config.notifications = value; }
get { return m_Config.notifications; }
@ -207,160 +194,52 @@ namespace DS4Windows
set { m_Config.flashWhenLate = value; }
get { return m_Config.flashWhenLate; }
}
public static int FlashWhenLateAt
{
set { m_Config.flashWhenLateAt = value; }
get { return m_Config.flashWhenLateAt; }
}
//controller/profile specfic values
public static int[] ButtonMouseSensitivity
{
get {return m_Config.buttonMouseSensitivity;}
}
public static int[] ButtonMouseSensitivity => m_Config.buttonMouseSensitivity;
public static byte[] RumbleBoost => m_Config.rumble;
public static double[] Rainbow => m_Config.rainbow;
public static bool[] FlushHIDQueue => m_Config.flushHIDQueue;
public static int[] IdleDisconnectTimeout => m_Config.idleDisconnectTimeout;
public static byte[] TouchSensitivity => m_Config.touchSensitivity;
public static byte[] FlashType => m_Config.flashType;
public static int[] FlashAt => m_Config.flashAt;
public static bool[] LedAsBatteryIndicator => m_Config.ledAsBattery;
public static int[] ChargingType => m_Config.chargingType;
public static bool[] DinputOnly => m_Config.dinputOnly;
public static bool[] StartTouchpadOff => m_Config.startTouchpadOff;
public static bool[] UseTPforControls => m_Config.useTPforControls;
public static DS4Color[] MainColor => m_Config.m_Leds;
public static DS4Color[] LowColor => m_Config.m_LowLeds;
public static DS4Color[] ChargingColor => m_Config.m_ChargingLeds;
public static byte[] RumbleBoost
{
get { return m_Config.rumble; }
}
public static double[] Rainbow
{
get { return m_Config.rainbow; }
}
public static bool[] FlushHIDQueue
{
get { return m_Config.flushHIDQueue; }
}
public static int[] IdleDisconnectTimeout
{
get { return m_Config.idleDisconnectTimeout; }
}
public static byte[] TouchSensitivity
{
get { return m_Config.touchSensitivity; }
}
public static byte[] FlashType
{
get { return m_Config.flashType;}
}
public static int[] FlashAt
{
get { return m_Config.flashAt;}
}
public static bool[] LedAsBatteryIndicator
{
get { return m_Config.ledAsBattery;}
}
public static int[] ChargingType
{
get { return m_Config.chargingType; }
}
public static bool[] DinputOnly
{
get { return m_Config.dinputOnly; }
}
public static bool[] StartTouchpadOff
{
get { return m_Config.startTouchpadOff; }
}
public static bool[] UseTPforControls
{
get { return m_Config.useTPforControls; }
}
public static DS4Color[] MainColor
{
get { return m_Config.m_Leds; }
}
public static DS4Color[] LowColor
{
get { return m_Config.m_LowLeds; }
}
public static DS4Color[] ChargingColor
{
get { return m_Config.m_ChargingLeds;}
}
public static DS4Color[] FlashColor => m_Config.m_FlashLeds;
public static DS4Color[] ShiftColor => m_Config.m_ShiftLeds;
public static bool[] ShiftColorOn => m_Config.shiftColorOn;
public static byte[] TapSensitivity => m_Config.tapSensitivity;
public static bool[] DoubleTap => m_Config.doubleTap;
public static int[] ScrollSensitivity => m_Config.scrollSensitivity;
public static bool[] LowerRCOn => m_Config.lowerRCOn;
public static bool[] TouchpadJitterCompensation => m_Config.touchpadJitterCompensation;
public static DS4Color[] FlashColor
{
get { return m_Config.m_FlashLeds;}
}
public static DS4Color[] ShiftColor
{
get { return m_Config.m_ShiftLeds; }
}
public static bool[] ShiftColorOn
{
get{ return m_Config.shiftColorOn; }
}
public static byte[] TapSensitivity
{
get { return m_Config.tapSensitivity; }
}
public static bool[] DoubleTap
{
get { return m_Config.doubleTap; }
}
public static int[] ScrollSensitivity
{
get{ return m_Config.scrollSensitivity;}
}
public static bool[] LowerRCOn
{
get{ return m_Config.lowerRCOn;}
}
public static bool[] TouchpadJitterCompensation
{
get { return m_Config.touchpadJitterCompensation; }
}
public static byte[] L2Deadzone
{
get { return m_Config.l2Deadzone; }
}
public static byte[] R2Deadzone
{
get { return m_Config.r2Deadzone;}
}
public static double[] SXDeadzone
{
get { return m_Config.SXDeadzone;}
}
public static double[] SZDeadzone
{
get { return m_Config.SZDeadzone;}
}
public static int[] LSDeadzone
{
get { return m_Config.LSDeadzone;}
}
public static int[] RSDeadzone
{
get { return m_Config.RSDeadzone;}
}
public static int[] LSCurve
{
get { return m_Config.lsCurve;}
}
public static int[] RSCurve
{
get { return m_Config.rsCurve;}
}
public static bool[] MouseAccel
{
get { return m_Config.mouseAccel;}
}
public static int[] ShiftModifier
{
get { return m_Config.shiftModifier;}
}
public static string[] LaunchProgram
{
get { return m_Config.launchProgram;}
}
public static string[] ProfilePath
{
get { return m_Config.profilePath; }
}
public static List<String>[] ProfileActions
{
get { return m_Config.profileActions; }
}
public static byte[] L2Deadzone => m_Config.l2Deadzone;
public static byte[] R2Deadzone => m_Config.r2Deadzone;
public static double[] SXDeadzone => m_Config.SXDeadzone;
public static double[] SZDeadzone => m_Config.SZDeadzone;
public static int[] LSDeadzone => m_Config.LSDeadzone;
public static int[] RSDeadzone => m_Config.RSDeadzone;
public static int[] LSCurve => m_Config.lsCurve;
public static int[] RSCurve => m_Config.rsCurve;
public static bool[] MouseAccel => m_Config.mouseAccel;
public static int[] ShiftModifier => m_Config.shiftModifier;
public static string[] LaunchProgram => m_Config.launchProgram;
public static string[] ProfilePath => m_Config.profilePath;
public static List<String>[] ProfileActions => m_Config.profileActions;
public static void SaveAction(string name, string controls, int mode, string details, bool edit, string extras = "")
{
@ -372,15 +251,9 @@ namespace DS4Windows
m_Config.RemoveAction(name);
}
public static bool LoadActions()
{
return m_Config.LoadActions();
}
public static bool LoadActions() => m_Config.LoadActions();
public static List<SpecialAction> GetActions()
{
return m_Config.actions;
}
public static List<SpecialAction> GetActions() => m_Config.actions;
public static int GetActionIndexOf(string name)
{
@ -399,109 +272,41 @@ namespace DS4Windows
}
public static X360Controls getCustomButton(int device, DS4Controls controlName)
{
return m_Config.GetCustomButton(device, controlName);
}
public static ushort getCustomKey(int device, DS4Controls controlName)
{
return m_Config.GetCustomKey(device, controlName);
}
public static string getCustomMacro(int device, DS4Controls controlName)
{
return m_Config.GetCustomMacro(device, controlName);
}
public static string getCustomExtras(int device, DS4Controls controlName)
{
return m_Config.GetCustomExtras(device, controlName);
}
public static DS4KeyType getCustomKeyType(int device, DS4Controls controlName)
{
return m_Config.GetCustomKeyType(device, controlName);
}
public static bool getHasCustomKeysorButtons(int device)
{
return m_Config.customMapButtons[device].Count > 0
public static X360Controls getCustomButton(int device, DS4Controls controlName) => m_Config.GetCustomButton(device, controlName);
public static ushort getCustomKey(int device, DS4Controls controlName) => m_Config.GetCustomKey(device, controlName);
public static string getCustomMacro(int device, DS4Controls controlName) => m_Config.GetCustomMacro(device, controlName);
public static string getCustomExtras(int device, DS4Controls controlName) => m_Config.GetCustomExtras(device, controlName);
public static DS4KeyType getCustomKeyType(int device, DS4Controls controlName) => m_Config.GetCustomKeyType(device, controlName);
public static bool getHasCustomKeysorButtons(int device) => m_Config.customMapButtons[device].Count > 0
|| m_Config.customMapKeys[device].Count > 0;
}
public static bool getHasCustomExtras(int device)
{
return m_Config.customMapExtras[device].Count > 0;
}
public static Dictionary<DS4Controls, X360Controls> getCustomButtons(int device)
{
return m_Config.customMapButtons[device];
}
public static Dictionary<DS4Controls, ushort> getCustomKeys(int device)
{
return m_Config.customMapKeys[device];
}
public static Dictionary<DS4Controls, string> getCustomMacros(int device)
{
return m_Config.customMapMacros[device];
}
public static Dictionary<DS4Controls, string> getCustomExtras(int device)
{
return m_Config.customMapExtras[device];
}
public static Dictionary<DS4Controls, DS4KeyType> getCustomKeyTypes(int device)
{
return m_Config.customMapKeyTypes[device];
}
public static bool getHasCustomExtras(int device) => m_Config.customMapExtras[device].Count > 0;
public static Dictionary<DS4Controls, X360Controls> getCustomButtons(int device) => m_Config.customMapButtons[device];
public static Dictionary<DS4Controls, ushort> getCustomKeys(int device) => m_Config.customMapKeys[device];
public static Dictionary<DS4Controls, string> getCustomMacros(int device) => m_Config.customMapMacros[device];
public static Dictionary<DS4Controls, string> getCustomExtras(int device) => m_Config.customMapExtras[device];
public static Dictionary<DS4Controls, DS4KeyType> getCustomKeyTypes(int device) => m_Config.customMapKeyTypes[device];
public static X360Controls getShiftCustomButton(int device, DS4Controls controlName)
{
return m_Config.GetShiftCustomButton(device, controlName);
}
public static ushort getShiftCustomKey(int device, DS4Controls controlName)
{
return m_Config.GetShiftCustomKey(device, controlName);
}
public static string getShiftCustomMacro(int device, DS4Controls controlName)
{
return m_Config.GetShiftCustomMacro(device, controlName);
}
public static string getShiftCustomExtras(int device, DS4Controls controlName)
{
return m_Config.GetShiftCustomExtras(device, controlName);
}
public static DS4KeyType getShiftCustomKeyType(int device, DS4Controls controlName)
{
return m_Config.GetShiftCustomKeyType(device, controlName);
}
public static bool getHasShiftCustomKeysorButtons(int device)
{
return m_Config.shiftCustomMapButtons[device].Count > 0
|| m_Config.shiftCustomMapKeys[device].Count > 0;
}
public static bool getHasShiftCustomExtras(int device)
{
return m_Config.shiftCustomMapExtras[device].Count > 0;
}
public static Dictionary<DS4Controls, X360Controls> getShiftCustomButtons(int device)
{
return m_Config.shiftCustomMapButtons[device];
}
public static Dictionary<DS4Controls, ushort> getShiftCustomKeys(int device)
{
return m_Config.shiftCustomMapKeys[device];
}
public static Dictionary<DS4Controls, string> getShiftCustomMacros(int device)
{
return m_Config.shiftCustomMapMacros[device];
}
public static Dictionary<DS4Controls, string> getShiftCustomExtras(int device)
{
return m_Config.shiftCustomMapExtras[device];
}
public static Dictionary<DS4Controls, DS4KeyType> getShiftCustomKeyTypes(int device)
{
return m_Config.shiftCustomMapKeyTypes[device];
}
public static bool Load()
{
return m_Config.Load();
}
public static X360Controls getShiftCustomButton(int device, DS4Controls controlName) => m_Config.GetShiftCustomButton(device, controlName);
public static ushort getShiftCustomKey(int device, DS4Controls controlName) => m_Config.GetShiftCustomKey(device, controlName);
public static string getShiftCustomMacro(int device, DS4Controls controlName) => m_Config.GetShiftCustomMacro(device, controlName);
public static string getShiftCustomExtras(int device, DS4Controls controlName) => m_Config.GetShiftCustomExtras(device, controlName);
public static DS4KeyType getShiftCustomKeyType(int device, DS4Controls controlName) => m_Config.GetShiftCustomKeyType(device, controlName);
public static bool getHasShiftCustomKeysorButtons(int device) => m_Config.shiftCustomMapButtons[device].Count > 0
|| m_Config.shiftCustomMapKeys[device].Count > 0;
public static bool getHasShiftCustomExtras(int device) => m_Config.shiftCustomMapExtras[device].Count > 0;
public static Dictionary<DS4Controls, X360Controls> getShiftCustomButtons(int device) => m_Config.shiftCustomMapButtons[device];
public static Dictionary<DS4Controls, ushort> getShiftCustomKeys(int device) => m_Config.shiftCustomMapKeys[device];
public static Dictionary<DS4Controls, string> getShiftCustomMacros(int device) => m_Config.shiftCustomMapMacros[device];
public static Dictionary<DS4Controls, string> getShiftCustomExtras(int device) => m_Config.shiftCustomMapExtras[device];
public static Dictionary<DS4Controls, DS4KeyType> getShiftCustomKeyTypes(int device) => m_Config.shiftCustomMapKeyTypes[device];
public static bool Load() => m_Config.Load();
public static void LoadProfile(int device, System.Windows.Forms.Control[] buttons, System.Windows.Forms.Control[] shiftbuttons, bool launchprogram, ControlService control)
{
m_Config.LoadProfile(device, buttons, shiftbuttons, launchprogram, control);
@ -678,7 +483,7 @@ namespace DS4Windows
public Boolean startMinimized = false;
public DateTime lastChecked;
public int CheckWhen = 1;
public bool notifications = true;
public int notifications = 2;
public bool disconnectBTAtStop = false;
public bool swipeProfiles = true;
public bool ds4Mapping = true;
@ -700,6 +505,8 @@ namespace DS4Windows
public List<String>[] profileActions = { null, null, null, null, null };
public bool downloadLang = true;
public bool flashWhenLate = true;
public int flashWhenLateAt = 10;
public BackingStore()
{
for (int i = 0; i < 5; i++)
@ -1719,7 +1526,11 @@ namespace DS4Windows
catch { missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/CheckWhen"); Int32.TryParse(Item.InnerText, out CheckWhen); }
catch { missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/Notifications"); Boolean.TryParse(Item.InnerText, out notifications); }
try {
Item = m_Xdoc.SelectSingleNode("/Profile/Notifications");
if (!int.TryParse(Item.InnerText, out notifications))
notifications = (Boolean.Parse(Item.InnerText) ? 2 : 0);
}
catch { missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/DisconnectBTAtStop"); Boolean.TryParse(Item.InnerText, out disconnectBTAtStop); }
catch { missingSetting = true; }
@ -1737,6 +1548,8 @@ namespace DS4Windows
catch { missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/FlashWhenLate"); Boolean.TryParse(Item.InnerText, out flashWhenLate); }
catch { missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/FlashWhenLateAt"); int.TryParse(Item.InnerText, out flashWhenLateAt); }
catch { missingSetting = true; }
}
}
catch { }
@ -1785,6 +1598,7 @@ namespace DS4Windows
XmlNode xmlCloseMini = m_Xdoc.CreateNode(XmlNodeType.Element, "CloseMinimizes", null); xmlCloseMini.InnerText = closeMini.ToString(); Node.AppendChild(xmlCloseMini);
XmlNode xmlDownloadLang = m_Xdoc.CreateNode(XmlNodeType.Element, "DownloadLang", null); xmlDownloadLang.InnerText = downloadLang.ToString(); Node.AppendChild(xmlDownloadLang);
XmlNode xmlFlashWhenLate = m_Xdoc.CreateNode(XmlNodeType.Element, "FlashWhenLate", null); xmlFlashWhenLate.InnerText = flashWhenLate.ToString(); Node.AppendChild(xmlFlashWhenLate);
XmlNode xmlFlashWhenLateAt = m_Xdoc.CreateNode(XmlNodeType.Element, "FlashWhenLateAt", null); xmlFlashWhenLateAt.InnerText = flashWhenLateAt.ToString(); Node.AppendChild(xmlFlashWhenLateAt);
m_Xdoc.AppendChild(Node);
@ -1867,6 +1681,10 @@ namespace DS4Windows
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "BatteryCheck";
el.AppendChild(m_Xdoc.CreateElement("Details")).InnerText = details;
break;
case 7:
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "XboxGameDVR";
el.AppendChild(m_Xdoc.CreateElement("Details")).InnerText = details;
break;
}
if (edit)
{
@ -1974,6 +1792,10 @@ namespace DS4Windows
actions.Add(new SpecialAction(name, controls, type, details));
}
}
else if (type == "XboxGameDVR")
{
actions.Add(new SpecialAction(name, controls, type, details));
}
}
}
catch { saved = false; }

View File

@ -42,10 +42,7 @@ namespace DS4Windows
else
return false;
}
public override string ToString()
{
return ("Red: " + red + " Green: " + green + " Blue: " + blue);
}
public override string ToString() => $"Red: {red} Green: {green} Blue: {blue}";
}
public enum ConnectionType : byte { BT, USB }; // Prioritize Bluetooth when both are connected.
@ -98,17 +95,17 @@ namespace DS4Windows
public event EventHandler<EventArgs> Report = null;
public event EventHandler<EventArgs> Removal = null;
public HidDevice HidDevice { get { return hDevice; } }
public bool IsExclusive { get { return HidDevice.IsExclusive; } }
public HidDevice HidDevice => hDevice;
public bool IsExclusive => HidDevice.IsExclusive;
public bool IsDisconnecting { get; private set; }
public string MacAddress { get { return Mac; } }
public string MacAddress => Mac;
public ConnectionType ConnectionType { get { return conType; } }
public ConnectionType ConnectionType => conType;
public int IdleTimeout { get; set; } // behavior only active when > 0
public int Battery { get { return battery; } }
public bool Charging { get { return charging; } }
public int Battery => battery;
public bool Charging => charging;
public byte RightLightFastRumble
{

View File

@ -1,37 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="14.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')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B1081607-B630-4F57-9580-8A4897145890}</ProjectGuid>
<ProjectGuid>{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DS4Windows</RootNamespace>
<AssemblyName>DS4Windows</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>true</IsWebBootstrapper>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
<PublishUrl>C:\Users\Jonathan\Dropbox\Public\DS4 Tool\</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Background</UpdateMode>
<UpdateInterval>1</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>true</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<InstallUrl>https://dl.dropboxusercontent.com/u/16364552/DS4%2520Tool/</InstallUrl>
<MinimumRequiredVersion>1.0.0.1</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<ApplicationRevision>4</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -41,8 +22,7 @@
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>3</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -52,36 +32,16 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>DS4Windows\DS4W.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<StartupObject>DS4Windows.Program</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>2F336030801042E29CD1F9E43E2FEC00D9702E66</ManifestCertificateThumbprint>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>DS4Windows_TemporaryKey.pfx</ManifestKeyFile>
<ApplicationIcon>Resources\DS4W.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -95,17 +55,11 @@
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DS4Windows\AdvancedColorDialog.cs" />
<Compile Include="DS4Windows\Alreadyrunning.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DS4Windows\Alreadyrunning.Designer.cs">
<DependentUpon>Alreadyrunning.cs</DependentUpon>
</Compile>
<Compile Include="DS4Control\ControlSerivce.cs" />
<Compile Include="DS4Control\DS4LightBar.cs" />
<Compile Include="DS4Control\InputMethods.cs" />
@ -139,6 +93,32 @@
<Compile Include="DS4Library\DS4State.cs" />
<Compile Include="DS4Library\DS4StateExposed.cs" />
<Compile Include="DS4Library\DS4Touchpad.cs" />
<Compile Include="DS4Windows\AdvancedColorDialog.cs" />
<Compile Include="DS4Windows\AdvancedComboBox.cs" />
<Compile Include="DS4Windows\Alreadyrunning.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DS4Windows\Alreadyrunning.Designer.cs">
<DependentUpon>Alreadyrunning.cs</DependentUpon>
</Compile>
<Compile Include="DS4Windows\DS4Form.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DS4Windows\DS4Form.Designer.cs">
<DependentUpon>DS4Form.cs</DependentUpon>
</Compile>
<Compile Include="DS4Windows\DS4Keyboard.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DS4Windows\DS4Keyboard.Designer.cs">
<DependentUpon>DS4Keyboard.cs</DependentUpon>
</Compile>
<Compile Include="DS4Windows\DupBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DS4Windows\DupBox.Designer.cs">
<DependentUpon>DupBox.cs</DependentUpon>
</Compile>
<Compile Include="DS4Windows\Hotkeys.cs">
<SubType>Form</SubType>
</Compile>
@ -151,31 +131,13 @@
<Compile Include="DS4Windows\KBM360.Designer.cs">
<DependentUpon>KBM360.cs</DependentUpon>
</Compile>
<Compile Include="DS4Windows\DupBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DS4Windows\DupBox.Designer.cs">
<DependentUpon>DupBox.cs</DependentUpon>
</Compile>
<Compile Include="DS4Windows\Options.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DS4Windows\Options.Designer.cs">
<DependentUpon>Options.cs</DependentUpon>
</Compile>
<Compile Include="DS4Windows\Program.cs" />
<Compile Include="HidLibrary\Extensions.cs" />
<Compile Include="HidLibrary\HidDevice.cs" />
<Compile Include="HidLibrary\HidDeviceAttributes.cs" />
<Compile Include="HidLibrary\HidDeviceCapabilities.cs" />
<Compile Include="HidLibrary\HidDevices.cs" />
<Compile Include="HidLibrary\NativeMethods.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources1.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="DS4Windows\RecordBox.cs">
<SubType>Form</SubType>
</Compile>
@ -188,12 +150,6 @@
<Compile Include="DS4Windows\SaveWhere.Designer.cs">
<DependentUpon>SaveWhere.cs</DependentUpon>
</Compile>
<Compile Include="DS4Windows\DS4Form.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DS4Windows\DS4Form.Designer.cs">
<DependentUpon>DS4Form.cs</DependentUpon>
</Compile>
<Compile Include="DS4Windows\Settings.cs" />
<Compile Include="DS4Windows\SpecActions.cs">
<SubType>Form</SubType>
@ -213,9 +169,13 @@
<Compile Include="DS4Windows\WinProgs.Designer.cs">
<DependentUpon>WinProgs.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="DS4Windows\DS4Form.tr.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="HidLibrary\Extensions.cs" />
<Compile Include="HidLibrary\HidDevice.cs" />
<Compile Include="HidLibrary\HidDeviceAttributes.cs" />
<Compile Include="HidLibrary\HidDeviceCapabilities.cs" />
<Compile Include="HidLibrary\HidDevices.cs" />
<Compile Include="HidLibrary\NativeMethods.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="DS4Windows\Alreadyrunning.resx">
<DependentUpon>Alreadyrunning.cs</DependentUpon>
</EmbeddedResource>
@ -225,27 +185,51 @@
<EmbeddedResource Include="DS4Windows\DS4Form.es.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DS4Form.fr-FR.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DS4Form.it-IT.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DS4Form.pt-BR.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DS4Form.quz-PE.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DS4Form.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DS4Form.ro-RO.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DS4Form.ru-RU.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DS4Form.tr.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DS4Keyboard.resx">
<DependentUpon>DS4Keyboard.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DupBox.de-DE.resx">
<DependentUpon>DupBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DupBox.es.resx">
<DependentUpon>DupBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DupBox.fr-FR.resx">
<DependentUpon>DupBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DupBox.it-IT.resx">
<DependentUpon>DupBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DupBox.pt-BR.resx">
<DependentUpon>DupBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DupBox.resx">
<DependentUpon>DupBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DupBox.ro-RO.resx">
<DependentUpon>DupBox.cs</DependentUpon>
</EmbeddedResource>
@ -299,16 +283,6 @@
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\KBM360.resx">
<DependentUpon>KBM360.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DupBox.es.resx">
<DependentUpon>DupBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DupBox.fr-FR.resx">
<DependentUpon>DupBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DupBox.resx">
<DependentUpon>DupBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\KBM360.ro-RO.resx">
<DependentUpon>KBM360.cs</DependentUpon>
@ -346,42 +320,6 @@
<EmbeddedResource Include="DS4Windows\Options.tr.resx">
<DependentUpon>Options.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\RecordBox.ro-RO.resx">
<DependentUpon>RecordBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\RecordBox.tr.resx">
<DependentUpon>RecordBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SaveWhere.ro-RO.resx">
<DependentUpon>SaveWhere.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SaveWhere.tr.resx">
<DependentUpon>SaveWhere.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SpecActions.ro-RO.resx">
<DependentUpon>SpecActions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SpecActions.tr.resx">
<DependentUpon>SpecActions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\WelcomeDialog.ro-RO.resx">
<DependentUpon>WelcomeDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\WelcomeDialog.tr.resx">
<DependentUpon>WelcomeDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\WinProgs.ro-RO.resx">
<DependentUpon>WinProgs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\WinProgs.tr.resx">
<DependentUpon>WinProgs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.de-DE.resx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<SubType>Designer</SubType>
<LastGenOutput>Resources1.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\RecordBox.de-DE.resx">
<DependentUpon>RecordBox.cs</DependentUpon>
</EmbeddedResource>
@ -400,14 +338,15 @@
<EmbeddedResource Include="DS4Windows\RecordBox.resx">
<DependentUpon>RecordBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.es.resx" />
<EmbeddedResource Include="Properties\Resources.fr-FR.resx" />
<EmbeddedResource Include="Properties\Resources.pt-BR.resx" />
<EmbeddedResource Include="Properties\Resources.ru-RU.resx" />
<EmbeddedResource Include="Properties\Resources.it-IT.resx" />
<EmbeddedResource Include="DS4Windows\RecordBox.ro-RO.resx">
<DependentUpon>RecordBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\RecordBox.ru-RU.resx">
<DependentUpon>RecordBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\RecordBox.tr.resx">
<DependentUpon>RecordBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SaveWhere.de-DE.resx">
<DependentUpon>SaveWhere.cs</DependentUpon>
</EmbeddedResource>
@ -425,17 +364,16 @@
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SaveWhere.resx">
<DependentUpon>SaveWhere.cs</DependentUpon>
<LastGenOutput>SaveWhere1.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DS4Form.fr-FR.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\DS4Form.resx">
<DependentUpon>DS4Form.cs</DependentUpon>
<EmbeddedResource Include="DS4Windows\SaveWhere.ro-RO.resx">
<DependentUpon>SaveWhere.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SaveWhere.ru-RU.resx">
<DependentUpon>SaveWhere.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SaveWhere.tr.resx">
<DependentUpon>SaveWhere.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SpecActions.de-DE.resx">
<DependentUpon>SpecActions.cs</DependentUpon>
</EmbeddedResource>
@ -451,9 +389,15 @@
<EmbeddedResource Include="DS4Windows\SpecActions.resx">
<DependentUpon>SpecActions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SpecActions.ro-RO.resx">
<DependentUpon>SpecActions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SpecActions.ru-RU.resx">
<DependentUpon>SpecActions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\SpecActions.tr.resx">
<DependentUpon>SpecActions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\WelcomeDialog.de-DE.resx">
<DependentUpon>WelcomeDialog.cs</DependentUpon>
</EmbeddedResource>
@ -472,9 +416,15 @@
<EmbeddedResource Include="DS4Windows\WelcomeDialog.resx">
<DependentUpon>WelcomeDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\WelcomeDialog.ro-RO.resx">
<DependentUpon>WelcomeDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\WelcomeDialog.ru-RU.resx">
<DependentUpon>WelcomeDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\WelcomeDialog.tr.resx">
<DependentUpon>WelcomeDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\WinProgs.de-DE.resx">
<DependentUpon>WinProgs.cs</DependentUpon>
</EmbeddedResource>
@ -493,21 +443,33 @@
<EmbeddedResource Include="DS4Windows\WinProgs.resx">
<DependentUpon>WinProgs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\WinProgs.ro-RO.resx">
<DependentUpon>WinProgs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DS4Windows\WinProgs.ru-RU.resx">
<DependentUpon>WinProgs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.ro-RO.resx" />
<EmbeddedResource Include="Properties\Resources.tr.resx" />
<None Include="App.config">
<EmbeddedResource Include="DS4Windows\WinProgs.tr.resx">
<DependentUpon>WinProgs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.de-DE.resx" />
<EmbeddedResource Include="Properties\Resources.es.resx" />
<EmbeddedResource Include="Properties\Resources.fr-FR.resx" />
<EmbeddedResource Include="Properties\Resources.it-IT.resx" />
<EmbeddedResource Include="Properties\Resources.pt-BR.resx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<SubType>Designer</SubType>
</None>
<None Include="DS4Windows\app.config" />
<None Include="DS4Windows\DS4Tool_TemporaryKey.pfx" />
<None Include="DS4Windows_TemporaryKey.pfx" />
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.ro-RO.resx" />
<EmbeddedResource Include="Properties\Resources.ru-RU.resx" />
<EmbeddedResource Include="Properties\Resources.tr.resx" />
<None Include="app.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Resources1.Designer.cs" />
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
@ -515,93 +477,7 @@
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Resources\size.png" />
<None Include="Resources\xbox_360_controller.png" />
<None Include="Resources\Y.png" />
<None Include="Resources\X.png" />
<None Include="Resources\UP.png" />
<None Include="Resources\START.png" />
<None Include="Resources\x360test.png" />
<None Include="Resources\sticks.png" />
<None Include="Resources\UpperTouch.png" />
<None Include="Resources\shell32_export.png" />
<None Include="Resources\USB.png" />
<None Include="Resources\shell32_copy.png" />
<None Include="Resources\shell32_new.png" />
<None Include="Resources\shell32 delete.png" />
<None Include="Resources\Touch.png" />
<None Include="Resources\Touch states2.png" />
<None Include="Resources\sticks2.png" />
<None Include="Resources\1401402547_menu-24.png" />
<None Include="Resources\delete.png" />
<None Include="Resources\BT.png" />
<None Include="Resources\DS4 Controller.png" />
<None Include="Resources\Clock.png" />
<None Include="Resources\360LS.png" />
<None Include="Resources\360RS.png" />
<None Include="Resources\A.PNG" />
<None Include="Resources\B.png" />
<None Include="Resources\BACK.png" />
<None Include="Resources\DOWN.png" />
<None Include="Resources\360 fades.png" />
<None Include="Resources\checked.png" />
<Content Include="DS4Windows\DS4W.ico" />
<Content Include="HidLibrary\LICENSE.htm" />
<Content Include="Resources\DS4.ico" />
<None Include="Resources\mouse.png" />
<None Include="Resources\rainbow.png" />
<None Include="Resources\rainbowC.png" />
<None Include="Resources\imageres_new.png" />
<None Include="Resources\none.png" />
<None Include="Resources\export.png" />
<None Include="Resources\imageres_import.png" />
<None Include="Resources\saveprofile.png" />
<None Include="Resources\LeftTouch.png" />
<None Include="Resources\MultiTouch.png" />
<None Include="Resources\RightTouch.png" />
<None Include="Resources\Pairmode.png" />
<None Include="Resources\LB.png" />
<None Include="Resources\LEFT.png" />
<None Include="Resources\LS.png" />
<None Include="Resources\LSD.png" />
<None Include="Resources\LSL.png" />
<None Include="Resources\LSR.png" />
<None Include="Resources\LSU.png" />
<None Include="Resources\LT.png" />
<None Include="Resources\RB.png" />
<None Include="Resources\RIGHT.png" />
<None Include="Resources\RS.png" />
<None Include="Resources\RSD.png" />
<None Include="Resources\RSL.png" />
<None Include="Resources\RSR.png" />
<None Include="Resources\RSU.png" />
<None Include="Resources\RT.png" />
<None Include="Resources\Red Circle.png" />
<None Include="Resources\DS4W.ico" />
<None Include="Resources\EE.wav" />
<Content Include="Resources\Scp_All.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
<Visible>False</Visible>
<ProductName>Windows Installer 4.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<COMReference Include="IWshRuntimeLibrary">
@ -615,19 +491,72 @@
</COMReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Downloads\Ookii.Dialogs\src\Ookii.Dialogs\Ookii.Dialogs.csproj">
<Project>{779e62b3-c5a6-494d-9d87-96c0dec7ffb0}</Project>
<Name>Ookii.Dialogs</Name>
</ProjectReference>
<Content Include="HidLibrary\LICENSE.htm" />
<Content Include="Resources\1401402547_menu-24.png" />
<Content Include="Resources\360 fades.png" />
<Content Include="Resources\360LS.png" />
<Content Include="Resources\360RS.png" />
<Content Include="Resources\A.PNG" />
<Content Include="Resources\B.png" />
<Content Include="Resources\BACK.png" />
<Content Include="Resources\BT.png" />
<Content Include="Resources\checked.png" />
<Content Include="Resources\Clock.png" />
<Content Include="Resources\delete.png" />
<Content Include="Resources\DOWN.png" />
<Content Include="Resources\DS4 Controller.png" />
<Content Include="Resources\DS4.ico" />
<Content Include="Resources\DS4W.ico" />
<Content Include="Resources\EE.wav" />
<Content Include="Resources\export.png" />
<Content Include="Resources\imageres_import.png" />
<Content Include="Resources\imageres_new.png" />
<Content Include="Resources\LB.png" />
<Content Include="Resources\LEFT.png" />
<Content Include="Resources\LeftTouch.png" />
<Content Include="Resources\LS.png" />
<Content Include="Resources\LSD.png" />
<Content Include="Resources\LSL.png" />
<Content Include="Resources\LSR.png" />
<Content Include="Resources\LSU.png" />
<Content Include="Resources\LT.png" />
<Content Include="Resources\mouse.png" />
<Content Include="Resources\MultiTouch.png" />
<Content Include="Resources\none.png" />
<Content Include="Resources\Pairmode.png" />
<Content Include="Resources\rainbow.png" />
<Content Include="Resources\rainbowC.png" />
<Content Include="Resources\RB.png" />
<Content Include="Resources\Red Circle.png" />
<Content Include="Resources\RIGHT.png" />
<Content Include="Resources\RightTouch.png" />
<Content Include="Resources\RS.png" />
<Content Include="Resources\RSD.png" />
<Content Include="Resources\RSL.png" />
<Content Include="Resources\RSR.png" />
<Content Include="Resources\RSU.png" />
<Content Include="Resources\RT.png" />
<Content Include="Resources\saveprofile.png" />
<Content Include="Resources\Scp_All.ico" />
<Content Include="Resources\shell32 delete.png" />
<Content Include="Resources\shell32_copy.png" />
<Content Include="Resources\shell32_export.png" />
<Content Include="Resources\shell32_new.png" />
<Content Include="Resources\size.png" />
<Content Include="Resources\START.png" />
<Content Include="Resources\sticks.png" />
<Content Include="Resources\sticks2.png" />
<Content Include="Resources\Touch states2.png" />
<Content Include="Resources\Touch.png" />
<Content Include="Resources\UP.png" />
<Content Include="Resources\UpperTouch.png" />
<Content Include="Resources\USB.png" />
<Content Include="Resources\X.png" />
<Content Include="Resources\x360test.png" />
<Content Include="Resources\xbox_360_controller.png" />
<Content Include="Resources\Y.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>ilmerge /targetplatform:"v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319" /out:Build\DS4Windows.exe DS4Windows.exe Ookii.Dialogs.dll</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@ -114,13 +114,18 @@
this.cBSwipeProfiles = new System.Windows.Forms.CheckBox();
this.StartWindowsCheckBox = new System.Windows.Forms.CheckBox();
this.startMinimizedCheckBox = new System.Windows.Forms.CheckBox();
this.cBNotifications = new System.Windows.Forms.CheckBox();
this.cBDisconnectBT = new System.Windows.Forms.CheckBox();
this.panel2 = new System.Windows.Forms.Panel();
this.nUDLatency = new System.Windows.Forms.NumericUpDown();
this.lbMsLatency = new System.Windows.Forms.Label();
this.cBFlashWhenLate = new System.Windows.Forms.CheckBox();
this.cBCloseMini = new System.Windows.Forms.CheckBox();
this.cBQuickCharge = new System.Windows.Forms.CheckBox();
this.cBUpdate = new System.Windows.Forms.CheckBox();
this.cBDownloadLangauge = new System.Windows.Forms.CheckBox();
this.panel1 = new System.Windows.Forms.Panel();
this.lbNotifications = new System.Windows.Forms.Label();
this.cBoxNotifications = new System.Windows.Forms.ComboBox();
this.pNUpdate = new System.Windows.Forms.Panel();
this.cBUpdateTime = new System.Windows.Forms.ComboBox();
this.lbCheckEvery = new System.Windows.Forms.Label();
@ -135,6 +140,7 @@
this.linkUninstall = new System.Windows.Forms.LinkLabel();
this.linkSetup = new System.Windows.Forms.LinkLabel();
this.lLBUpdate = new System.Windows.Forms.LinkLabel();
this.cBNotifications = new System.Windows.Forms.CheckBox();
this.tabLog = new System.Windows.Forms.TabPage();
this.saveProfiles = new System.Windows.Forms.SaveFileDialog();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
@ -153,6 +159,9 @@
this.toolStrip1.SuspendLayout();
this.tabSettings.SuspendLayout();
this.fLPSettings.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nUDLatency)).BeginInit();
this.panel1.SuspendLayout();
this.pNUpdate.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nUDUpdateTime)).BeginInit();
this.pnlXIPorts.SuspendLayout();
@ -163,13 +172,12 @@
//
// lvDebug
//
resources.ApplyResources(this.lvDebug, "lvDebug");
this.lvDebug.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chTime,
this.chData});
resources.ApplyResources(this.lvDebug, "lvDebug");
this.lvDebug.FullRowSelect = true;
this.lvDebug.Name = "lvDebug";
this.toolTip1.SetToolTip(this.lvDebug, resources.GetString("lvDebug.ToolTip"));
this.lvDebug.UseCompatibleStateImageBehavior = false;
this.lvDebug.View = System.Windows.Forms.View.Details;
this.lvDebug.ItemActivate += new System.EventHandler(this.lvDebug_ItemActivate);
@ -189,27 +197,24 @@
//
// pnlButton
//
resources.ApplyResources(this.pnlButton, "pnlButton");
this.pnlButton.BackColor = System.Drawing.SystemColors.Control;
this.pnlButton.Controls.Add(this.lbTest);
this.pnlButton.Controls.Add(this.btnStartStop);
this.pnlButton.Controls.Add(this.lbLastMessage);
this.pnlButton.Controls.Add(this.llbHelp);
resources.ApplyResources(this.pnlButton, "pnlButton");
this.pnlButton.Name = "pnlButton";
this.toolTip1.SetToolTip(this.pnlButton, resources.GetString("pnlButton.ToolTip"));
this.pnlButton.MouseLeave += new System.EventHandler(this.pnlButton_MouseLeave);
//
// lbTest
//
resources.ApplyResources(this.lbTest, "lbTest");
this.lbTest.Name = "lbTest";
this.toolTip1.SetToolTip(this.lbTest, resources.GetString("lbTest.ToolTip"));
//
// btnStartStop
//
resources.ApplyResources(this.btnStartStop, "btnStartStop");
this.btnStartStop.Name = "btnStartStop";
this.toolTip1.SetToolTip(this.btnStartStop, resources.GetString("btnStartStop.ToolTip"));
this.btnStartStop.UseVisualStyleBackColor = true;
this.btnStartStop.Click += new System.EventHandler(this.btnStartStop_Click);
//
@ -218,7 +223,6 @@
resources.ApplyResources(this.lbLastMessage, "lbLastMessage");
this.lbLastMessage.ForeColor = System.Drawing.SystemColors.GrayText;
this.lbLastMessage.Name = "lbLastMessage";
this.toolTip1.SetToolTip(this.lbLastMessage, resources.GetString("lbLastMessage.ToolTip"));
this.lbLastMessage.MouseHover += new System.EventHandler(this.lbLastMessage_MouseHover);
//
// llbHelp
@ -226,14 +230,12 @@
resources.ApplyResources(this.llbHelp, "llbHelp");
this.llbHelp.Name = "llbHelp";
this.llbHelp.TabStop = true;
this.toolTip1.SetToolTip(this.llbHelp, resources.GetString("llbHelp.ToolTip"));
this.llbHelp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llbHelp_LinkClicked);
//
// btnClear
//
resources.ApplyResources(this.btnClear, "btnClear");
this.btnClear.Name = "btnClear";
this.toolTip1.SetToolTip(this.btnClear, resources.GetString("btnClear.ToolTip"));
this.btnClear.UseVisualStyleBackColor = true;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
@ -248,7 +250,6 @@
//
// cMTaskbar
//
resources.ApplyResources(this.cMTaskbar, "cMTaskbar");
this.cMTaskbar.ImageScalingSize = new System.Drawing.Size(24, 24);
this.cMTaskbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.editProfileForController1ToolStripMenuItem,
@ -260,46 +261,46 @@
this.openToolStripMenuItem,
this.exitToolStripMenuItem});
this.cMTaskbar.Name = "cMTaskbar";
resources.ApplyResources(this.cMTaskbar, "cMTaskbar");
this.cMTaskbar.Tag = "25";
this.toolTip1.SetToolTip(this.cMTaskbar, resources.GetString("cMTaskbar.ToolTip"));
//
// editProfileForController1ToolStripMenuItem
//
resources.ApplyResources(this.editProfileForController1ToolStripMenuItem, "editProfileForController1ToolStripMenuItem");
this.editProfileForController1ToolStripMenuItem.Name = "editProfileForController1ToolStripMenuItem";
resources.ApplyResources(this.editProfileForController1ToolStripMenuItem, "editProfileForController1ToolStripMenuItem");
this.editProfileForController1ToolStripMenuItem.Tag = "0";
this.editProfileForController1ToolStripMenuItem.Click += new System.EventHandler(this.editMenu_Click);
//
// editProfileForController2ToolStripMenuItem
//
resources.ApplyResources(this.editProfileForController2ToolStripMenuItem, "editProfileForController2ToolStripMenuItem");
this.editProfileForController2ToolStripMenuItem.Name = "editProfileForController2ToolStripMenuItem";
resources.ApplyResources(this.editProfileForController2ToolStripMenuItem, "editProfileForController2ToolStripMenuItem");
this.editProfileForController2ToolStripMenuItem.Tag = "1";
this.editProfileForController2ToolStripMenuItem.Click += new System.EventHandler(this.editMenu_Click);
//
// editProfileForController3ToolStripMenuItem
//
resources.ApplyResources(this.editProfileForController3ToolStripMenuItem, "editProfileForController3ToolStripMenuItem");
this.editProfileForController3ToolStripMenuItem.Name = "editProfileForController3ToolStripMenuItem";
resources.ApplyResources(this.editProfileForController3ToolStripMenuItem, "editProfileForController3ToolStripMenuItem");
this.editProfileForController3ToolStripMenuItem.Tag = "2";
this.editProfileForController3ToolStripMenuItem.Click += new System.EventHandler(this.editMenu_Click);
//
// editProfileForController4ToolStripMenuItem
//
resources.ApplyResources(this.editProfileForController4ToolStripMenuItem, "editProfileForController4ToolStripMenuItem");
this.editProfileForController4ToolStripMenuItem.Name = "editProfileForController4ToolStripMenuItem";
resources.ApplyResources(this.editProfileForController4ToolStripMenuItem, "editProfileForController4ToolStripMenuItem");
this.editProfileForController4ToolStripMenuItem.Tag = "4";
this.editProfileForController4ToolStripMenuItem.Click += new System.EventHandler(this.editMenu_Click);
//
// toolStripSeparator1
//
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
//
// startToolStripMenuItem
//
resources.ApplyResources(this.startToolStripMenuItem, "startToolStripMenuItem");
this.startToolStripMenuItem.Name = "startToolStripMenuItem";
resources.ApplyResources(this.startToolStripMenuItem, "startToolStripMenuItem");
this.startToolStripMenuItem.Click += new System.EventHandler(this.startToolStripMenuItem_Click);
//
// openToolStripMenuItem
@ -310,14 +311,14 @@
//
// exitToolStripMenuItem
//
resources.ApplyResources(this.exitToolStripMenuItem, "exitToolStripMenuItem");
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
resources.ApplyResources(this.exitToolStripMenuItem, "exitToolStripMenuItem");
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// toolStripSeparator2
//
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
this.toolStripSeparator2.Name = "toolStripSeparator2";
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
//
// openProfiles
//
@ -326,24 +327,22 @@
//
// tabMain
//
resources.ApplyResources(this.tabMain, "tabMain");
this.tabMain.Controls.Add(this.tabControllers);
this.tabMain.Controls.Add(this.tabProfiles);
this.tabMain.Controls.Add(this.tabAutoProfiles);
this.tabMain.Controls.Add(this.tabSettings);
this.tabMain.Controls.Add(this.tabLog);
resources.ApplyResources(this.tabMain, "tabMain");
this.tabMain.Name = "tabMain";
this.tabMain.SelectedIndex = 0;
this.toolTip1.SetToolTip(this.tabMain, resources.GetString("tabMain.ToolTip"));
this.tabMain.SelectedIndexChanged += new System.EventHandler(this.tabMain_SelectedIndexChanged);
//
// tabControllers
//
resources.ApplyResources(this.tabControllers, "tabControllers");
this.tabControllers.Controls.Add(this.tLPControllers);
this.tabControllers.Controls.Add(this.lbNoControllers);
resources.ApplyResources(this.tabControllers, "tabControllers");
this.tabControllers.Name = "tabControllers";
this.toolTip1.SetToolTip(this.tabControllers, resources.GetString("tabControllers.ToolTip"));
this.tabControllers.UseVisualStyleBackColor = true;
//
// tLPControllers
@ -374,7 +373,6 @@
this.tLPControllers.Controls.Add(this.pBStatus3, 1, 3);
this.tLPControllers.Controls.Add(this.pBStatus4, 1, 4);
this.tLPControllers.Name = "tLPControllers";
this.toolTip1.SetToolTip(this.tLPControllers, resources.GetString("tLPControllers.ToolTip"));
//
// pBStatus1
//
@ -383,7 +381,6 @@
this.pBStatus1.Name = "pBStatus1";
this.pBStatus1.TabStop = false;
this.pBStatus1.Tag = "0";
this.toolTip1.SetToolTip(this.pBStatus1, resources.GetString("pBStatus1.ToolTip"));
this.pBStatus1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.pBStatus_MouseClick);
//
// lbPad1
@ -391,7 +388,6 @@
resources.ApplyResources(this.lbPad1, "lbPad1");
this.lbPad1.Name = "lbPad1";
this.lbPad1.Tag = "0";
this.toolTip1.SetToolTip(this.lbPad1, resources.GetString("lbPad1.ToolTip"));
this.lbPad1.MouseLeave += new System.EventHandler(this.Pads_MouseLeave);
this.lbPad1.MouseHover += new System.EventHandler(this.Pads_MouseHover);
//
@ -400,7 +396,6 @@
resources.ApplyResources(this.lbPad2, "lbPad2");
this.lbPad2.Name = "lbPad2";
this.lbPad2.Tag = "1";
this.toolTip1.SetToolTip(this.lbPad2, resources.GetString("lbPad2.ToolTip"));
this.lbPad2.MouseLeave += new System.EventHandler(this.Pads_MouseLeave);
this.lbPad2.MouseHover += new System.EventHandler(this.Pads_MouseHover);
//
@ -409,7 +404,6 @@
resources.ApplyResources(this.bnEditC3, "bnEditC3");
this.bnEditC3.Name = "bnEditC3";
this.bnEditC3.Tag = "2";
this.toolTip1.SetToolTip(this.bnEditC3, resources.GetString("bnEditC3.ToolTip"));
this.bnEditC3.UseVisualStyleBackColor = true;
this.bnEditC3.Click += new System.EventHandler(this.editButtons_Click);
//
@ -418,7 +412,6 @@
resources.ApplyResources(this.bnEditC4, "bnEditC4");
this.bnEditC4.Name = "bnEditC4";
this.bnEditC4.Tag = "3";
this.toolTip1.SetToolTip(this.bnEditC4, resources.GetString("bnEditC4.ToolTip"));
this.bnEditC4.UseVisualStyleBackColor = true;
this.bnEditC4.Click += new System.EventHandler(this.editButtons_Click);
//
@ -427,7 +420,6 @@
resources.ApplyResources(this.lbPad3, "lbPad3");
this.lbPad3.Name = "lbPad3";
this.lbPad3.Tag = "2";
this.toolTip1.SetToolTip(this.lbPad3, resources.GetString("lbPad3.ToolTip"));
this.lbPad3.MouseLeave += new System.EventHandler(this.Pads_MouseLeave);
this.lbPad3.MouseHover += new System.EventHandler(this.Pads_MouseHover);
//
@ -436,7 +428,6 @@
resources.ApplyResources(this.lbPad4, "lbPad4");
this.lbPad4.Name = "lbPad4";
this.lbPad4.Tag = "3";
this.toolTip1.SetToolTip(this.lbPad4, resources.GetString("lbPad4.ToolTip"));
this.lbPad4.MouseLeave += new System.EventHandler(this.Pads_MouseLeave);
this.lbPad4.MouseHover += new System.EventHandler(this.Pads_MouseHover);
//
@ -447,7 +438,6 @@
this.cBController1.FormattingEnabled = true;
this.cBController1.Name = "cBController1";
this.cBController1.Tag = "0";
this.toolTip1.SetToolTip(this.cBController1, resources.GetString("cBController1.ToolTip"));
this.cBController1.SelectedValueChanged += new System.EventHandler(this.Profile_Changed);
//
// bnEditC2
@ -455,7 +445,6 @@
resources.ApplyResources(this.bnEditC2, "bnEditC2");
this.bnEditC2.Name = "bnEditC2";
this.bnEditC2.Tag = "1";
this.toolTip1.SetToolTip(this.bnEditC2, resources.GetString("bnEditC2.ToolTip"));
this.bnEditC2.UseVisualStyleBackColor = true;
this.bnEditC2.Click += new System.EventHandler(this.editButtons_Click);
//
@ -466,7 +455,6 @@
this.cBController2.FormattingEnabled = true;
this.cBController2.Name = "cBController2";
this.cBController2.Tag = "1";
this.toolTip1.SetToolTip(this.cBController2, resources.GetString("cBController2.ToolTip"));
this.cBController2.SelectedValueChanged += new System.EventHandler(this.Profile_Changed);
//
// cBController3
@ -476,7 +464,6 @@
this.cBController3.FormattingEnabled = true;
this.cBController3.Name = "cBController3";
this.cBController3.Tag = "2";
this.toolTip1.SetToolTip(this.cBController3, resources.GetString("cBController3.ToolTip"));
this.cBController3.SelectedValueChanged += new System.EventHandler(this.Profile_Changed);
//
// bnEditC1
@ -484,7 +471,6 @@
resources.ApplyResources(this.bnEditC1, "bnEditC1");
this.bnEditC1.Name = "bnEditC1";
this.bnEditC1.Tag = "0";
this.toolTip1.SetToolTip(this.bnEditC1, resources.GetString("bnEditC1.ToolTip"));
this.bnEditC1.UseVisualStyleBackColor = true;
this.bnEditC1.Click += new System.EventHandler(this.editButtons_Click);
//
@ -495,56 +481,47 @@
this.cBController4.FormattingEnabled = true;
this.cBController4.Name = "cBController4";
this.cBController4.Tag = "3";
this.toolTip1.SetToolTip(this.cBController4, resources.GetString("cBController4.ToolTip"));
this.cBController4.SelectedValueChanged += new System.EventHandler(this.Profile_Changed);
//
// lbSelectedProfile
//
resources.ApplyResources(this.lbSelectedProfile, "lbSelectedProfile");
this.lbSelectedProfile.Name = "lbSelectedProfile";
this.toolTip1.SetToolTip(this.lbSelectedProfile, resources.GetString("lbSelectedProfile.ToolTip"));
//
// lbID
//
resources.ApplyResources(this.lbID, "lbID");
this.lbID.Name = "lbID";
this.toolTip1.SetToolTip(this.lbID, resources.GetString("lbID.ToolTip"));
//
// lbStatus
//
resources.ApplyResources(this.lbStatus, "lbStatus");
this.lbStatus.Name = "lbStatus";
this.toolTip1.SetToolTip(this.lbStatus, resources.GetString("lbStatus.ToolTip"));
//
// lbBattery
//
resources.ApplyResources(this.lbBattery, "lbBattery");
this.lbBattery.Name = "lbBattery";
this.toolTip1.SetToolTip(this.lbBattery, resources.GetString("lbBattery.ToolTip"));
//
// lbBatt1
//
resources.ApplyResources(this.lbBatt1, "lbBatt1");
this.lbBatt1.Name = "lbBatt1";
this.toolTip1.SetToolTip(this.lbBatt1, resources.GetString("lbBatt1.ToolTip"));
//
// lbBatt2
//
resources.ApplyResources(this.lbBatt2, "lbBatt2");
this.lbBatt2.Name = "lbBatt2";
this.toolTip1.SetToolTip(this.lbBatt2, resources.GetString("lbBatt2.ToolTip"));
//
// lbBatt3
//
resources.ApplyResources(this.lbBatt3, "lbBatt3");
this.lbBatt3.Name = "lbBatt3";
this.toolTip1.SetToolTip(this.lbBatt3, resources.GetString("lbBatt3.ToolTip"));
//
// lbBatt4
//
resources.ApplyResources(this.lbBatt4, "lbBatt4");
this.lbBatt4.Name = "lbBatt4";
this.toolTip1.SetToolTip(this.lbBatt4, resources.GetString("lbBatt4.ToolTip"));
//
// pBStatus2
//
@ -553,7 +530,6 @@
this.pBStatus2.Name = "pBStatus2";
this.pBStatus2.TabStop = false;
this.pBStatus2.Tag = "1";
this.toolTip1.SetToolTip(this.pBStatus2, resources.GetString("pBStatus2.ToolTip"));
this.pBStatus2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.pBStatus_MouseClick);
//
// pBStatus3
@ -563,7 +539,6 @@
this.pBStatus3.Name = "pBStatus3";
this.pBStatus3.TabStop = false;
this.pBStatus3.Tag = "2";
this.toolTip1.SetToolTip(this.pBStatus3, resources.GetString("pBStatus3.ToolTip"));
this.pBStatus3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.pBStatus_MouseClick);
//
// pBStatus4
@ -573,41 +548,36 @@
this.pBStatus4.Name = "pBStatus4";
this.pBStatus4.TabStop = false;
this.pBStatus4.Tag = "3";
this.toolTip1.SetToolTip(this.pBStatus4, resources.GetString("pBStatus4.ToolTip"));
this.pBStatus4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.pBStatus_MouseClick);
//
// lbNoControllers
//
resources.ApplyResources(this.lbNoControllers, "lbNoControllers");
this.lbNoControllers.Name = "lbNoControllers";
this.toolTip1.SetToolTip(this.lbNoControllers, resources.GetString("lbNoControllers.ToolTip"));
//
// tabProfiles
//
resources.ApplyResources(this.tabProfiles, "tabProfiles");
this.tabProfiles.Controls.Add(this.lBProfiles);
this.tabProfiles.Controls.Add(this.tSOptions);
this.tabProfiles.Controls.Add(this.toolStrip1);
resources.ApplyResources(this.tabProfiles, "tabProfiles");
this.tabProfiles.Name = "tabProfiles";
this.toolTip1.SetToolTip(this.tabProfiles, resources.GetString("tabProfiles.ToolTip"));
this.tabProfiles.UseVisualStyleBackColor = true;
//
// lBProfiles
//
resources.ApplyResources(this.lBProfiles, "lBProfiles");
this.lBProfiles.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.lBProfiles.ContextMenuStrip = this.cMProfile;
resources.ApplyResources(this.lBProfiles, "lBProfiles");
this.lBProfiles.FormattingEnabled = true;
this.lBProfiles.MultiColumn = true;
this.lBProfiles.Name = "lBProfiles";
this.toolTip1.SetToolTip(this.lBProfiles, resources.GetString("lBProfiles.ToolTip"));
this.lBProfiles.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lBProfiles_KeyDown);
this.lBProfiles.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lBProfiles_MouseDoubleClick);
this.lBProfiles.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lBProfiles_MouseDown);
//
// cMProfile
//
resources.ApplyResources(this.cMProfile, "cMProfile");
this.cMProfile.ImageScalingSize = new System.Drawing.Size(24, 24);
this.cMProfile.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.editToolStripMenuItem,
@ -621,7 +591,7 @@
this.importToolStripMenuItem,
this.exportToolStripMenuItem});
this.cMProfile.Name = "cMProfile";
this.toolTip1.SetToolTip(this.cMProfile, resources.GetString("cMProfile.ToolTip"));
resources.ApplyResources(this.cMProfile, "cMProfile");
//
// editToolStripMenuItem
//
@ -631,61 +601,60 @@
//
// assignToController1ToolStripMenuItem
//
resources.ApplyResources(this.assignToController1ToolStripMenuItem, "assignToController1ToolStripMenuItem");
this.assignToController1ToolStripMenuItem.Name = "assignToController1ToolStripMenuItem";
resources.ApplyResources(this.assignToController1ToolStripMenuItem, "assignToController1ToolStripMenuItem");
this.assignToController1ToolStripMenuItem.Click += new System.EventHandler(this.assignToController1ToolStripMenuItem_Click);
//
// assignToController2ToolStripMenuItem
//
resources.ApplyResources(this.assignToController2ToolStripMenuItem, "assignToController2ToolStripMenuItem");
this.assignToController2ToolStripMenuItem.Name = "assignToController2ToolStripMenuItem";
resources.ApplyResources(this.assignToController2ToolStripMenuItem, "assignToController2ToolStripMenuItem");
this.assignToController2ToolStripMenuItem.Click += new System.EventHandler(this.assignToController2ToolStripMenuItem_Click);
//
// assignToController3ToolStripMenuItem
//
resources.ApplyResources(this.assignToController3ToolStripMenuItem, "assignToController3ToolStripMenuItem");
this.assignToController3ToolStripMenuItem.Name = "assignToController3ToolStripMenuItem";
resources.ApplyResources(this.assignToController3ToolStripMenuItem, "assignToController3ToolStripMenuItem");
this.assignToController3ToolStripMenuItem.Click += new System.EventHandler(this.assignToController3ToolStripMenuItem_Click);
//
// assignToController4ToolStripMenuItem
//
resources.ApplyResources(this.assignToController4ToolStripMenuItem, "assignToController4ToolStripMenuItem");
this.assignToController4ToolStripMenuItem.Name = "assignToController4ToolStripMenuItem";
resources.ApplyResources(this.assignToController4ToolStripMenuItem, "assignToController4ToolStripMenuItem");
this.assignToController4ToolStripMenuItem.Click += new System.EventHandler(this.assignToController4ToolStripMenuItem_Click);
//
// deleteToolStripMenuItem
//
resources.ApplyResources(this.deleteToolStripMenuItem, "deleteToolStripMenuItem");
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
resources.ApplyResources(this.deleteToolStripMenuItem, "deleteToolStripMenuItem");
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.tsBDeleteProfle_Click);
//
// duplicateToolStripMenuItem
//
resources.ApplyResources(this.duplicateToolStripMenuItem, "duplicateToolStripMenuItem");
this.duplicateToolStripMenuItem.Name = "duplicateToolStripMenuItem";
resources.ApplyResources(this.duplicateToolStripMenuItem, "duplicateToolStripMenuItem");
this.duplicateToolStripMenuItem.Click += new System.EventHandler(this.tSBDupProfile_Click);
//
// newProfileToolStripMenuItem
//
resources.ApplyResources(this.newProfileToolStripMenuItem, "newProfileToolStripMenuItem");
this.newProfileToolStripMenuItem.Name = "newProfileToolStripMenuItem";
resources.ApplyResources(this.newProfileToolStripMenuItem, "newProfileToolStripMenuItem");
this.newProfileToolStripMenuItem.Click += new System.EventHandler(this.tsBNewProfile_Click);
//
// importToolStripMenuItem
//
resources.ApplyResources(this.importToolStripMenuItem, "importToolStripMenuItem");
this.importToolStripMenuItem.Name = "importToolStripMenuItem";
resources.ApplyResources(this.importToolStripMenuItem, "importToolStripMenuItem");
this.importToolStripMenuItem.Click += new System.EventHandler(this.tSBImportProfile_Click);
//
// exportToolStripMenuItem
//
resources.ApplyResources(this.exportToolStripMenuItem, "exportToolStripMenuItem");
this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
resources.ApplyResources(this.exportToolStripMenuItem, "exportToolStripMenuItem");
this.exportToolStripMenuItem.Click += new System.EventHandler(this.tSBExportProfile_Click);
//
// tSOptions
//
resources.ApplyResources(this.tSOptions, "tSOptions");
this.tSOptions.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.tSOptions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripLabel1,
@ -694,55 +663,54 @@
this.tSBCancel,
this.toolStripSeparator3,
this.tSBKeepSize});
resources.ApplyResources(this.tSOptions, "tSOptions");
this.tSOptions.Name = "tSOptions";
this.tSOptions.ShowItemToolTips = false;
this.toolTip1.SetToolTip(this.tSOptions, resources.GetString("tSOptions.ToolTip"));
//
// toolStripLabel1
//
resources.ApplyResources(this.toolStripLabel1, "toolStripLabel1");
this.toolStripLabel1.Name = "toolStripLabel1";
resources.ApplyResources(this.toolStripLabel1, "toolStripLabel1");
//
// tSTBProfile
//
resources.ApplyResources(this.tSTBProfile, "tSTBProfile");
this.tSTBProfile.ForeColor = System.Drawing.SystemColors.GrayText;
this.tSTBProfile.Name = "tSTBProfile";
resources.ApplyResources(this.tSTBProfile, "tSTBProfile");
this.tSTBProfile.Enter += new System.EventHandler(this.tBProfile_Enter);
this.tSTBProfile.Leave += new System.EventHandler(this.tBProfile_Leave);
this.tSTBProfile.TextChanged += new System.EventHandler(this.tBProfile_TextChanged);
//
// tSBSaveProfile
//
resources.ApplyResources(this.tSBSaveProfile, "tSBSaveProfile");
this.tSBSaveProfile.AutoToolTip = false;
this.tSBSaveProfile.Image = global::DS4Windows.Properties.Resources.saveprofile;
resources.ApplyResources(this.tSBSaveProfile, "tSBSaveProfile");
this.tSBSaveProfile.Name = "tSBSaveProfile";
this.tSBSaveProfile.Click += new System.EventHandler(this.tSBSaveProfile_Click);
//
// tSBCancel
//
resources.ApplyResources(this.tSBCancel, "tSBCancel");
this.tSBCancel.AutoToolTip = false;
this.tSBCancel.Image = global::DS4Windows.Properties.Resources.delete;
resources.ApplyResources(this.tSBCancel, "tSBCancel");
this.tSBCancel.Name = "tSBCancel";
this.tSBCancel.Click += new System.EventHandler(this.tSBCancel_Click);
//
// toolStripSeparator3
//
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
this.toolStripSeparator3.Name = "toolStripSeparator3";
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
//
// tSBKeepSize
//
resources.ApplyResources(this.tSBKeepSize, "tSBKeepSize");
this.tSBKeepSize.Image = global::DS4Windows.Properties.Resources.size;
resources.ApplyResources(this.tSBKeepSize, "tSBKeepSize");
this.tSBKeepSize.Name = "tSBKeepSize";
this.tSBKeepSize.Click += new System.EventHandler(this.tSBKeepSize_Click);
//
// toolStrip1
//
resources.ApplyResources(this.toolStrip1, "toolStrip1");
this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsBNewProfle,
@ -751,20 +719,20 @@
this.tSBDupProfile,
this.tSBImportProfile,
this.tSBExportProfile});
resources.ApplyResources(this.toolStrip1, "toolStrip1");
this.toolStrip1.Name = "toolStrip1";
this.toolTip1.SetToolTip(this.toolStrip1, resources.GetString("toolStrip1.ToolTip"));
//
// tsBNewProfle
//
resources.ApplyResources(this.tsBNewProfle, "tsBNewProfle");
this.tsBNewProfle.Image = global::DS4Windows.Properties.Resources.newprofile;
resources.ApplyResources(this.tsBNewProfle, "tsBNewProfle");
this.tsBNewProfle.Name = "tsBNewProfle";
this.tsBNewProfle.Click += new System.EventHandler(this.tsBNewProfile_Click);
//
// tsBEditProfile
//
resources.ApplyResources(this.tsBEditProfile, "tsBEditProfile");
this.tsBEditProfile.Image = global::DS4Windows.Properties.Resources.edit;
resources.ApplyResources(this.tsBEditProfile, "tsBEditProfile");
this.tsBEditProfile.Name = "tsBEditProfile";
this.tsBEditProfile.Click += new System.EventHandler(this.tsBNEditProfile_Click);
//
@ -782,8 +750,8 @@
//
// tSBImportProfile
//
resources.ApplyResources(this.tSBImportProfile, "tSBImportProfile");
this.tSBImportProfile.Image = global::DS4Windows.Properties.Resources.import;
resources.ApplyResources(this.tSBImportProfile, "tSBImportProfile");
this.tSBImportProfile.Name = "tSBImportProfile";
this.tSBImportProfile.Click += new System.EventHandler(this.tSBImportProfile_Click);
//
@ -797,15 +765,13 @@
//
resources.ApplyResources(this.tabAutoProfiles, "tabAutoProfiles");
this.tabAutoProfiles.Name = "tabAutoProfiles";
this.toolTip1.SetToolTip(this.tabAutoProfiles, resources.GetString("tabAutoProfiles.ToolTip"));
this.tabAutoProfiles.UseVisualStyleBackColor = true;
//
// tabSettings
//
resources.ApplyResources(this.tabSettings, "tabSettings");
this.tabSettings.Controls.Add(this.fLPSettings);
resources.ApplyResources(this.tabSettings, "tabSettings");
this.tabSettings.Name = "tabSettings";
this.toolTip1.SetToolTip(this.tabSettings, resources.GetString("tabSettings.ToolTip"));
this.tabSettings.UseVisualStyleBackColor = true;
//
// fLPSettings
@ -815,24 +781,23 @@
this.fLPSettings.Controls.Add(this.cBSwipeProfiles);
this.fLPSettings.Controls.Add(this.StartWindowsCheckBox);
this.fLPSettings.Controls.Add(this.startMinimizedCheckBox);
this.fLPSettings.Controls.Add(this.cBNotifications);
this.fLPSettings.Controls.Add(this.panel1);
this.fLPSettings.Controls.Add(this.cBDisconnectBT);
this.fLPSettings.Controls.Add(this.cBFlashWhenLate);
this.fLPSettings.Controls.Add(this.panel2);
this.fLPSettings.Controls.Add(this.cBCloseMini);
this.fLPSettings.Controls.Add(this.cBQuickCharge);
this.fLPSettings.Controls.Add(this.cBUpdate);
this.fLPSettings.Controls.Add(this.cBDownloadLangauge);
this.fLPSettings.Controls.Add(this.cBUpdate);
this.fLPSettings.Controls.Add(this.pNUpdate);
this.fLPSettings.Controls.Add(this.pnlXIPorts);
this.fLPSettings.Controls.Add(this.flowLayoutPanel1);
this.fLPSettings.Controls.Add(this.cBNotifications);
this.fLPSettings.Name = "fLPSettings";
this.toolTip1.SetToolTip(this.fLPSettings, resources.GetString("fLPSettings.ToolTip"));
//
// hideDS4CheckBox
//
resources.ApplyResources(this.hideDS4CheckBox, "hideDS4CheckBox");
this.hideDS4CheckBox.Name = "hideDS4CheckBox";
this.toolTip1.SetToolTip(this.hideDS4CheckBox, resources.GetString("hideDS4CheckBox.ToolTip"));
this.hideDS4CheckBox.UseVisualStyleBackColor = true;
this.hideDS4CheckBox.CheckedChanged += new System.EventHandler(this.hideDS4CheckBox_CheckedChanged);
//
@ -842,7 +807,6 @@
this.cBSwipeProfiles.Checked = true;
this.cBSwipeProfiles.CheckState = System.Windows.Forms.CheckState.Checked;
this.cBSwipeProfiles.Name = "cBSwipeProfiles";
this.toolTip1.SetToolTip(this.cBSwipeProfiles, resources.GetString("cBSwipeProfiles.ToolTip"));
this.cBSwipeProfiles.UseVisualStyleBackColor = true;
this.cBSwipeProfiles.CheckedChanged += new System.EventHandler(this.cBSwipeProfiles_CheckedChanged);
//
@ -850,7 +814,6 @@
//
resources.ApplyResources(this.StartWindowsCheckBox, "StartWindowsCheckBox");
this.StartWindowsCheckBox.Name = "StartWindowsCheckBox";
this.toolTip1.SetToolTip(this.StartWindowsCheckBox, resources.GetString("StartWindowsCheckBox.ToolTip"));
this.StartWindowsCheckBox.UseVisualStyleBackColor = true;
this.StartWindowsCheckBox.CheckedChanged += new System.EventHandler(this.StartWindowsCheckBox_CheckedChanged);
//
@ -858,33 +821,51 @@
//
resources.ApplyResources(this.startMinimizedCheckBox, "startMinimizedCheckBox");
this.startMinimizedCheckBox.Name = "startMinimizedCheckBox";
this.toolTip1.SetToolTip(this.startMinimizedCheckBox, resources.GetString("startMinimizedCheckBox.ToolTip"));
this.startMinimizedCheckBox.UseVisualStyleBackColor = true;
this.startMinimizedCheckBox.CheckedChanged += new System.EventHandler(this.startMinimizedCheckBox_CheckedChanged);
//
// cBNotifications
//
resources.ApplyResources(this.cBNotifications, "cBNotifications");
this.cBNotifications.Name = "cBNotifications";
this.toolTip1.SetToolTip(this.cBNotifications, resources.GetString("cBNotifications.ToolTip"));
this.cBNotifications.UseVisualStyleBackColor = true;
this.cBNotifications.CheckedChanged += new System.EventHandler(this.cBNotifications_CheckedChanged);
//
// cBDisconnectBT
//
resources.ApplyResources(this.cBDisconnectBT, "cBDisconnectBT");
this.cBDisconnectBT.Name = "cBDisconnectBT";
this.toolTip1.SetToolTip(this.cBDisconnectBT, resources.GetString("cBDisconnectBT.ToolTip"));
this.cBDisconnectBT.UseVisualStyleBackColor = true;
this.cBDisconnectBT.CheckedChanged += new System.EventHandler(this.cBDisconnectBT_CheckedChanged);
//
// panel2
//
this.panel2.Controls.Add(this.nUDLatency);
this.panel2.Controls.Add(this.lbMsLatency);
this.panel2.Controls.Add(this.cBFlashWhenLate);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// nUDLatency
//
resources.ApplyResources(this.nUDLatency, "nUDLatency");
this.nUDLatency.Minimum = new decimal(new int[] {
5,
0,
0,
0});
this.nUDLatency.Name = "nUDLatency";
this.nUDLatency.Value = new decimal(new int[] {
10,
0,
0,
0});
this.nUDLatency.ValueChanged += new System.EventHandler(this.nUDLatency_ValueChanged);
//
// lbMsLatency
//
resources.ApplyResources(this.lbMsLatency, "lbMsLatency");
this.lbMsLatency.Name = "lbMsLatency";
//
// cBFlashWhenLate
//
resources.ApplyResources(this.cBFlashWhenLate, "cBFlashWhenLate");
this.cBFlashWhenLate.Checked = true;
this.cBFlashWhenLate.CheckState = System.Windows.Forms.CheckState.Checked;
this.cBFlashWhenLate.Name = "cBFlashWhenLate";
this.toolTip1.SetToolTip(this.cBFlashWhenLate, resources.GetString("cBFlashWhenLate.ToolTip"));
this.cBFlashWhenLate.UseVisualStyleBackColor = true;
this.cBFlashWhenLate.CheckedChanged += new System.EventHandler(this.cBFlashWhenLate_CheckedChanged);
//
@ -892,7 +873,6 @@
//
resources.ApplyResources(this.cBCloseMini, "cBCloseMini");
this.cBCloseMini.Name = "cBCloseMini";
this.toolTip1.SetToolTip(this.cBCloseMini, resources.GetString("cBCloseMini.ToolTip"));
this.cBCloseMini.UseVisualStyleBackColor = true;
this.cBCloseMini.CheckedChanged += new System.EventHandler(this.cBCloseMini_CheckedChanged);
//
@ -900,7 +880,6 @@
//
resources.ApplyResources(this.cBQuickCharge, "cBQuickCharge");
this.cBQuickCharge.Name = "cBQuickCharge";
this.toolTip1.SetToolTip(this.cBQuickCharge, resources.GetString("cBQuickCharge.ToolTip"));
this.cBQuickCharge.UseVisualStyleBackColor = true;
this.cBQuickCharge.CheckedChanged += new System.EventHandler(this.cBQuickCharge_CheckedChanged);
//
@ -908,7 +887,6 @@
//
resources.ApplyResources(this.cBUpdate, "cBUpdate");
this.cBUpdate.Name = "cBUpdate";
this.toolTip1.SetToolTip(this.cBUpdate, resources.GetString("cBUpdate.ToolTip"));
this.cBUpdate.UseVisualStyleBackColor = true;
this.cBUpdate.CheckedChanged += new System.EventHandler(this.cBUpdate_CheckedChanged);
//
@ -918,18 +896,40 @@
this.cBDownloadLangauge.Checked = true;
this.cBDownloadLangauge.CheckState = System.Windows.Forms.CheckState.Checked;
this.cBDownloadLangauge.Name = "cBDownloadLangauge";
this.toolTip1.SetToolTip(this.cBDownloadLangauge, resources.GetString("cBDownloadLangauge.ToolTip"));
this.cBDownloadLangauge.UseVisualStyleBackColor = true;
this.cBDownloadLangauge.CheckedChanged += new System.EventHandler(this.cBDownloadLangauge_CheckedChanged);
//
// panel1
//
this.panel1.Controls.Add(this.lbNotifications);
this.panel1.Controls.Add(this.cBoxNotifications);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// lbNotifications
//
resources.ApplyResources(this.lbNotifications, "lbNotifications");
this.lbNotifications.Name = "lbNotifications";
//
// cBoxNotifications
//
resources.ApplyResources(this.cBoxNotifications, "cBoxNotifications");
this.cBoxNotifications.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cBoxNotifications.FormattingEnabled = true;
this.cBoxNotifications.Items.AddRange(new object[] {
resources.GetString("cBoxNotifications.Items"),
resources.GetString("cBoxNotifications.Items1"),
resources.GetString("cBoxNotifications.Items2")});
this.cBoxNotifications.Name = "cBoxNotifications";
this.cBoxNotifications.SelectedIndexChanged += new System.EventHandler(this.cBoxNotifications_SelectedIndexChanged);
//
// pNUpdate
//
resources.ApplyResources(this.pNUpdate, "pNUpdate");
this.pNUpdate.Controls.Add(this.cBUpdateTime);
this.pNUpdate.Controls.Add(this.lbCheckEvery);
this.pNUpdate.Controls.Add(this.nUDUpdateTime);
resources.ApplyResources(this.pNUpdate, "pNUpdate");
this.pNUpdate.Name = "pNUpdate";
this.toolTip1.SetToolTip(this.pNUpdate, resources.GetString("pNUpdate.ToolTip"));
//
// cBUpdateTime
//
@ -940,14 +940,12 @@
resources.GetString("cBUpdateTime.Items"),
resources.GetString("cBUpdateTime.Items1")});
this.cBUpdateTime.Name = "cBUpdateTime";
this.toolTip1.SetToolTip(this.cBUpdateTime, resources.GetString("cBUpdateTime.ToolTip"));
this.cBUpdateTime.SelectedIndexChanged += new System.EventHandler(this.cBUpdateTime_SelectedIndexChanged);
//
// lbCheckEvery
//
resources.ApplyResources(this.lbCheckEvery, "lbCheckEvery");
this.lbCheckEvery.Name = "lbCheckEvery";
this.toolTip1.SetToolTip(this.lbCheckEvery, resources.GetString("lbCheckEvery.ToolTip"));
//
// nUDUpdateTime
//
@ -958,17 +956,15 @@
0,
0});
this.nUDUpdateTime.Name = "nUDUpdateTime";
this.toolTip1.SetToolTip(this.nUDUpdateTime, resources.GetString("nUDUpdateTime.ToolTip"));
this.nUDUpdateTime.ValueChanged += new System.EventHandler(this.nUDUpdateTime_ValueChanged);
//
// pnlXIPorts
//
resources.ApplyResources(this.pnlXIPorts, "pnlXIPorts");
this.pnlXIPorts.Controls.Add(this.lbUseXIPorts);
this.pnlXIPorts.Controls.Add(this.nUDXIPorts);
this.pnlXIPorts.Controls.Add(this.lbLastXIPort);
resources.ApplyResources(this.pnlXIPorts, "pnlXIPorts");
this.pnlXIPorts.Name = "pnlXIPorts";
this.toolTip1.SetToolTip(this.pnlXIPorts, resources.GetString("pnlXIPorts.ToolTip"));
this.pnlXIPorts.MouseEnter += new System.EventHandler(this.pnlXIPorts_MouseEnter);
this.pnlXIPorts.MouseLeave += new System.EventHandler(this.pnlXIPorts_MouseLeave);
//
@ -976,7 +972,6 @@
//
resources.ApplyResources(this.lbUseXIPorts, "lbUseXIPorts");
this.lbUseXIPorts.Name = "lbUseXIPorts";
this.toolTip1.SetToolTip(this.lbUseXIPorts, resources.GetString("lbUseXIPorts.ToolTip"));
//
// nUDXIPorts
//
@ -992,7 +987,6 @@
0,
0});
this.nUDXIPorts.Name = "nUDXIPorts";
this.toolTip1.SetToolTip(this.nUDXIPorts, resources.GetString("nUDXIPorts.ToolTip"));
this.nUDXIPorts.Value = new decimal(new int[] {
1,
0,
@ -1006,7 +1000,6 @@
//
resources.ApplyResources(this.lbLastXIPort, "lbLastXIPort");
this.lbLastXIPort.Name = "lbLastXIPort";
this.toolTip1.SetToolTip(this.lbLastXIPort, resources.GetString("lbLastXIPort.ToolTip"));
//
// flowLayoutPanel1
//
@ -1017,14 +1010,12 @@
this.flowLayoutPanel1.Controls.Add(this.linkSetup);
this.flowLayoutPanel1.Controls.Add(this.lLBUpdate);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.toolTip1.SetToolTip(this.flowLayoutPanel1, resources.GetString("flowLayoutPanel1.ToolTip"));
//
// linkProfiles
//
resources.ApplyResources(this.linkProfiles, "linkProfiles");
this.linkProfiles.Name = "linkProfiles";
this.linkProfiles.TabStop = true;
this.toolTip1.SetToolTip(this.linkProfiles, resources.GetString("linkProfiles.ToolTip"));
this.linkProfiles.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkProfiles_LinkClicked);
//
// lnkControllers
@ -1032,7 +1023,6 @@
resources.ApplyResources(this.lnkControllers, "lnkControllers");
this.lnkControllers.Name = "lnkControllers";
this.lnkControllers.TabStop = true;
this.toolTip1.SetToolTip(this.lnkControllers, resources.GetString("lnkControllers.ToolTip"));
this.lnkControllers.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkControllers_LinkClicked);
//
// linkUninstall
@ -1040,7 +1030,6 @@
resources.ApplyResources(this.linkUninstall, "linkUninstall");
this.linkUninstall.Name = "linkUninstall";
this.linkUninstall.TabStop = true;
this.toolTip1.SetToolTip(this.linkUninstall, resources.GetString("linkUninstall.ToolTip"));
this.linkUninstall.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkUninstall_LinkClicked);
//
// linkSetup
@ -1048,7 +1037,6 @@
resources.ApplyResources(this.linkSetup, "linkSetup");
this.linkSetup.Name = "linkSetup";
this.linkSetup.TabStop = true;
this.toolTip1.SetToolTip(this.linkSetup, resources.GetString("linkSetup.ToolTip"));
this.linkSetup.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lLSetup_LinkClicked);
//
// lLBUpdate
@ -1056,16 +1044,21 @@
resources.ApplyResources(this.lLBUpdate, "lLBUpdate");
this.lLBUpdate.Name = "lLBUpdate";
this.lLBUpdate.TabStop = true;
this.toolTip1.SetToolTip(this.lLBUpdate, resources.GetString("lLBUpdate.ToolTip"));
this.lLBUpdate.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lLBUpdate_LinkClicked);
//
// cBNotifications
//
resources.ApplyResources(this.cBNotifications, "cBNotifications");
this.cBNotifications.Name = "cBNotifications";
this.cBNotifications.UseVisualStyleBackColor = true;
this.cBNotifications.CheckedChanged += new System.EventHandler(this.cBNotifications_CheckedChanged);
//
// tabLog
//
resources.ApplyResources(this.tabLog, "tabLog");
this.tabLog.Controls.Add(this.lvDebug);
this.tabLog.Controls.Add(this.btnClear);
resources.ApplyResources(this.tabLog, "tabLog");
this.tabLog.Name = "tabLog";
this.toolTip1.SetToolTip(this.tabLog, resources.GetString("tabLog.ToolTip"));
this.tabLog.UseVisualStyleBackColor = true;
//
// saveProfiles
@ -1074,14 +1067,13 @@
//
// DS4Form
//
resources.ApplyResources(this, "$this");
this.AllowDrop = true;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.tabMain);
this.Controls.Add(this.pnlButton);
this.Name = "DS4Form";
this.toolTip1.SetToolTip(this, resources.GetString("$this.ToolTip"));
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ScpForm_Closing);
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.ScpForm_DragDrop);
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.ScpForm_DragEnter);
@ -1107,6 +1099,11 @@
this.tabSettings.ResumeLayout(false);
this.fLPSettings.ResumeLayout(false);
this.fLPSettings.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nUDLatency)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.pNUpdate.ResumeLayout(false);
this.pNUpdate.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nUDUpdateTime)).EndInit();
@ -1230,6 +1227,12 @@
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.CheckBox cBDownloadLangauge;
private System.Windows.Forms.CheckBox cBFlashWhenLate;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label lbNotifications;
private System.Windows.Forms.ComboBox cBoxNotifications;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.NumericUpDown nUDLatency;
private System.Windows.Forms.Label lbMsLatency;
//private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
}
}

View File

@ -14,7 +14,7 @@ using System.Text;
using System.Globalization;
using System.Threading.Tasks;
using System.ServiceProcess;
using static DS4Windows.Global;
namespace DS4Windows
{
public partial class DS4Form : Form
@ -29,7 +29,7 @@ namespace DS4Windows
WebClient wc = new WebClient();
Timer test = new Timer(), hotkeysTimer = new Timer();
string exepath = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName;
string appdatapath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Windows";
string appDataPpath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Windows";
string oldappdatapath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool";
string tempProfileProgram = "null";
float dpix, dpiy;
@ -46,7 +46,7 @@ namespace DS4Windows
WinProgs WP;
public bool mAllowVisible;
bool contextclose;
string logFile = Global.appdatapath + @"\DS4Service.log";
string logFile = appdatapath + @"\DS4Service.log";
StreamWriter logWriter;
//bool outputlog = false;
@ -87,34 +87,34 @@ namespace DS4Windows
tSOptions.Visible = false;
bool firstrun = false;
if (File.Exists(exepath + "\\Auto Profiles.xml")
&& File.Exists(appdatapath + "\\Auto Profiles.xml"))
&& File.Exists(appDataPpath + "\\Auto Profiles.xml"))
{
firstrun = true;
new SaveWhere(true).ShowDialog();
}
else if (File.Exists(exepath + "\\Auto Profiles.xml"))
Global.SaveWhere(exepath);
else if (File.Exists(appdatapath + "\\Auto Profiles.xml"))
Global.SaveWhere(appdatapath);
SaveWhere(exepath);
else if (File.Exists(appDataPpath + "\\Auto Profiles.xml"))
SaveWhere(appDataPpath);
else if (File.Exists(oldappdatapath + "\\Auto Profiles.xml"))
{
try
{
if (Directory.Exists(appdatapath))
Directory.Move(appdatapath, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Windows Old");
Directory.Move(oldappdatapath, appdatapath);
Global.SaveWhere(appdatapath);
if (Directory.Exists(appDataPpath))
Directory.Move(appDataPpath, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Windows Old");
Directory.Move(oldappdatapath, appDataPpath);
SaveWhere(appDataPpath);
}
catch
{
MessageBox.Show(Properties.Resources.CannotMoveFiles, "DS4Windows");
Process.Start("explorer.exe", @"/select, " + appdatapath);
Process.Start("explorer.exe", @"/select, " + appDataPpath);
Close();
return;
}
}
else if (!File.Exists(exepath + "\\Auto Profiles.xml")
&& !File.Exists(appdatapath + "\\Auto Profiles.xml"))
&& !File.Exists(appDataPpath + "\\Auto Profiles.xml"))
{
firstrun = true;
new SaveWhere(false).ShowDialog();
@ -128,7 +128,7 @@ namespace DS4Windows
AppCollectionThread.Start();
}
if (String.IsNullOrEmpty(Global.appdatapath))
if (String.IsNullOrEmpty(appdatapath))
{
Close();
return;
@ -148,68 +148,73 @@ namespace DS4Windows
Program.rootHub.Debug += On_Debug;
Log.GuiLog += On_Debug;
logFile = Global.appdatapath + "\\DS4Windows.log";
logFile = appdatapath + "\\DS4Windows.log";
//logWriter = File.AppendText(logFile);
Log.TrayIconLog += ShowNotification;
// tmrUpdate.Enabled = true; TODO remove tmrUpdate and leave tick()
Directory.CreateDirectory(Global.appdatapath);
Directory.CreateDirectory(appdatapath);
Global.Load();
if (!Global.Save()) //if can't write to file
if (!Save()) //if can't write to file
if (MessageBox.Show("Cannot write at current location\nCopy Settings to appdata?", "DS4Windows",
MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.Yes)
{
try
{
Directory.CreateDirectory(appdatapath);
File.Copy(exepath + "\\Profiles.xml", appdatapath + "\\Profiles.xml");
File.Copy(exepath + "\\Auto Profiles.xml", appdatapath + "\\Auto Profiles.xml");
Directory.CreateDirectory(appdatapath + "\\Profiles");
Directory.CreateDirectory(appDataPpath);
File.Copy(exepath + "\\Profiles.xml", appDataPpath + "\\Profiles.xml");
File.Copy(exepath + "\\Auto Profiles.xml", appDataPpath + "\\Auto Profiles.xml");
Directory.CreateDirectory(appDataPpath + "\\Profiles");
foreach (string s in Directory.GetFiles(exepath + "\\Profiles"))
{
File.Copy(s, appdatapath + "\\Profiles\\" + Path.GetFileName(s));
File.Copy(s, appDataPpath + "\\Profiles\\" + Path.GetFileName(s));
}
}
catch { }
MessageBox.Show("Copy complete, please relaunch DS4Windows and remove settings from Program Directory", "DS4Windows");
Global.appdatapath = null;
appdatapath = null;
Close();
return;
}
else
{
MessageBox.Show("DS4Windows cannot edit settings here, This will now close", "DS4Windows");
Global.appdatapath = null;
appdatapath = null;
Close();
return;
}
//MessageBox.Show(Environment.OSVersion.VersionString);
foreach (ToolStripMenuItem t in shortcuts)
t.DropDownItemClicked += Profile_Changed_Menu;
hideDS4CheckBox.CheckedChanged -= hideDS4CheckBox_CheckedChanged;
hideDS4CheckBox.Checked = Global.UseExclusiveMode;
hideDS4CheckBox.CheckedChanged += hideDS4CheckBox_CheckedChanged;
cBDisconnectBT.Checked = Global.DCBTatStop;
cBQuickCharge.Checked = Global.QuickCharge;
nUDXIPorts.Value = Global.FirstXinputPort;
Program.rootHub.x360Bus.FirstController = Global.FirstXinputPort;
hideDS4CheckBox.CheckedChanged -= hideDS4CheckBox_CheckedChanged;
hideDS4CheckBox.Checked = UseExclusiveMode;
hideDS4CheckBox.CheckedChanged += hideDS4CheckBox_CheckedChanged;
if (Environment.OSVersion.Version.Major >= 10)
toolTip1.SetToolTip(hideDS4CheckBox, "Currently does not work on Windows 10");
cBDisconnectBT.Checked = DCBTatStop;
cBQuickCharge.Checked = QuickCharge;
nUDXIPorts.Value = FirstXinputPort;
Program.rootHub.x360Bus.FirstController = FirstXinputPort;
// New settings
this.Width = Global.FormWidth;
this.Height = Global.FormHeight;
this.Width = FormWidth;
this.Height = FormHeight;
startMinimizedCheckBox.CheckedChanged -= startMinimizedCheckBox_CheckedChanged;
startMinimizedCheckBox.Checked = Global.StartMinimized;
startMinimizedCheckBox.Checked = StartMinimized;
startMinimizedCheckBox.CheckedChanged += startMinimizedCheckBox_CheckedChanged;
cBCloseMini.Checked = Global.CloseMini;
cBCloseMini.Checked = CloseMini;
string lang = CultureInfo.CurrentCulture.ToString();
if (lang.StartsWith("en"))
cBDownloadLangauge.Visible = false;
cBDownloadLangauge.Checked = Global.DownloadLang;
cBFlashWhenLate.Checked = Global.FlashWhenLate;
if (!Global.LoadActions()) //if first no actions have been made yet, create PS+Option to D/C and save it to every profile
cBDownloadLangauge.Checked = DownloadLang;
cBFlashWhenLate.Checked = FlashWhenLate;
nUDLatency.Value = FlashWhenLateAt;
if (!LoadActions()) //if first no actions have been made yet, create PS+Option to D/C and save it to every profile
{
XmlDocument xDoc = new XmlDocument();
try
{
string[] profiles = Directory.GetFiles(Global.appdatapath + @"\Profiles\");
string[] profiles = Directory.GetFiles(appdatapath + @"\Profiles\");
foreach (String s in profiles)
if (Path.GetExtension(s) == ".xml")
{
@ -228,7 +233,7 @@ namespace DS4Windows
Node.AppendChild(el);
}
xDoc.Save(s);
Global.LoadActions();
LoadActions();
}
}
catch { }
@ -254,7 +259,7 @@ namespace DS4Windows
NewVersion();
for (int i = 0; i < 4; i++)
{
Global.LoadProfile(i, true, Program.rootHub);
LoadProfile(i, true, Program.rootHub);
}
LoadP();
Global.ControllerStatusChange += ControllerStatusChange;
@ -268,9 +273,11 @@ namespace DS4Windows
startToolStripMenuItem.Text = btnStartStop.Text;
if (!tLPControllers.Visible)
tabMain.SelectedIndex = 1;
cBNotifications.Checked = Global.Notifications;
cBSwipeProfiles.Checked = Global.SwipeProfiles;
int checkwhen = Global.CheckWhen;
//cBNotifications.Checked = Notifications;
lbNotifications.Text = cBNotifications.Text;
cBoxNotifications.SelectedIndex = Notifications;
cBSwipeProfiles.Checked = SwipeProfiles;
int checkwhen = CheckWhen;
cBUpdate.Checked = checkwhen > 0;
if (checkwhen > 23)
{
@ -285,11 +292,11 @@ namespace DS4Windows
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.LastChecked + TimeSpan.FromHours(checkwhen))
if (checkwhen > 0 && DateTime.Now >= LastChecked + TimeSpan.FromHours(checkwhen))
{
wc.DownloadFileAsync(url, Global.appdatapath + "\\version.txt");
wc.DownloadFileAsync(url, appdatapath + "\\version.txt");
wc.DownloadFileCompleted += Check_Version;
Global.LastChecked = DateTime.Now;
LastChecked = DateTime.Now;
}
if (File.Exists(exepath + "\\Updater.exe"))
@ -301,7 +308,7 @@ namespace DS4Windows
hotkeysTimer.Start();
hotkeysTimer.Tick += Hotkeys;
test.Tick += test_Tick;
if (!System.IO.Directory.Exists(Global.appdatapath + "\\Virtual Bus Driver"))
if (!System.IO.Directory.Exists(appdatapath + "\\Virtual Bus Driver"))
linkUninstall.Visible = false;
if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\DS4Windows.lnk"))
{
@ -320,7 +327,7 @@ namespace DS4Windows
if (File.Exists(exepath + "\\1.4.22.ds4w"))
{
bool dcexists = false;
foreach (SpecialAction action in Global.GetActions())
foreach (SpecialAction action in GetActions())
{
if (action.type == "DisconnectBT")
{
@ -333,8 +340,8 @@ namespace DS4Windows
try
{
XmlDocument xDoc = new XmlDocument();
Global.SaveAction("Disconnect Controller", "PS/Options", 5, "0", false);
string[] profiles = Directory.GetFiles(Global.appdatapath + @"\Profiles\");
SaveAction("Disconnect Controller", "PS/Options", 5, "0", false);
string[] profiles = Directory.GetFiles(appdatapath + @"\Profiles\");
foreach (String s in profiles)
if (Path.GetExtension(s) == ".xml")
{
@ -353,7 +360,7 @@ namespace DS4Windows
Node.AppendChild(el);
}
xDoc.Save(s);
Global.LoadActions();
LoadActions();
}
}
catch { }
@ -425,7 +432,7 @@ namespace DS4Windows
}
void Hotkeys(object sender, EventArgs e)
{
if (Global.SwipeProfiles)
if (SwipeProfiles)
for (int i = 0; i < 4; i++)
{
string slide = Program.rootHub.TouchpadSlide(i);
@ -453,8 +460,8 @@ namespace DS4Windows
for (int j = 0; j < 4; j++)
if (proprofiles[j][i] != "(none)" && proprofiles[j][i] != Properties.Resources.noneProfile)
{
Global.LoadTempProfile(j, proprofiles[j][i], true, Program.rootHub); //j is controller index, i is filename
if (Global.LaunchProgram[j] != string.Empty) Process.Start(Global.LaunchProgram[j]);
LoadTempProfile(j, proprofiles[j][i], true, Program.rootHub); //j is controller index, i is filename
if (LaunchProgram[j] != string.Empty) Process.Start(LaunchProgram[j]);
}
tempProfileProgram = name;
}
@ -465,7 +472,7 @@ namespace DS4Windows
{
tempProfileProgram = "null";
for (int j = 0; j < 4; j++)
Global.LoadProfile(j, false, Program.rootHub);
LoadProfile(j, false, Program.rootHub);
}
}
GC.Collect();
@ -477,9 +484,9 @@ namespace DS4Windows
proprofiles = new List<string>[4] { new List<string>(), new List<string>(),
new List<string>(), new List<string>() };
programpaths.Clear();
if (!File.Exists(Global.appdatapath + "\\Auto Profiles.xml"))
if (!File.Exists(appdatapath + "\\Auto Profiles.xml"))
return;
doc.Load(Global.appdatapath + "\\Auto Profiles.xml");
doc.Load(appdatapath + "\\Auto Profiles.xml");
XmlNodeList programslist = doc.SelectNodes("Programs/Program");
foreach (XmlNode x in programslist)
programpaths.Add(x.Attributes["path"].Value);
@ -524,7 +531,7 @@ namespace DS4Windows
}
catch
{
if (!File.Exists(exepath + "\\Auto Profiles.xml") && !File.Exists(appdatapath + "\\Auto Profiles.xml"))
if (!File.Exists(exepath + "\\Auto Profiles.xml") && !File.Exists(appDataPpath + "\\Auto Profiles.xml"))
{
linkSetup.LinkColor = Color.Green;
tabSettings.Text += " (" + Properties.Resources.InstallDriver + ")";
@ -536,7 +543,7 @@ namespace DS4Windows
{
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
string version = fvi.FileVersion;
string newversion = File.ReadAllText(Global.appdatapath + "\\version.txt");
string newversion = File.ReadAllText(appdatapath + "\\version.txt");
if (version.Replace(',', '.').CompareTo(newversion) == -1)//CompareVersions();
if (MessageBox.Show(Properties.Resources.DownloadVersion.Replace("*number*", newversion), Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
{
@ -545,7 +552,7 @@ namespace DS4Windows
{
Uri url2 = new Uri("http://ds4windows.com/Files/DS4Updater.exe");
WebClient wc2 = new WebClient();
if (Global.appdatapath == exepath)
if (appdatapath == exepath)
wc2.DownloadFile(url2, exepath + "\\DS4Updater.exe");
else
{
@ -557,15 +564,15 @@ namespace DS4Windows
p.StartInfo.FileName = exepath + "\\DS4Updater.exe";
if (!cBDownloadLangauge.Checked)
p.StartInfo.Arguments = "-skipLang";
if (Global.AdminNeeded())
if (AdminNeeded())
p.StartInfo.Verb = "runas";
try { p.Start(); Close(); }
catch { }
}
else
File.Delete(Global.appdatapath + "\\version.txt");
File.Delete(appdatapath + "\\version.txt");
else
File.Delete(Global.appdatapath + "\\version.txt");
File.Delete(appdatapath + "\\version.txt");
}
public void RefreshProfiles()
@ -573,7 +580,7 @@ namespace DS4Windows
try
{
profilenames.Clear();
string[] profiles = Directory.GetFiles(Global.appdatapath + @"\Profiles\");
string[] profiles = Directory.GetFiles(appdatapath + @"\Profiles\");
foreach (String s in profiles)
if (s.EndsWith(".xml"))
profilenames.Add(Path.GetFileNameWithoutExtension(s));
@ -581,8 +588,8 @@ namespace DS4Windows
lBProfiles.Items.AddRange(profilenames.ToArray());
if (lBProfiles.Items.Count == 0)
{
Global.SaveProfile(0, "Default", null, null);
Global.ProfilePath[0] = "Default";
SaveProfile(0, "Default", null, null);
ProfilePath[0] = "Default";
RefreshProfiles();
return;
}
@ -594,11 +601,11 @@ namespace DS4Windows
foreach (string s in profilenames)
shortcuts[i].DropDownItems.Add(s);
for (int j = 0; j < cbs[i].Items.Count; j++)
if (cbs[i].Items[j].ToString() == Path.GetFileNameWithoutExtension(Global.ProfilePath[i]))
if (cbs[i].Items[j].ToString() == Path.GetFileNameWithoutExtension(ProfilePath[i]))
{
cbs[i].SelectedIndex = j;
((ToolStripMenuItem)shortcuts[i].DropDownItems[j]).Checked = true;
Global.ProfilePath[i] = cbs[i].Text;
ProfilePath[i] = cbs[i].Text;
shortcuts[i].Text = Properties.Resources.ContextEdit.Replace("*number*", (i + 1).ToString());
ebns[i].Text = Properties.Resources.EditProfile;
break;
@ -613,9 +620,9 @@ namespace DS4Windows
}
catch (DirectoryNotFoundException)
{
Directory.CreateDirectory(Global.appdatapath + @"\Profiles\");
Global.SaveProfile(0, "Default", null, null);
Global.ProfilePath[0] = "Default";
Directory.CreateDirectory(appdatapath + @"\Profiles\");
SaveProfile(0, "Default", null, null);
ProfilePath[0] = "Default";
RefreshProfiles();
return;
}
@ -669,7 +676,7 @@ namespace DS4Windows
protected void ShowNotification(object sender, DebugEventArgs args)
{
if (Form.ActiveForm != this && (cBNotifications.Checked || sender != null))
if (Form.ActiveForm != this && (Notifications == 2 || (Notifications == 1 && args.Warning) || sender != null))
{
this.notifyIcon1.BalloonTipText = args.Data;
notifyIcon1.BalloonTipTitle = "DS4Windows";
@ -679,7 +686,7 @@ namespace DS4Windows
protected void ShowNotification(object sender, string text)
{
if (Form.ActiveForm != this && cBNotifications.Checked)
if (Form.ActiveForm != this && Notifications == 2)
{
this.notifyIcon1.BalloonTipText = text;
notifyIcon1.BalloonTipTitle = "DS4Windows";
@ -770,7 +777,7 @@ namespace DS4Windows
{
Pads[Index].Text = Program.rootHub.getDS4MacAddress(Index);
DS4Device d = Program.rootHub.DS4Controllers[Index];
if (d != null && Global.QuickCharge && d.ConnectionType == ConnectionType.BT && d.Charging)
if (QuickCharge && d?.ConnectionType == ConnectionType.BT && (bool)d?.Charging)
{
d.DisconnectBT();
return;
@ -789,12 +796,12 @@ namespace DS4Windows
if (Pads[Index].Text != Properties.Resources.Connecting)
{
Enable_Controls(Index, true);
if (opt != null)
opt.inputtimer.Start();
//if (opt != null)
opt?.inputtimer.Start();
//MinimumSize = new Size(MinimumSize.Width, 137 + 29 * Index);
}
else if (opt != null)
opt.inputtimer.Stop();
else
opt?.inputtimer.Stop();
}
else
{
@ -907,7 +914,7 @@ namespace DS4Windows
string filename = lBProfiles.SelectedItem.ToString();
if (MessageBox.Show(Properties.Resources.ProfileCannotRestore.Replace("*Profile name*", "\"" + filename + "\""), Properties.Resources.DeleteProfile, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
{
System.IO.File.Delete(Global.appdatapath + @"\Profiles\" + filename + ".xml");
System.IO.File.Delete(appdatapath + @"\Profiles\" + filename + ".xml");
RefreshProfiles();
}
}
@ -937,7 +944,7 @@ namespace DS4Windows
private void tSBImportProfile_Click(object sender, EventArgs e)
{
if (Global.appdatapath == Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName)
if (appdatapath == Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName)
openProfiles.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool" + @"\Profiles\";
else
openProfiles.InitialDirectory = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + @"\Profiles\";
@ -945,7 +952,7 @@ namespace DS4Windows
{
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);
File.Copy(openProfiles.FileNames[i], appdatapath + "\\Profiles\\" + Path.GetFileName(files[i]), true);
RefreshProfiles();
}
}
@ -955,7 +962,7 @@ namespace DS4Windows
if (lBProfiles.SelectedIndex >= 0)
{
Stream stream;
Stream profile = new StreamReader(Global.appdatapath + "\\Profiles\\" + lBProfiles.SelectedItem.ToString() + ".xml").BaseStream;
Stream profile = new StreamReader(appdatapath + "\\Profiles\\" + lBProfiles.SelectedItem.ToString() + ".xml").BaseStream;
if (saveProfiles.ShowDialog() == System.Windows.Forms.DialogResult.OK)
if ((stream = saveProfiles.OpenFile()) != null)
{
@ -1054,16 +1061,16 @@ namespace DS4Windows
if (module.FileName.Contains("joy.cpl"))
module.Dispose();
Global.UseExclusiveMode = hideDS4CheckBox.Checked;
UseExclusiveMode = hideDS4CheckBox.Checked;
btnStartStop_Clicked(false);
btnStartStop_Clicked(false);
Global.Save();
Save();
}
private void startMinimizedCheckBox_CheckedChanged(object sender, EventArgs e)
{
Global.StartMinimized = startMinimizedCheckBox.Checked;
Global.Save();
StartMinimized = startMinimizedCheckBox.Checked;
Save();
}
private void lvDebug_ItemActivate(object sender, EventArgs e)
@ -1085,9 +1092,9 @@ namespace DS4Windows
((ToolStripMenuItem)shortcuts[tdevice].DropDownItems[cb.SelectedIndex]).Checked = true;
LogDebug(DateTime.Now, Properties.Resources.UsingProfile.Replace("*number*", (tdevice + 1).ToString()).Replace("*Profile name*", cb.Text), false);
shortcuts[tdevice].Text = Properties.Resources.ContextEdit.Replace("*number*", (tdevice + 1).ToString());
Global.ProfilePath[tdevice] = cb.Items[cb.SelectedIndex].ToString();
Global.Save();
Global.LoadProfile(tdevice, true, Program.rootHub);
ProfilePath[tdevice] = cb.Items[cb.SelectedIndex].ToString();
Save();
LoadProfile(tdevice, true, Program.rootHub);
}
else if (cb.SelectedIndex == cb.Items.Count - 1 && cb.Items.Count > 1) //if +New Profile selected
ShowOptions(tdevice, "");
@ -1287,7 +1294,7 @@ namespace DS4Windows
for (int i = 0; i < files.Length; i++)
if (files[i].EndsWith(".xml"))
{
File.Copy(files[i], Global.appdatapath + "\\Profiles\\" + Path.GetFileName(files[i]), true);
File.Copy(files[i], appdatapath + "\\Profiles\\" + Path.GetFileName(files[i]), true);
therewasanxml = true;
}
if (therewasanxml)
@ -1339,10 +1346,10 @@ namespace DS4Windows
if (tSTBProfile.Text != null && tSTBProfile.Text != "" && !tSTBProfile.Text.Contains("\\") && !tSTBProfile.Text.Contains("/") && !tSTBProfile.Text.Contains(":") && !tSTBProfile.Text.Contains("*") && !tSTBProfile.Text.Contains("?") && !tSTBProfile.Text.Contains("\"") && !tSTBProfile.Text.Contains("<") && !tSTBProfile.Text.Contains(">") && !tSTBProfile.Text.Contains("|"))
{
System.IO.File.Delete(Global.appdatapath + @"\Profiles\" + opt.filename + ".xml");
Global.ProfilePath[opt.device] = tSTBProfile.Text;
Global.SaveProfile(opt.device, tSTBProfile.Text, opt.buttons.ToArray(), opt.subbuttons.ToArray());
Global.Save();
System.IO.File.Delete(appdatapath + @"\Profiles\" + opt.filename + ".xml");
ProfilePath[opt.device] = tSTBProfile.Text;
SaveProfile(opt.device, tSTBProfile.Text, opt.buttons.ToArray(), opt.subbuttons.ToArray());
Save();
opt.Close();
}
else
@ -1376,9 +1383,9 @@ namespace DS4Windows
private void nUDUpdateTime_ValueChanged(object sender, EventArgs e)
{
if (cBUpdateTime.SelectedIndex == 0)
Global.CheckWhen = (int)nUDUpdateTime.Value;
CheckWhen = (int)nUDUpdateTime.Value;
else if (cBUpdateTime.SelectedIndex == 1)
Global.CheckWhen = (int)nUDUpdateTime.Value * 24;
CheckWhen = (int)nUDUpdateTime.Value * 24;
if (nUDUpdateTime.Value < 1)
cBUpdate.Checked = false;
if (nUDUpdateTime.Value == 1)
@ -1402,31 +1409,31 @@ namespace DS4Windows
private void cBUpdateTime_SelectedIndexChanged(object sender, EventArgs e)
{
if (cBUpdateTime.SelectedIndex == 0)
Global.CheckWhen = (int)nUDUpdateTime.Value;
CheckWhen = (int)nUDUpdateTime.Value;
else if (cBUpdateTime.SelectedIndex == 1)
Global.CheckWhen = (int)nUDUpdateTime.Value * 24;
CheckWhen = (int)nUDUpdateTime.Value * 24;
}
private void lLBUpdate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
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.DownloadFileAsync(url, appdatapath + "\\version.txt");
wct.DownloadFileCompleted += wct_DownloadFileCompleted;
}
private void cBDisconnectBT_CheckedChanged(object sender, EventArgs e)
{
Global.DCBTatStop = cBDisconnectBT.Checked;
DCBTatStop = cBDisconnectBT.Checked;
}
void wct_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
Global.LastChecked = DateTime.Now;
LastChecked = DateTime.Now;
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
string version2 = fvi.FileVersion;
string newversion2 = File.ReadAllText(Global.appdatapath + "\\version.txt");
if (version2.Replace(',', '.').CompareTo(File.ReadAllText(Global.appdatapath + "\\version.txt")) == -1)//CompareVersions();
string newversion2 = File.ReadAllText(appdatapath + "\\version.txt");
if (version2.Replace(',', '.').CompareTo(File.ReadAllText(appdatapath + "\\version.txt")) == -1)//CompareVersions();
if (MessageBox.Show(Properties.Resources.DownloadVersion.Replace("*number*", newversion2), Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
{
if (!File.Exists(exepath + "\\DS4Updater.exe") || (File.Exists(exepath + "\\DS4Updater.exe")
@ -1434,7 +1441,7 @@ namespace DS4Windows
{
Uri url2 = new Uri("http://ds4windows.com/Files/DS4Updater.exe");
WebClient wc2 = new WebClient();
if (Global.appdatapath == exepath)
if (appdatapath == exepath)
wc2.DownloadFile(url2, exepath + "\\DS4Updater.exe");
else
{
@ -1446,35 +1453,40 @@ namespace DS4Windows
p.StartInfo.FileName = exepath + "\\DS4Updater.exe";
if (!cBDownloadLangauge.Checked)
p.StartInfo.Arguments = "-skipLang";
if (Global.AdminNeeded())
if (AdminNeeded())
p.StartInfo.Verb = "runas";
try { p.Start(); Close(); }
catch { }
}
else
File.Delete(Global.appdatapath + "\\version.txt");
File.Delete(appdatapath + "\\version.txt");
else
{
File.Delete(Global.appdatapath + "\\version.txt");
File.Delete(appdatapath + "\\version.txt");
MessageBox.Show(Properties.Resources.UpToDate, "DS4Windows Updater");
}
}
private void linkProfiles_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start(Global.appdatapath + "\\Profiles");
System.Diagnostics.Process.Start(appdatapath + "\\Profiles");
}
private void linkUninstall_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
if (File.Exists(Global.appdatapath + "\\Virtual Bus Driver\\ScpDriver.exe"))
try { System.Diagnostics.Process.Start(Global.appdatapath + "\\Virtual Bus Driver\\ScpDriver.exe"); }
catch { System.Diagnostics.Process.Start(Global.appdatapath + "\\Virtual Bus Driver"); }
if (File.Exists(appdatapath + "\\Virtual Bus Driver\\ScpDriver.exe"))
try { System.Diagnostics.Process.Start(appdatapath + "\\Virtual Bus Driver\\ScpDriver.exe"); }
catch { System.Diagnostics.Process.Start(appdatapath + "\\Virtual Bus Driver"); }
}
private void cBNotifications_CheckedChanged(object sender, EventArgs e)
{
Global.Notifications = cBNotifications.Checked;
//Notifications = cBNotifications.Checked;
}
private void cBoxNotifications_SelectedIndexChanged(object sender, EventArgs e)
{
Notifications = cBoxNotifications.SelectedIndex;
}
private void lLSetup_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
@ -1514,29 +1526,29 @@ namespace DS4Windows
}
if (oldsize == new System.Drawing.Size(0, 0))
{
Global.FormWidth = this.Width;
Global.FormHeight = this.Height;
FormWidth = this.Width;
FormHeight = this.Height;
}
else
{
Global.FormWidth = oldsize.Width;
Global.FormHeight = oldsize.Height;
FormWidth = oldsize.Width;
FormHeight = oldsize.Height;
}
if (!String.IsNullOrEmpty(Global.appdatapath))
if (!String.IsNullOrEmpty(appdatapath))
{
Global.Save();
Save();
Program.rootHub.Stop();
}
}
private void cBSwipeProfiles_CheckedChanged(object sender, EventArgs e)
{
Global.SwipeProfiles = cBSwipeProfiles.Checked;
SwipeProfiles = cBSwipeProfiles.Checked;
}
private void cBQuickCharge_CheckedChanged(object sender, EventArgs e)
{
Global.QuickCharge = cBQuickCharge.Checked;
QuickCharge = cBQuickCharge.Checked;
}
private void lbLastMessage_MouseHover(object sender, EventArgs e)
@ -1569,7 +1581,7 @@ namespace DS4Windows
if (oldxiport != (int)Math.Round(nUDXIPorts.Value, 0))
{
oldxiport = (int)Math.Round(nUDXIPorts.Value, 0);
Global.FirstXinputPort = oldxiport;
FirstXinputPort = oldxiport;
Program.rootHub.x360Bus.FirstController = oldxiport;
btnStartStop_Click(sender, e);
btnStartStop_Click(sender, e);
@ -1583,7 +1595,7 @@ namespace DS4Windows
private void cBCloseMini_CheckedChanged(object sender, EventArgs e)
{
Global.CloseMini = cBCloseMini.Checked;
CloseMini = cBCloseMini.Checked;
}
private void Pads_MouseHover(object sender, EventArgs e)
@ -1597,6 +1609,8 @@ namespace DS4Windows
toolTip1.Show(Properties.Resources.InputDelay.Replace("*number*", latency.ToString()), lb, lb.Size.Width, 0);
}
}
private void Pads_MouseLeave(object sender, EventArgs e)
{
toolTip1.Hide((Label)sender);
@ -1604,12 +1618,19 @@ namespace DS4Windows
private void cBDownloadLangauge_CheckedChanged(object sender, EventArgs e)
{
Global.DownloadLang = cBDownloadLangauge.Checked;
DownloadLang = cBDownloadLangauge.Checked;
}
private void cBFlashWhenLate_CheckedChanged(object sender, EventArgs e)
{
Global.FlashWhenLate = cBFlashWhenLate.Checked;
FlashWhenLate = cBFlashWhenLate.Checked;
nUDLatency.Enabled = cBFlashWhenLate.Checked;
lbMsLatency.Enabled = cBFlashWhenLate.Checked;
}
private void nUDLatency_ValueChanged(object sender, EventArgs e)
{
FlashWhenLateAt = (int)Math.Round(nUDLatency.Value);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -136,6 +136,51 @@
<data name="btnClear.Text" xml:space="preserve">
<value>Temizle</value>
</data>
<data name="editProfileForController1ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="editProfileForController1ToolStripMenuItem.Text" xml:space="preserve">
<value>Kol 1 için profili düzenle</value>
</data>
<data name="editProfileForController2ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="editProfileForController2ToolStripMenuItem.Text" xml:space="preserve">
<value>Kol 2 için profili düzenle</value>
</data>
<data name="editProfileForController3ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="editProfileForController3ToolStripMenuItem.Text" xml:space="preserve">
<value>Kol 3 için profili düzenle</value>
</data>
<data name="editProfileForController4ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="editProfileForController4ToolStripMenuItem.Text" xml:space="preserve">
<value>Kol 4 için profili düzenle</value>
</data>
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 6</value>
</data>
<data name="startToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="startToolStripMenuItem.Text" xml:space="preserve">
<value>Başlat</value>
</data>
<data name="openToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="openToolStripMenuItem.Text" xml:space="preserve">
<value>Aç</value>
</data>
<data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="exitToolStripMenuItem.Text" xml:space="preserve">
<value>Çıkış (Orta Fare Tuşu)</value>
</data>
<data name="cMTaskbar.Size" type="System.Drawing.Size, System.Drawing">
<value>201, 164</value>
</data>
@ -6311,171 +6356,6 @@
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
</value>
</data>
<data name="editProfileForController1ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="editProfileForController1ToolStripMenuItem.Text" xml:space="preserve">
<value>Kol 1 için profili düzenle</value>
</data>
<data name="editProfileForController2ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="editProfileForController2ToolStripMenuItem.Text" xml:space="preserve">
<value>Kol 2 için profili düzenle</value>
</data>
<data name="editProfileForController3ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="editProfileForController3ToolStripMenuItem.Text" xml:space="preserve">
<value>Kol 3 için profili düzenle</value>
</data>
<data name="editProfileForController4ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="editProfileForController4ToolStripMenuItem.Text" xml:space="preserve">
<value>Kol 4 için profili düzenle</value>
</data>
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 6</value>
</data>
<data name="startToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="startToolStripMenuItem.Text" xml:space="preserve">
<value>Başlat</value>
</data>
<data name="openToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="openToolStripMenuItem.Text" xml:space="preserve">
<value>Aç</value>
</data>
<data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 22</value>
</data>
<data name="exitToolStripMenuItem.Text" xml:space="preserve">
<value>Çıkış (Orta Fare Tuşu)</value>
</data>
<data name="tabControllers.Text" xml:space="preserve">
<value>Kontrol Cihazları</value>
</data>
<data name="tabProfiles.Text" xml:space="preserve">
<value>Profiller</value>
</data>
<data name="tabAutoProfiles.Text" xml:space="preserve">
<value>Otomatik Profiller</value>
</data>
<data name="hideDS4CheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>81, 17</value>
</data>
<data name="hideDS4CheckBox.Text" xml:space="preserve">
<value>DS4'ü Gizle</value>
</data>
<data name="cBSwipeProfiles.Size" type="System.Drawing.Size, System.Drawing">
<value>269, 17</value>
</data>
<data name="cBSwipeProfiles.Text" xml:space="preserve">
<value>Profiller arası geçiş yapmak için Touchpad'de kaydır</value>
</data>
<data name="StartWindowsCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>92, 17</value>
</data>
<data name="StartWindowsCheckBox.Text" xml:space="preserve">
<value>Açılışta Çalıştır</value>
</data>
<data name="startMinimizedCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>142, 17</value>
</data>
<data name="startMinimizedCheckBox.Text" xml:space="preserve">
<value>Simge durumunda başlat</value>
</data>
<data name="cBNotifications.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 17</value>
</data>
<data name="cBNotifications.Text" xml:space="preserve">
<value>Bildirimleri Göster</value>
</data>
<data name="cBDisconnectBT.Size" type="System.Drawing.Size, System.Drawing">
<value>191, 17</value>
</data>
<data name="cBDisconnectBT.Text" xml:space="preserve">
<value>Kapatırken BT bağlantısınıda kopar</value>
</data>
<data name="cBFlashWhenLate.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 17</value>
</data>
<data name="cBFlashWhenLate.Text" xml:space="preserve">
<value>Gecikme artarsa ışığı yanıp söndür</value>
</data>
<data name="cBCloseMini.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 17</value>
</data>
<data name="cBCloseMini.Text" xml:space="preserve">
<value>Kapatma Tuşu Simge Durumuna Küçültür</value>
</data>
<data name="cBQuickCharge.Size" type="System.Drawing.Size, System.Drawing">
<value>66, 17</value>
</data>
<data name="cBQuickCharge.Text" xml:space="preserve">
<value>Hızlı Şarj</value>
</data>
<data name="cBUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>198, 17</value>
</data>
<data name="cBUpdate.Text" xml:space="preserve">
<value>Başlangıçta güncellemeleri kontrol et</value>
</data>
<data name="cBDownloadLangauge.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 17</value>
</data>
<data name="cBDownloadLangauge.Text" xml:space="preserve">
<value>Güncellleme ile yeni dil paketi indir</value>
</data>
<data name="cBUpdateTime.Items" xml:space="preserve">
<value>saat</value>
</data>
<data name="cBUpdateTime.Items1" xml:space="preserve">
<value>gün</value>
</data>
<data name="cBUpdateTime.Location" type="System.Drawing.Point, System.Drawing">
<value>174, 0</value>
</data>
<data name="lbCheckEvery.Size" type="System.Drawing.Size, System.Drawing">
<value>121, 13</value>
</data>
<data name="lbCheckEvery.Text" xml:space="preserve">
<value>Şu aralıklarda kontrol et:</value>
</data>
<data name="nUDUpdateTime.Location" type="System.Drawing.Point, System.Drawing">
<value>124, 1</value>
</data>
<data name="pNUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>237, 22</value>
</data>
<data name="lbUseXIPorts.Size" type="System.Drawing.Size, System.Drawing">
<value>112, 13</value>
</data>
<data name="lbUseXIPorts.Text" xml:space="preserve">
<value>Xinput Portlarını Kullan</value>
</data>
<data name="nUDXIPorts.Location" type="System.Drawing.Point, System.Drawing">
<value>128, 1</value>
</data>
<data name="lbLastXIPort.Location" type="System.Drawing.Point, System.Drawing">
<value>178, 3</value>
</data>
<data name="pnlXIPorts.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
<data name="flowLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>285, 10</value>
</data>
<data name="flowLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>165, 65</value>
</data>
<data name="tabSettings.Text" xml:space="preserve">
<value>Ayarlar</value>
</data>
<data name="pBStatus1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACcAAAAUCAYAAAAOTSQ2AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
@ -6802,8 +6682,8 @@
<data name="lbNoControllers.Text" xml:space="preserve">
<value>Hiçbir Kontrol Cihazı Bağlanmadı (En Fazla 4)</value>
</data>
<data name="cMProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>154, 224</value>
<data name="tabControllers.Text" xml:space="preserve">
<value>Kontrol Cihazları</value>
</data>
<data name="editToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>153, 22</value>
@ -6865,8 +6745,8 @@
<data name="exportToolStripMenuItem.Text" xml:space="preserve">
<value>Dışarı Aktar</value>
</data>
<data name="tSOptions.Text" xml:space="preserve">
<value>Profil Ayarları</value>
<data name="cMProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>154, 224</value>
</data>
<data name="toolStripLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>69, 22</value>
@ -6895,6 +6775,9 @@
<data name="tSBKeepSize.Text" xml:space="preserve">
<value>Pencere boyutunu hatırla</value>
</data>
<data name="tSOptions.Text" xml:space="preserve">
<value>Profil Ayarları</value>
</data>
<data name="tsBNewProfle.Size" type="System.Drawing.Size, System.Drawing">
<value>49, 22</value>
</data>
@ -6984,6 +6867,114 @@
<data name="tSBExportProfile.ToolTipText" xml:space="preserve">
<value>Seçili Profili Dışa aktar</value>
</data>
<data name="tabProfiles.Text" xml:space="preserve">
<value>Profiller</value>
</data>
<data name="tabAutoProfiles.Text" xml:space="preserve">
<value>Otomatik Profiller</value>
</data>
<data name="hideDS4CheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>81, 17</value>
</data>
<data name="hideDS4CheckBox.Text" xml:space="preserve">
<value>DS4'ü Gizle</value>
</data>
<data name="cBSwipeProfiles.Size" type="System.Drawing.Size, System.Drawing">
<value>269, 17</value>
</data>
<data name="cBSwipeProfiles.Text" xml:space="preserve">
<value>Profiller arası geçiş yapmak için Touchpad'de kaydır</value>
</data>
<data name="StartWindowsCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>92, 17</value>
</data>
<data name="StartWindowsCheckBox.Text" xml:space="preserve">
<value>Açılışta Çalıştır</value>
</data>
<data name="startMinimizedCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>142, 17</value>
</data>
<data name="startMinimizedCheckBox.Text" xml:space="preserve">
<value>Simge durumunda başlat</value>
</data>
<data name="cBNotifications.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 17</value>
</data>
<data name="cBNotifications.Text" xml:space="preserve">
<value>Bildirimleri Göster</value>
</data>
<data name="cBDisconnectBT.Size" type="System.Drawing.Size, System.Drawing">
<value>191, 17</value>
</data>
<data name="cBDisconnectBT.Text" xml:space="preserve">
<value>Kapatırken BT bağlantısınıda kopar</value>
</data>
<data name="cBFlashWhenLate.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 17</value>
</data>
<data name="cBFlashWhenLate.Text" xml:space="preserve">
<value>Gecikme artarsa ışığı yanıp söndür</value>
</data>
<data name="cBCloseMini.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 17</value>
</data>
<data name="cBCloseMini.Text" xml:space="preserve">
<value>Kapatma Tuşu Simge Durumuna Küçültür</value>
</data>
<data name="cBQuickCharge.Size" type="System.Drawing.Size, System.Drawing">
<value>66, 17</value>
</data>
<data name="cBQuickCharge.Text" xml:space="preserve">
<value>Hızlı Şarj</value>
</data>
<data name="cBUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>198, 17</value>
</data>
<data name="cBUpdate.Text" xml:space="preserve">
<value>Başlangıçta güncellemeleri kontrol et</value>
</data>
<data name="cBDownloadLangauge.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 17</value>
</data>
<data name="cBDownloadLangauge.Text" xml:space="preserve">
<value>Güncellleme ile yeni dil paketi indir</value>
</data>
<data name="cBUpdateTime.Items" xml:space="preserve">
<value>saat</value>
</data>
<data name="cBUpdateTime.Items1" xml:space="preserve">
<value>gün</value>
</data>
<data name="cBUpdateTime.Location" type="System.Drawing.Point, System.Drawing">
<value>174, 0</value>
</data>
<data name="lbCheckEvery.Size" type="System.Drawing.Size, System.Drawing">
<value>121, 13</value>
</data>
<data name="lbCheckEvery.Text" xml:space="preserve">
<value>Şu aralıklarda kontrol et:</value>
</data>
<data name="nUDUpdateTime.Location" type="System.Drawing.Point, System.Drawing">
<value>124, 1</value>
</data>
<data name="pNUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>237, 22</value>
</data>
<data name="lbUseXIPorts.Size" type="System.Drawing.Size, System.Drawing">
<value>112, 13</value>
</data>
<data name="lbUseXIPorts.Text" xml:space="preserve">
<value>Xinput Portlarını Kullan</value>
</data>
<data name="nUDXIPorts.Location" type="System.Drawing.Point, System.Drawing">
<value>128, 1</value>
</data>
<data name="lbLastXIPort.Location" type="System.Drawing.Point, System.Drawing">
<value>178, 3</value>
</data>
<data name="pnlXIPorts.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
<data name="linkProfiles.Size" type="System.Drawing.Size, System.Drawing">
<value>68, 13</value>
</data>
@ -7014,4 +7005,13 @@
<data name="lLBUpdate.Text" xml:space="preserve">
<value>Şimdi Güncelleme için Kontrol Et</value>
</data>
<data name="flowLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>285, 10</value>
</data>
<data name="flowLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>165, 65</value>
</data>
<data name="tabSettings.Text" xml:space="preserve">
<value>Ayarlar</value>
</data>
</root>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DS4Windows.DS4Windows
{
public partial class DS4Keyboard : Form
{
public DS4Keyboard()
{
InitializeComponent();
}
}
}

View File

@ -117,7 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timeOutTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -208,7 +208,7 @@
this.lbBlueV = new System.Windows.Forms.Label();
this.lbGreenV = new System.Windows.Forms.Label();
this.lbRedV = new System.Windows.Forms.Label();
this.advColorDialog = new DS4Windows.AdvancedColorDialog();
this.advColorDialog = new AdvancedColorDialog();
((System.ComponentModel.ISupportInitialize)(this.pBX360)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pBMouse)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nUDHeavy)).BeginInit();
@ -1675,7 +1675,7 @@
this.advColorDialog.AnyColor = true;
this.advColorDialog.Color = System.Drawing.Color.Blue;
this.advColorDialog.FullOpen = true;
this.advColorDialog.OnUpdateColor += new DS4Windows.AdvancedColorDialog.ColorUpdateHandler(this.advColorDialog_OnUpdateColor);
this.advColorDialog.OnUpdateColor += new AdvancedColorDialog.ColorUpdateHandler(this.advColorDialog_OnUpdateColor);
//
// KBM360
//

View File

@ -113,14 +113,22 @@ namespace DS4Windows
ActiveControl = lBMacroOn;
}
public KBM360(SpecActions ooo, Button buton)
public KBM360(SpecActions ooo, Button buton, bool extras)
{
InitializeComponent();
sA = ooo;
button = buton;
Size = new System.Drawing.Size(763, 244);
cBScanCode.Checked = button.Text.Contains("(SC)");
cBToggle.Checked = button.Text.Contains("(Toggle)");
if (extras)
{
cBScanCode.Checked = button.Text.Contains("(SC)");
cBToggle.Checked = button.Text.Contains("(Toggle)");
}
else
{
cBScanCode.Visible = false;
cBToggle.Visible = false;
}
gBExtras.Visible = false;
bnMacro.Visible = false;
Text = Properties.Resources.SelectActionTitle.Replace("*action*", "Trigger");

File diff suppressed because it is too large Load Diff

View File

@ -292,7 +292,7 @@
this.lbRSCurvePercent = new System.Windows.Forms.Label();
this.lbLSCurvePercent = new System.Windows.Forms.Label();
this.lbLSCurve = new System.Windows.Forms.Label();
this.advColorDialog = new DS4Windows.AdvancedColorDialog();
this.advColorDialog = new AdvancedColorDialog();
((System.ComponentModel.ISupportInitialize)(this.nUDRainbow)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pBRainbow)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tBBlueBar)).BeginInit();

View File

@ -1,12 +1,12 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Xml;
using static DS4Windows.Global;
namespace DS4Windows
{
public partial class Options : Form
@ -106,60 +106,60 @@ namespace DS4Windows
if (filename != "")
{
if (device == 4) //if temp device is called
Global.ProfilePath[4] = name;
Global.LoadProfile(device, buttons.ToArray(), subbuttons.ToArray(), false, Program.rootHub);
DS4Color color = Global.MainColor[device];
ProfilePath[4] = name;
LoadProfile(device, buttons.ToArray(), subbuttons.ToArray(), false, Program.rootHub);
DS4Color color = MainColor[device];
tBRedBar.Value = color.red;
tBGreenBar.Value = color.green;
tBBlueBar.Value = color.blue;
cBLightbyBattery.Checked = Global.LedAsBatteryIndicator[device];
nUDflashLED.Value = Global.FlashAt[device];
cBLightbyBattery.Checked = LedAsBatteryIndicator[device];
nUDflashLED.Value = FlashAt[device];
pnlLowBattery.Visible = cBLightbyBattery.Checked;
lbFull.Text = (cBLightbyBattery.Checked ? "Full:" : "Color:");
pnlFull.Location = new Point(pnlFull.Location.X, (cBLightbyBattery.Checked ? (int)(dpix * 42) : (pnlFull.Location.Y + pnlLowBattery.Location.Y) / 2));
DS4Color lowColor = Global.LowColor[device];
DS4Color lowColor = LowColor[device];
tBLowRedBar.Value = lowColor.red;
tBLowGreenBar.Value = lowColor.green;
tBLowBlueBar.Value = lowColor.blue;
DS4Color shiftColor = Global.ShiftColor[device];
DS4Color shiftColor = ShiftColor[device];
tBShiftRedBar.Value = shiftColor.red;
tBShiftGreenBar.Value = shiftColor.green;
tBShiftBlueBar.Value = shiftColor.blue;
cBShiftLight.Checked = Global.ShiftColorOn[device];
cBShiftLight.Checked = ShiftColorOn[device];
DS4Color cColor = Global.ChargingColor[device];
DS4Color cColor = ChargingColor[device];
btnChargingColor.BackColor = Color.FromArgb(cColor.red, cColor.green, cColor.blue);
if (Global.FlashType[device] > cBFlashType.Items.Count - 1)
if (FlashType[device] > cBFlashType.Items.Count - 1)
cBFlashType.SelectedIndex = 0;
else
cBFlashType.SelectedIndex = Global.FlashType[device];
DS4Color fColor = Global.FlashColor[device];
cBFlashType.SelectedIndex = FlashType[device];
DS4Color fColor = FlashColor[device];
if (fColor.Equals(new DS4Color { red = 0, green = 0, blue = 0 }))
if (Global.Rainbow[device] == 0)
if (Rainbow[device] == 0)
btnFlashColor.BackColor = pBController.BackColor;
else
btnFlashColor.BackgroundImage = pBController.BackgroundImage;
else
btnFlashColor.BackColor = Color.FromArgb(fColor.red, fColor.green, fColor.blue);
nUDRumbleBoost.Value = Global.RumbleBoost[device];
nUDTouch.Value = Global.TouchSensitivity[device];
cBSlide.Checked = Global.TouchSensitivity[device] > 0;
nUDScroll.Value = Global.ScrollSensitivity[device];
cBScroll.Checked = Global.ScrollSensitivity[device] > 0;
nUDTap.Value = Global.TapSensitivity[device];
cBTap.Checked = Global.TapSensitivity[device] > 0;
cBDoubleTap.Checked = Global.DoubleTap[device];
nUDL2.Value = Math.Round((decimal)Global.L2Deadzone[device] / 255, 2);
nUDR2.Value = Math.Round((decimal)Global.R2Deadzone[device] / 255, 2);
cBTouchpadJitterCompensation.Checked = Global.TouchpadJitterCompensation[device];
cBlowerRCOn.Checked = Global.LowerRCOn[device];
cBFlushHIDQueue.Checked = Global.FlushHIDQueue[device];
nUDIdleDisconnect.Value = Math.Round((decimal)(Global.IdleDisconnectTimeout[device] / 60d), 1);
cBIdleDisconnect.Checked = Global.IdleDisconnectTimeout[device] > 0;
numUDMouseSens.Value = Global.ButtonMouseSensitivity[device];
cBMouseAccel.Checked = Global.MouseAccel[device];
nUDRumbleBoost.Value = RumbleBoost[device];
nUDTouch.Value = TouchSensitivity[device];
cBSlide.Checked = TouchSensitivity[device] > 0;
nUDScroll.Value = ScrollSensitivity[device];
cBScroll.Checked = ScrollSensitivity[device] > 0;
nUDTap.Value = TapSensitivity[device];
cBTap.Checked = TapSensitivity[device] > 0;
cBDoubleTap.Checked = DoubleTap[device];
nUDL2.Value = Math.Round((decimal)L2Deadzone[device] / 255, 2);
nUDR2.Value = Math.Round((decimal)R2Deadzone[device] / 255, 2);
cBTouchpadJitterCompensation.Checked = TouchpadJitterCompensation[device];
cBlowerRCOn.Checked = LowerRCOn[device];
cBFlushHIDQueue.Checked = FlushHIDQueue[device];
nUDIdleDisconnect.Value = Math.Round((decimal)(IdleDisconnectTimeout[device] / 60d), 1);
cBIdleDisconnect.Checked = IdleDisconnectTimeout[device] > 0;
numUDMouseSens.Value = ButtonMouseSensitivity[device];
cBMouseAccel.Checked = MouseAccel[device];
// Force update of color choosers
alphacolor = Math.Max(tBRedBar.Value, Math.Max(tBGreenBar.Value, tBBlueBar.Value));
reg = Color.FromArgb(color.red, color.green, color.blue);
@ -170,12 +170,12 @@ namespace DS4Windows
reg = Color.FromArgb(lowColor.red, lowColor.green, lowColor.blue);
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
lowColorChooserButton.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
nUDRainbow.Value = (decimal)Global.Rainbow[device];
if (Global.ChargingType[device] > cBWhileCharging.Items.Count - 1)
nUDRainbow.Value = (decimal)Rainbow[device];
if (ChargingType[device] > cBWhileCharging.Items.Count - 1)
cBWhileCharging.SelectedIndex = 0;
else
cBWhileCharging.SelectedIndex = Global.ChargingType[device];
if (Global.Rainbow[device] == 0)
cBWhileCharging.SelectedIndex = ChargingType[device];
if (Rainbow[device] == 0)
{
pBRainbow.Image = greyscale;
ToggleRainbow(false);
@ -185,24 +185,24 @@ namespace DS4Windows
pBRainbow.Image = colored;
ToggleRainbow(true);
}
nUDLS.Value = Math.Round((decimal)(Global.LSDeadzone[device] / 127d), 3);
nUDRS.Value = Math.Round((decimal)(Global.RSDeadzone[device] / 127d), 3);
nUDSX.Value = (decimal)Global.SXDeadzone[device];
nUDSZ.Value = (decimal)Global.SZDeadzone[device];
cBShiftControl.SelectedIndex = Global.ShiftModifier[device];
if (Global.LaunchProgram[device] != string.Empty)
nUDLS.Value = Math.Round((decimal)(LSDeadzone[device] / 127d), 3);
nUDRS.Value = Math.Round((decimal)(RSDeadzone[device] / 127d), 3);
nUDSX.Value = (decimal)SXDeadzone[device];
nUDSZ.Value = (decimal)SZDeadzone[device];
cBShiftControl.SelectedIndex = ShiftModifier[device];
if (LaunchProgram[device] != string.Empty)
{
cBLaunchProgram.Checked = true;
pBProgram.Image = Icon.ExtractAssociatedIcon(Global.LaunchProgram[device]).ToBitmap();
btnBrowse.Text = Path.GetFileNameWithoutExtension(Global.LaunchProgram[device]);
pBProgram.Image = Icon.ExtractAssociatedIcon(LaunchProgram[device]).ToBitmap();
btnBrowse.Text = Path.GetFileNameWithoutExtension(LaunchProgram[device]);
}
cBDinput.Checked = Global.DinputOnly[device];
cBDinput.Checked = DinputOnly[device];
olddinputcheck = cBDinput.Checked;
cbStartTouchpadOff.Checked = Global.StartTouchpadOff[device];
cBTPforControls.Checked = Global.UseTPforControls[device];
nUDLSCurve.Value = Global.LSCurve[device];
nUDRSCurve.Value = Global.RSCurve[device];
cBControllerInput.Checked = Global.DS4Mapping;
cbStartTouchpadOff.Checked = StartTouchpadOff[device];
cBTPforControls.Checked = UseTPforControls[device];
nUDLSCurve.Value = LSCurve[device];
nUDRSCurve.Value = RSCurve[device];
cBControllerInput.Checked = DS4Mapping;
}
else
{
@ -239,8 +239,8 @@ namespace DS4Windows
public void LoadActions(bool newp)
{
List<string> pactions = Global.ProfileActions[device];
foreach (SpecialAction action in Global.GetActions())
List<string> pactions = ProfileActions[device];
foreach (SpecialAction action in GetActions())
{
ListViewItem lvi = new ListViewItem(action.name);
lvi.SubItems.Add(action.controls.Replace("/", ", "));
@ -257,6 +257,9 @@ namespace DS4Windows
case "BatteryCheck":
lvi.SubItems.Add(Properties.Resources.CheckBattery);
break;
case "XboxGameDVR":
lvi.SubItems.Add("Xbox Game DVR");
break;
}
if (newp && action.type == "DisconnectBT")
lvi.Checked = true;
@ -547,45 +550,45 @@ namespace DS4Windows
pnlLowBattery.Visible = cBLightbyBattery.Checked;
lbFull.Text = (cBLightbyBattery.Checked ? Properties.Resources.Full + ":": Properties.Resources.Color + ":");
pnlFull.Location = new Point(pnlFull.Location.X, (cBLightbyBattery.Checked ? (int)(dpix * 42) : (pnlFull.Location.Y + pnlLowBattery.Location.Y) / 2));
Global.MainColor[device] = new DS4Color((byte)tBRedBar.Value, (byte)tBGreenBar.Value, (byte)tBBlueBar.Value);
Global.LowColor[device] = new DS4Color((byte)tBLowRedBar.Value, (byte)tBLowGreenBar.Value, (byte)tBLowBlueBar.Value);
Global.ShiftColor[device] = new DS4Color((byte)tBShiftRedBar.Value, (byte)tBShiftGreenBar.Value, (byte)tBShiftBlueBar.Value);
Global.ChargingColor[device] = new DS4Color(btnChargingColor.BackColor);
Global.FlashType[device] = (byte)cBFlashType.SelectedIndex;
MainColor[device] = new DS4Color((byte)tBRedBar.Value, (byte)tBGreenBar.Value, (byte)tBBlueBar.Value);
LowColor[device] = new DS4Color((byte)tBLowRedBar.Value, (byte)tBLowGreenBar.Value, (byte)tBLowBlueBar.Value);
ShiftColor[device] = new DS4Color((byte)tBShiftRedBar.Value, (byte)tBShiftGreenBar.Value, (byte)tBShiftBlueBar.Value);
ChargingColor[device] = new DS4Color(btnChargingColor.BackColor);
FlashType[device] = (byte)cBFlashType.SelectedIndex;
if (btnFlashColor.BackColor != pBController.BackColor)
Global.FlashColor[device] = new DS4Color(btnFlashColor.BackColor);
FlashColor[device] = new DS4Color(btnFlashColor.BackColor);
else
Global.FlashColor[device] = new DS4Color(Color.Black);
Global.L2Deadzone[device] = (byte)Math.Round((nUDL2.Value * 255), 0);
Global.R2Deadzone[device] = (byte)Math.Round((nUDR2.Value * 255), 0);
Global.RumbleBoost[device] = (byte)nUDRumbleBoost.Value;
Global.TouchSensitivity[device] = (byte)nUDTouch.Value;
Global.TouchpadJitterCompensation[device] = cBTouchpadJitterCompensation.Checked;
Global.LowerRCOn[device] = cBlowerRCOn.Checked;
Global.ScrollSensitivity[device] = (byte)nUDScroll.Value;
Global.DoubleTap[device] = cBDoubleTap.Checked;
Global.TapSensitivity[device] = (byte)nUDTap.Value;
Global.IdleDisconnectTimeout[device] = (int)(nUDIdleDisconnect.Value * 60);
Global.Rainbow[device] = (int)nUDRainbow.Value;
Global.RSDeadzone[device] = (int)Math.Round((nUDRS.Value * 127), 0);
Global.LSDeadzone[device] = (int)Math.Round((nUDLS.Value * 127), 0);
Global.ButtonMouseSensitivity[device] = (int)numUDMouseSens.Value;
Global.FlashAt[device] = (int)nUDflashLED.Value;
Global.SXDeadzone[device] = (double)nUDSX.Value;
Global.SZDeadzone[device] = (double)nUDSZ.Value;
Global.MouseAccel[device] = cBMouseAccel.Checked;
Global.ShiftModifier[device] = cBShiftControl.SelectedIndex;
Global.DinputOnly[device] = cBDinput.Checked;
Global.StartTouchpadOff[device] = cbStartTouchpadOff.Checked;
Global.UseTPforControls[device] = cBTPforControls.Checked;
Global.DS4Mapping = cBControllerInput.Checked;
Global.LSCurve[device] = (int)Math.Round(nUDLSCurve.Value, 0);
Global.RSCurve[device] = (int)Math.Round(nUDRSCurve.Value, 0);
FlashColor[device] = new DS4Color(Color.Black);
L2Deadzone[device] = (byte)Math.Round((nUDL2.Value * 255), 0);
R2Deadzone[device] = (byte)Math.Round((nUDR2.Value * 255), 0);
RumbleBoost[device] = (byte)nUDRumbleBoost.Value;
TouchSensitivity[device] = (byte)nUDTouch.Value;
TouchpadJitterCompensation[device] = cBTouchpadJitterCompensation.Checked;
LowerRCOn[device] = cBlowerRCOn.Checked;
ScrollSensitivity[device] = (byte)nUDScroll.Value;
DoubleTap[device] = cBDoubleTap.Checked;
TapSensitivity[device] = (byte)nUDTap.Value;
IdleDisconnectTimeout[device] = (int)(nUDIdleDisconnect.Value * 60);
Rainbow[device] = (int)nUDRainbow.Value;
RSDeadzone[device] = (int)Math.Round((nUDRS.Value * 127), 0);
LSDeadzone[device] = (int)Math.Round((nUDLS.Value * 127), 0);
ButtonMouseSensitivity[device] = (int)numUDMouseSens.Value;
FlashAt[device] = (int)nUDflashLED.Value;
SXDeadzone[device] = (double)nUDSX.Value;
SZDeadzone[device] = (double)nUDSZ.Value;
MouseAccel[device] = cBMouseAccel.Checked;
ShiftModifier[device] = cBShiftControl.SelectedIndex;
DinputOnly[device] = cBDinput.Checked;
StartTouchpadOff[device] = cbStartTouchpadOff.Checked;
UseTPforControls[device] = cBTPforControls.Checked;
DS4Mapping = cBControllerInput.Checked;
LSCurve[device] = (int)Math.Round(nUDLSCurve.Value, 0);
RSCurve[device] = (int)Math.Round(nUDRSCurve.Value, 0);
List<string> pactions = new List<string>();
foreach (ListViewItem lvi in lVActions.Items)
if (lvi.Checked)
pactions.Add(lvi.Text);
Global.ProfileActions[device] = pactions;
ProfileActions[device] = pactions;
gBTouchpad.Enabled = !cBTPforControls.Checked;
if (cBTPforControls.Checked)
tabControls.Size = new Size(tabControls.Size.Width, (int)(282 * dpiy));
@ -733,7 +736,7 @@ namespace DS4Windows
}
if (device < 4)
DS4LightBar.forcelight[device] = false;
Global.ChargingColor[device] = new DS4Color(btnChargingColor.BackColor);
ChargingColor[device] = new DS4Color(btnChargingColor.BackColor);
}
private void advColorDialog_OnUpdateColor(object sender, EventArgs e)
{
@ -757,7 +760,7 @@ namespace DS4Windows
reg = Color.FromArgb(tBRedBar.Value, tBGreenBar.Value, tBBlueBar.Value);
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
pBController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
Global.MainColor[device] = new DS4Color((byte)tBRedBar.Value, (byte)tBGreenBar.Value, (byte)tBBlueBar.Value);
MainColor[device] = new DS4Color((byte)tBRedBar.Value, (byte)tBGreenBar.Value, (byte)tBBlueBar.Value);
if (!saving)
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), (int)(dpix * 100), 0, 2000);
}
@ -771,7 +774,7 @@ namespace DS4Windows
reg = Color.FromArgb(tBRedBar.Value, tBGreenBar.Value, tBBlueBar.Value);
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
pBController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
Global.MainColor[device] = new DS4Color((byte)tBRedBar.Value, (byte)tBGreenBar.Value, (byte)tBBlueBar.Value);
MainColor[device] = new DS4Color((byte)tBRedBar.Value, (byte)tBGreenBar.Value, (byte)tBBlueBar.Value);
if (!saving)
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), (int)(100*dpix), 0, 2000);
}
@ -785,7 +788,7 @@ namespace DS4Windows
reg = Color.FromArgb(tBRedBar.Value, tBGreenBar.Value, tBBlueBar.Value);
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
pBController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
Global.MainColor[device] = new DS4Color((byte)tBRedBar.Value, (byte)tBGreenBar.Value, (byte)tBBlueBar.Value);
MainColor[device] = new DS4Color((byte)tBRedBar.Value, (byte)tBGreenBar.Value, (byte)tBBlueBar.Value);
if (!saving)
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), (int)(100 * dpix), 0, 2000);
}
@ -800,7 +803,7 @@ namespace DS4Windows
reg = Color.FromArgb(tBLowRedBar.Value, tBLowGreenBar.Value, tBLowBlueBar.Value);
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
lowColorChooserButton.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
Global.LowColor[device] = new DS4Color((byte)tBLowRedBar.Value, (byte)tBLowGreenBar.Value, (byte)tBLowBlueBar.Value);
LowColor[device] = new DS4Color((byte)tBLowRedBar.Value, (byte)tBLowGreenBar.Value, (byte)tBLowBlueBar.Value);
if (!saving)
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), (int)(100 * dpix), 0, 2000);
}
@ -815,7 +818,7 @@ namespace DS4Windows
reg = Color.FromArgb(tBLowRedBar.Value, tBLowGreenBar.Value, tBLowBlueBar.Value);
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
lowColorChooserButton.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
Global.LowColor[device] = new DS4Color((byte)tBLowRedBar.Value, (byte)tBLowGreenBar.Value, (byte)tBLowBlueBar.Value);
LowColor[device] = new DS4Color((byte)tBLowRedBar.Value, (byte)tBLowGreenBar.Value, (byte)tBLowBlueBar.Value);
if (!saving)
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), (int)(100 * dpix), 0, 2000);
}
@ -830,7 +833,7 @@ namespace DS4Windows
reg = Color.FromArgb(tBLowRedBar.Value, tBLowGreenBar.Value, tBLowBlueBar.Value);
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
lowColorChooserButton.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
Global.LowColor[device] = new DS4Color((byte)tBLowRedBar.Value, (byte)tBLowGreenBar.Value, (byte)tBLowBlueBar.Value);
LowColor[device] = new DS4Color((byte)tBLowRedBar.Value, (byte)tBLowGreenBar.Value, (byte)tBLowBlueBar.Value);
if (!saving)
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), (int)(100 * dpix), 0, 2000);
}
@ -845,7 +848,7 @@ namespace DS4Windows
reg = Color.FromArgb(tBShiftRedBar.Value, tBShiftGreenBar.Value, tBShiftBlueBar.Value);
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
pBShiftController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
Global.ShiftColor[device] = new DS4Color((byte)tBShiftRedBar.Value, (byte)tBShiftGreenBar.Value, (byte)tBShiftBlueBar.Value);
ShiftColor[device] = new DS4Color((byte)tBShiftRedBar.Value, (byte)tBShiftGreenBar.Value, (byte)tBShiftBlueBar.Value);
if (!saving)
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), (int)(100 * dpix), 0, 2000);
}
@ -860,7 +863,7 @@ namespace DS4Windows
reg = Color.FromArgb(tBShiftRedBar.Value, tBShiftGreenBar.Value, tBShiftBlueBar.Value);
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
pBShiftController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
Global.ShiftColor[device] = new DS4Color((byte)tBShiftRedBar.Value, (byte)tBShiftGreenBar.Value, (byte)tBShiftBlueBar.Value);
ShiftColor[device] = new DS4Color((byte)tBShiftRedBar.Value, (byte)tBShiftGreenBar.Value, (byte)tBShiftBlueBar.Value);
if (!saving)
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), (int)(100 * dpix), 0, 2000);
}
@ -875,7 +878,7 @@ namespace DS4Windows
reg = Color.FromArgb(tBShiftRedBar.Value, tBShiftGreenBar.Value, tBShiftBlueBar.Value);
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
pBShiftController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
Global.ShiftColor[device] = new DS4Color((byte)tBShiftRedBar.Value, (byte)tBShiftGreenBar.Value, (byte)tBShiftBlueBar.Value);
ShiftColor[device] = new DS4Color((byte)tBShiftRedBar.Value, (byte)tBShiftGreenBar.Value, (byte)tBShiftBlueBar.Value);
if (!saving)
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), (int)(100 * dpix), 0, 2000);
}
@ -899,7 +902,7 @@ namespace DS4Windows
}
private void rumbleBoostBar_ValueChanged(object sender, EventArgs e)
{
Global.RumbleBoost[device] = (byte)nUDRumbleBoost.Value;
RumbleBoost[device] = (byte)nUDRumbleBoost.Value;
byte h = (byte)Math.Min(255, (255 * nUDRumbleBoost.Value / 100));
byte l = (byte)Math.Min(255, (255 * nUDRumbleBoost.Value / 100));
bool hB = btnRumbleHeavyTest.Text == Properties.Resources.TestLText;
@ -941,21 +944,21 @@ namespace DS4Windows
private void numUDTouch_ValueChanged(object sender, EventArgs e)
{
Global.TouchSensitivity[device] = (byte)nUDTouch.Value;
TouchSensitivity[device] = (byte)nUDTouch.Value;
}
private void numUDTap_ValueChanged(object sender, EventArgs e)
{
Global.TapSensitivity[device] = (byte)nUDTap.Value;
TapSensitivity[device] = (byte)nUDTap.Value;
}
private void numUDScroll_ValueChanged(object sender, EventArgs e)
{
Global.ScrollSensitivity[device] = (int)nUDScroll.Value;
ScrollSensitivity[device] = (int)nUDScroll.Value;
}
private void ledAsBatteryIndicator_CheckedChanged(object sender, EventArgs e)
{
Global.LedAsBatteryIndicator[device] = cBLightbyBattery.Checked;
LedAsBatteryIndicator[device] = cBLightbyBattery.Checked;
pnlLowBattery.Visible = cBLightbyBattery.Checked;
pnlFull.Location = new Point(pnlFull.Location.X, (cBLightbyBattery.Checked ? (int)(dpix * 42) : (pnlFull.Location.Y + pnlLowBattery.Location.Y) / 2));
lbFull.Text = (cBLightbyBattery.Checked ? Properties.Resources.Full + ":" : Properties.Resources.Color + ":");
@ -963,22 +966,22 @@ namespace DS4Windows
private void lowerRCOffCheckBox_CheckedChanged(object sender, EventArgs e)
{
Global.LowerRCOn[device] = cBlowerRCOn.Checked;
LowerRCOn[device] = cBlowerRCOn.Checked;
}
private void touchpadJitterCompensation_CheckedChanged(object sender, EventArgs e)
{
Global.TouchpadJitterCompensation[device] = cBTouchpadJitterCompensation.Checked;
TouchpadJitterCompensation[device] = cBTouchpadJitterCompensation.Checked;
}
private void flushHIDQueue_CheckedChanged(object sender, EventArgs e)
{
Global.FlushHIDQueue[device] = cBFlushHIDQueue.Checked;
FlushHIDQueue[device] = cBFlushHIDQueue.Checked;
}
private void nUDIdleDisconnect_ValueChanged(object sender, EventArgs e)
{
Global.IdleDisconnectTimeout[device] = (int)(nUDIdleDisconnect.Value * 60);
IdleDisconnectTimeout[device] = (int)(nUDIdleDisconnect.Value * 60);
//if (nUDIdleDisconnect.Value == 0)
//cBIdleDisconnect.Checked = false;
}
@ -995,7 +998,7 @@ namespace DS4Windows
private void Options_Closed(object sender, FormClosedEventArgs e)
{
for (int i = 0; i < 4; i++)
Global.LoadProfile(i, false, Program.rootHub); //Refreshes all profiles in case other controllers are using the same profile
LoadProfile(i, false, Program.rootHub); //Refreshes all profiles in case other controllers are using the same profile
if (olddinputcheck != cBDinput.Checked)
{
root.btnStartStop_Clicked(false);
@ -1037,7 +1040,7 @@ namespace DS4Windows
private void cBDoubleTap_CheckedChanged(object sender, EventArgs e)
{
Global.DoubleTap[device] = cBDoubleTap.Checked;
DoubleTap[device] = cBDoubleTap.Checked;
}
public void UpdateLists()
@ -1281,7 +1284,7 @@ namespace DS4Windows
private void numUDRainbow_ValueChanged(object sender, EventArgs e)
{
Global.Rainbow[device]= (double)nUDRainbow.Value;
Rainbow[device]= (double)nUDRainbow.Value;
if ((double)nUDRainbow.Value <= 0.5)
{
pBRainbow.Image = greyscale;
@ -1347,23 +1350,23 @@ namespace DS4Windows
private void numUDL2_ValueChanged(object sender, EventArgs e)
{
Global.L2Deadzone[device] = (byte)(nUDL2.Value * 255);
L2Deadzone[device] = (byte)(nUDL2.Value * 255);
}
private void numUDR2_ValueChanged(object sender, EventArgs e)
{
Global.R2Deadzone[device] = (byte)(nUDR2.Value * 255);
R2Deadzone[device] = (byte)(nUDR2.Value * 255);
}
private void nUDSX_ValueChanged(object sender, EventArgs e)
{
Global.SXDeadzone[device] = (double)nUDSX.Value;
SXDeadzone[device] = (double)nUDSX.Value;
lbSATrack.Refresh();
}
private void nUDSZ_ValueChanged(object sender, EventArgs e)
{
Global.SZDeadzone[device] = (double)nUDSZ.Value;
SZDeadzone[device] = (double)nUDSZ.Value;
lbSATrack.Refresh();
}
@ -1406,7 +1409,7 @@ namespace DS4Windows
private void numUDRS_ValueChanged(object sender, EventArgs e)
{
nUDRS.Value = Math.Round(nUDRS.Value, 2);
Global.RSDeadzone[device] = (int)Math.Round((nUDRS.Value * 127),0);
RSDeadzone[device] = (int)Math.Round((nUDRS.Value * 127),0);
lbRSTrack.BackColor = nUDRS.Value >= 0 ? Color.White : Color.Red;
lbRSTrack.Refresh();
}
@ -1434,7 +1437,7 @@ namespace DS4Windows
private void numUDLS_ValueChanged(object sender, EventArgs e)
{
nUDLS.Value = Math.Round(nUDLS.Value, 2);
Global.LSDeadzone[device] = (int)Math.Round((nUDLS.Value * 127), 0);
LSDeadzone[device] = (int)Math.Round((nUDLS.Value * 127), 0);
lbLSTrack.BackColor = nUDLS.Value >= 0 ? Color.White : Color.Red;
lbLSTrack.Refresh();
}
@ -1461,8 +1464,8 @@ namespace DS4Windows
private void numUDMouseSens_ValueChanged(object sender, EventArgs e)
{
Global.ButtonMouseSensitivity[device] = (int)numUDMouseSens.Value;
//Global.ButtonMouseSensitivity(device, (int)numUDMouseSens.Value);
ButtonMouseSensitivity[device] = (int)numUDMouseSens.Value;
//ButtonMouseSensitivity(device, (int)numUDMouseSens.Value);
}
private void LightBar_MouseDown(object sender, MouseEventArgs e)
@ -1485,17 +1488,17 @@ namespace DS4Windows
{
if (nUDflashLED.Value % 10 != 0)
nUDflashLED.Value = Math.Round(nUDflashLED.Value / 10, 0) * 10;
Global.FlashAt[device] = (int)nUDflashLED.Value;
FlashAt[device] = (int)nUDflashLED.Value;
}
private void cBMouseAccel_CheckedChanged(object sender, EventArgs e)
{
Global.MouseAccel[device] = cBMouseAccel.Checked;
MouseAccel[device] = cBMouseAccel.Checked;
}
private void cBShiftControl_SelectedIndexChanged(object sender, EventArgs e)
{
Global.ShiftModifier[device] = cBShiftControl.SelectedIndex;
ShiftModifier[device] = cBShiftControl.SelectedIndex;
if (cBShiftControl.SelectedIndex < 1)
cBShiftLight.Checked = false;
}
@ -1556,7 +1559,7 @@ namespace DS4Windows
private void cBShiftLight_CheckedChanged(object sender, EventArgs e)
{
if (Global.ShiftModifier[device] < 1)
if (ShiftModifier[device] < 1)
cBShiftLight.Checked = false;
if (!cBShiftLight.Checked)
{
@ -1570,7 +1573,7 @@ namespace DS4Windows
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
pBShiftController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
}
Global.ShiftColorOn[device]= cBShiftLight.Checked;
ShiftColorOn[device]= cBShiftLight.Checked;
lbShift.Enabled = cBShiftLight.Checked;
lbShiftRed.Enabled = cBShiftLight.Checked;
lbShiftGreen.Enabled = cBShiftLight.Checked;
@ -1585,7 +1588,7 @@ namespace DS4Windows
if( openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
cBLaunchProgram.Checked = true;
Global.LaunchProgram[device] = openFileDialog1.FileName;
LaunchProgram[device] = openFileDialog1.FileName;
pBProgram.Image = Icon.ExtractAssociatedIcon(openFileDialog1.FileName).ToBitmap();
btnBrowse.Text = Path.GetFileNameWithoutExtension(openFileDialog1.FileName);
}
@ -1595,7 +1598,7 @@ namespace DS4Windows
{
if (!cBLaunchProgram.Checked)
{
Global.LaunchProgram[device] = string.Empty;
LaunchProgram[device] = string.Empty;
pBProgram.Image = null;
btnBrowse.Text = Properties.Resources.Browse;
}
@ -1603,7 +1606,7 @@ namespace DS4Windows
private void cBDinput_CheckedChanged(object sender, EventArgs e)
{
Global.DinputOnly[device] = cBDinput.Checked;
DinputOnly[device] = cBDinput.Checked;
if (device < 4)
{
root.btnStartStop_Clicked(false);
@ -1613,7 +1616,7 @@ namespace DS4Windows
private void cbStartTouchpadOff_CheckedChanged(object sender, EventArgs e)
{
Global.StartTouchpadOff[device] = cbStartTouchpadOff.Checked;
StartTouchpadOff[device] = cbStartTouchpadOff.Checked;
}
private void Items_MouseHover(object sender, EventArgs e)
@ -1693,7 +1696,7 @@ namespace DS4Windows
private void cBTPforControls_CheckedChanged(object sender, EventArgs e)
{
Global.UseTPforControls[device] = cBTPforControls.Checked;
UseTPforControls[device] = cBTPforControls.Checked;
gBTouchpad.Enabled = !cBTPforControls.Checked;
if (cBTPforControls.Checked)
{
@ -1731,7 +1734,7 @@ namespace DS4Windows
private void cBControllerInput_CheckedChanged(object sender, EventArgs e)
{
Global.DS4Mapping=cBControllerInput.Checked;
DS4Mapping=cBControllerInput.Checked;
}
private void btnAddAction_Click(object sender, EventArgs e)
@ -1761,7 +1764,7 @@ namespace DS4Windows
{
if (lVActions.SelectedIndices.Count > 0 && lVActions.SelectedIndices[0] >= 0)
{
Global.RemoveAction(lVActions.SelectedItems[0].Text);
RemoveAction(lVActions.SelectedItems[0].Text);
lVActions.Items.Remove(lVActions.SelectedItems[0]);
}
}
@ -1772,7 +1775,7 @@ namespace DS4Windows
foreach (ListViewItem lvi in lVActions.Items)
if (lvi.Checked)
pactions.Add(lvi.Text);
Global.ProfileActions[device] = pactions;
ProfileActions[device] = pactions;
if (lVActions.Items.Count >= 50)
{
btnNewAction.Enabled = false;
@ -1781,12 +1784,12 @@ namespace DS4Windows
private void nUDLSCurve_ValueChanged(object sender, EventArgs e)
{
Global.LSCurve[device] = (int)Math.Round(nUDLSCurve.Value, 0);
LSCurve[device] = (int)Math.Round(nUDLSCurve.Value, 0);
}
private void nUDRSCurve_ValueChanged(object sender, EventArgs e)
{
Global.RSCurve[device] = (int)Math.Round(nUDRSCurve.Value, 0);
RSCurve[device] = (int)Math.Round(nUDRSCurve.Value, 0);
}
private void cMSPresets_Opened(object sender, EventArgs e)
@ -2096,7 +2099,7 @@ namespace DS4Windows
private void cBWhileCharging_SelectedIndexChanged(object sender, EventArgs e)
{
Global.ChargingType[device] = cBWhileCharging.SelectedIndex;
ChargingType[device] = cBWhileCharging.SelectedIndex;
btnChargingColor.Visible = cBWhileCharging.SelectedIndex == 3;
}
@ -2113,7 +2116,7 @@ namespace DS4Windows
btnFlashColor.BackColor = advColorDialog.Color;
else
btnFlashColor.BackColor = pBController.BackColor;
Global.FlashColor[device] = new DS4Color(advColorDialog.Color);
FlashColor[device] = new DS4Color(advColorDialog.Color);
}
if (device < 4)
DS4LightBar.forcelight[device] = false;
@ -2121,7 +2124,7 @@ namespace DS4Windows
private void pBController_BackColorChanged(object sender, EventArgs e)
{
if (Global.FlashColor[device].Equals(new DS4Color { red = 0, green = 0, blue = 0 }))
if (FlashColor[device].Equals(new DS4Color { red = 0, green = 0, blue = 0 }))
{
btnFlashColor.BackColor = pBController.BackColor;
}
@ -2134,12 +2137,12 @@ namespace DS4Windows
private void cBFlashType_SelectedIndexChanged(object sender, EventArgs e)
{
Global.FlashType[device]= (byte)cBFlashType.SelectedIndex;
FlashType[device]= (byte)cBFlashType.SelectedIndex;
}
private void nUDRainbowB_ValueChanged(object sender, EventArgs e)
{
//Global.
//
}
}
}

Some files were not shown because too many files have changed in this diff Show More