mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 02:54:20 +01:00
Option to change what happens to the lightbar when charging: options are normal, fade in and out, rainbow, and it's own color
Settings for saving,renaming, and cancelling the save of a profile while in profile settings moved into the toolbar Switch profiles now by a 2 finger swipe left or right on touchpad When shutting down, the controller light turns fully off
This commit is contained in:
parent
4e07f1c01e
commit
2da3c285a9
@ -469,18 +469,11 @@ namespace DS4Control
|
||||
else return "nothing";
|
||||
}
|
||||
|
||||
bool touchreleased = true, touchslid = false;
|
||||
bool[] touchreleased = { true, true, true, true }, touchslid = { false, false, false, false };
|
||||
byte[] oldtouchvalue = { 0, 0, 0, 0 };
|
||||
protected virtual void CheckForHotkeys(int deviceID, DS4State cState, DS4State pState)
|
||||
{
|
||||
DS4Device d = DS4Controllers[deviceID];
|
||||
if (cState.Touch1 && !pState.Share && !pState.Options)
|
||||
{
|
||||
/*if (cState.Share)
|
||||
Global.setTouchSensitivity(deviceID, 0);
|
||||
else if (cState.Options)
|
||||
Global.setTouchSensitivity(deviceID, 100); */
|
||||
}
|
||||
if ((!pState.PS || !pState.Options) && cState.PS && cState.Options)
|
||||
{
|
||||
if (!d.Charging)
|
||||
@ -498,45 +491,46 @@ namespace DS4Control
|
||||
}
|
||||
if (cState.TouchButton && pState.PS)
|
||||
{
|
||||
if (Global.getTouchSensitivity(deviceID) > 0 && touchreleased)
|
||||
if (Global.getTouchSensitivity(deviceID) > 0 && touchreleased[deviceID])
|
||||
{
|
||||
oldtouchvalue[deviceID] = Global.getTouchSensitivity(deviceID);
|
||||
Global.setTouchSensitivity(deviceID, 0);
|
||||
LogDebug("Touchpad Movement is now " + (Global.getTouchSensitivity(deviceID) > 0 ? "On" : "Off"));
|
||||
Log.LogToTray("Touchpad Movement is now " + (Global.getTouchSensitivity(deviceID) > 0 ? "On" : "Off"));
|
||||
touchreleased = false;
|
||||
touchreleased[deviceID] = false;
|
||||
}
|
||||
else if (touchreleased)
|
||||
else if (touchreleased[deviceID])
|
||||
{
|
||||
Global.setTouchSensitivity(deviceID, oldtouchvalue[deviceID]);
|
||||
LogDebug("Touchpad Movement is now " + (Global.getTouchSensitivity(deviceID) > 0 ? "On" : "Off"));
|
||||
Log.LogToTray("Touchpad Movement is now " + (Global.getTouchSensitivity(deviceID) > 0 ? "On" : "Off"));
|
||||
touchreleased = false;
|
||||
touchreleased[deviceID] = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
touchreleased = true;
|
||||
touchreleased[deviceID] = true;
|
||||
}
|
||||
|
||||
public virtual string TouchpadSlide(int ind)
|
||||
{
|
||||
DS4State cState = CurrentState[ind];
|
||||
string slidedir = "none";
|
||||
if (cState.L1 && cState.R1)
|
||||
if (touchPad[ind].slideright && !touchslid)
|
||||
if (cState.Touch2)
|
||||
if (DS4Controllers[ind] != null)
|
||||
if (touchPad[ind].slideright && !touchslid[ind])
|
||||
{
|
||||
slidedir = "right";
|
||||
touchslid = true;
|
||||
touchslid[ind] = true;
|
||||
}
|
||||
else if (touchPad[ind].slideleft && !touchslid)
|
||||
else if (touchPad[ind].slideleft && !touchslid[ind])
|
||||
{
|
||||
slidedir = "left";
|
||||
touchslid = true;
|
||||
touchslid[ind] = true;
|
||||
}
|
||||
else if (!touchPad[ind].slideleft && !touchPad[ind].slideright)
|
||||
{
|
||||
slidedir = "";
|
||||
touchslid = false;
|
||||
touchslid[ind] = false;
|
||||
}
|
||||
return slidedir;
|
||||
}
|
||||
|
@ -20,8 +20,9 @@ namespace DS4Control
|
||||
{ 224, 56}, // on 80% of the time at 80, etc.
|
||||
{ 252, 28 } // on 90% of the time at 90
|
||||
};
|
||||
static double[] counters = new double[4] {0,0,0,0};
|
||||
|
||||
static double[] counters = new double[4] { 0, 0, 0, 0 };
|
||||
public static double[] fadetimer = new double[4] { 0, 0, 0, 0 };
|
||||
static bool[] fadedirection = new bool[4] { false, false, false, false };
|
||||
static DateTime oldnow = DateTime.UtcNow;
|
||||
public static void updateLightBar(DS4Device device, int deviceNum)
|
||||
{
|
||||
@ -49,7 +50,7 @@ namespace DS4Control
|
||||
}
|
||||
else if (Global.getLedAsBatteryIndicator(deviceNum))
|
||||
{
|
||||
if (device.Charging == false || device.Battery >= 100) // when charged, don't show the charging animation
|
||||
//if (device.Charging == false || device.Battery >= 100) // when charged, don't show the charging animation
|
||||
{
|
||||
DS4Color fullColor = new DS4Color
|
||||
{
|
||||
@ -68,11 +69,6 @@ namespace DS4Control
|
||||
|
||||
color = Global.getTransitionedColor(lowColor, fullColor, (uint)device.Battery);
|
||||
}
|
||||
else // Display rainbow when charging.
|
||||
{
|
||||
counters[deviceNum] += .167;
|
||||
color = HuetoRGB((float)counters[deviceNum] % 360, 255);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -90,7 +86,33 @@ namespace DS4Control
|
||||
else if (ratio >= 100)
|
||||
color = Global.getTransitionedColor(color, new DS4Color { red = 0, green = 0, blue = 0 }, 100);
|
||||
}
|
||||
if (device.Charging && device.Battery < 100)
|
||||
switch (Global.getChargingType(deviceNum))
|
||||
{
|
||||
case 1:
|
||||
if (fadetimer[deviceNum] <= 0)
|
||||
fadedirection[deviceNum] = true;
|
||||
else if (fadetimer[deviceNum] >= 105)
|
||||
fadedirection[deviceNum] = false;
|
||||
if (fadedirection[deviceNum])
|
||||
fadetimer[deviceNum]+= .1;
|
||||
else
|
||||
fadetimer[deviceNum] -= .1;
|
||||
color = Global.getTransitionedColor(color, new DS4Color { red = 0, green = 0, blue = 0 }, fadetimer[deviceNum]);
|
||||
break;
|
||||
case 2:
|
||||
counters[deviceNum] += .167;
|
||||
color = HuetoRGB((float)counters[deviceNum] % 360, 255);
|
||||
break;
|
||||
case 3:
|
||||
color = Global.loadChargingColor(deviceNum);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (shuttingdown)
|
||||
color = new DS4Color { red = 0, green = 0, blue = 0};
|
||||
else
|
||||
color = new DS4Color { red = 32, green = 64, blue = 64 };
|
||||
DS4HapticState haptics = new DS4HapticState
|
||||
@ -120,7 +142,7 @@ namespace DS4Control
|
||||
device.pushHapticState(haptics);
|
||||
|
||||
}
|
||||
public static bool defualtLight = false;
|
||||
public static bool defualtLight = false, shuttingdown = false;
|
||||
|
||||
public static DS4Color HuetoRGB(float hue, byte sat)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ namespace DS4Control
|
||||
public class Mouse : ITouchpadBehaviour
|
||||
{
|
||||
protected DateTime pastTime, firstTap, TimeofEnd;
|
||||
protected Touch firstTouch;
|
||||
protected Touch firstTouch, secondTouch;
|
||||
private DS4State s = new DS4State();
|
||||
protected int deviceNum;
|
||||
private DS4Device dev = null;
|
||||
@ -33,11 +33,13 @@ namespace DS4Control
|
||||
public virtual void touchesMoved(object sender, TouchpadEventArgs arg)
|
||||
{
|
||||
cursor.touchesMoved(arg);
|
||||
if (Math.Abs(firstTouch.hwX - arg.touches[0].hwX) > 5 && Math.Abs(firstTouch.hwY - arg.touches[0].hwY) > 5)
|
||||
if (Math.Abs(firstTouch.hwY - arg.touches[0].hwY) > 5)
|
||||
wheel.touchesMoved(arg);
|
||||
if (arg.touches[0].hwX - firstTouch.hwX > 300 && !slideleft)
|
||||
if (Math.Abs(firstTouch.hwY - arg.touches[0].hwY) < 50)
|
||||
if (arg.touches.Length == 2)
|
||||
if (arg.touches[0].hwX - firstTouch.hwX > 200 && !slideleft)
|
||||
slideright = true;
|
||||
else if (firstTouch.hwX - arg.touches[0].hwX > 300 && !slideright)
|
||||
else if (firstTouch.hwX - arg.touches[0].hwX > 200 && !slideright)
|
||||
slideleft = true;
|
||||
dev.getCurrentState(s);
|
||||
synthesizeMouseButtons();
|
||||
|
@ -187,6 +187,17 @@ namespace DS4Control
|
||||
return m_Config.ledAsBattery[device];
|
||||
}
|
||||
|
||||
public static void setChargingType(int device, int type)
|
||||
{
|
||||
m_Config.chargingType[device] = type;
|
||||
|
||||
}
|
||||
public static int getChargingType(int device)
|
||||
{
|
||||
return m_Config.chargingType[device];
|
||||
|
||||
}
|
||||
|
||||
public static void setUseExclusiveMode(bool exclusive)
|
||||
{
|
||||
m_Config.useExclusiveMode = exclusive;
|
||||
@ -230,6 +241,20 @@ namespace DS4Control
|
||||
color.blue = m_Config.m_LowLeds[device][2];
|
||||
return color;
|
||||
}
|
||||
public static void saveChargingColor(int device, byte red, byte green, byte blue)
|
||||
{
|
||||
m_Config.m_ChargingLeds[device][0] = red;
|
||||
m_Config.m_ChargingLeds[device][1] = green;
|
||||
m_Config.m_ChargingLeds[device][2] = blue;
|
||||
}
|
||||
public static DS4Color loadChargingColor(int device)
|
||||
{
|
||||
DS4Color color = new DS4Color();
|
||||
color.red = m_Config.m_ChargingLeds[device][0];
|
||||
color.green = m_Config.m_ChargingLeds[device][1];
|
||||
color.blue = m_Config.m_ChargingLeds[device][2];
|
||||
return color;
|
||||
}
|
||||
public static void setTapSensitivity(int device, byte sen)
|
||||
{
|
||||
m_Config.tapSensitivity[device] = sen;
|
||||
@ -401,19 +426,23 @@ namespace DS4Control
|
||||
m_Config.SaveProfile(device, propath, buttons);
|
||||
}
|
||||
|
||||
private static byte applyRatio(byte b1, byte b2, uint r)
|
||||
private static byte applyRatio(byte b1, byte b2, double r)
|
||||
{
|
||||
uint ratio = r;
|
||||
if (r > 100)
|
||||
r = 100;
|
||||
else if (r < 0)
|
||||
r = 0;
|
||||
uint ratio = (uint)r;
|
||||
if (b1 > b2)
|
||||
{
|
||||
ratio = 100 - r;
|
||||
ratio = 100 - (uint)r;
|
||||
}
|
||||
byte bmax = Math.Max(b1, b2);
|
||||
byte bmin = Math.Min(b1, b2);
|
||||
byte bdif = (byte)(bmax - bmin);
|
||||
return (byte)(bmin + (bdif * ratio / 100));
|
||||
}
|
||||
public static DS4Color getTransitionedColor(DS4Color c1, DS4Color c2, uint ratio)
|
||||
public static DS4Color getTransitionedColor(DS4Color c1, DS4Color c2, double ratio)
|
||||
{;
|
||||
Color cs = Color.FromArgb(c1.red, c1.green, c1.blue);
|
||||
c1.red = applyRatio(c1.red, c2.red, ratio);
|
||||
@ -515,6 +544,15 @@ namespace DS4Control
|
||||
new Byte[] {255,0,255},
|
||||
new Byte[] {255,255,255}
|
||||
};
|
||||
public Byte[][] m_ChargingLeds = new Byte[][]
|
||||
{
|
||||
new Byte[] {0,0,0},
|
||||
new Byte[] {0,0,0},
|
||||
new Byte[] {0,0,0},
|
||||
new Byte[] {0,0,0},
|
||||
new Byte[] {0,0,0}
|
||||
};
|
||||
public int[] chargingType = { 0, 0, 0, 0, 0 };
|
||||
public bool[] flushHIDQueue = { true, true, true, true, true };
|
||||
public int[] idleDisconnectTimeout = { 0, 0, 0, 0, 0 };
|
||||
|
||||
@ -599,6 +637,9 @@ namespace DS4Control
|
||||
XmlNode xmlLowRed = m_Xdoc.CreateNode(XmlNodeType.Element, "LowRed", null); xmlLowRed.InnerText = m_LowLeds[device][0].ToString(); Node.AppendChild(xmlLowRed);
|
||||
XmlNode xmlLowGreen = m_Xdoc.CreateNode(XmlNodeType.Element, "LowGreen", null); xmlLowGreen.InnerText = m_LowLeds[device][1].ToString(); Node.AppendChild(xmlLowGreen);
|
||||
XmlNode xmlLowBlue = m_Xdoc.CreateNode(XmlNodeType.Element, "LowBlue", null); xmlLowBlue.InnerText = m_LowLeds[device][2].ToString(); Node.AppendChild(xmlLowBlue);
|
||||
XmlNode xmlChargingRed = m_Xdoc.CreateNode(XmlNodeType.Element, "ChargingRed", null); xmlChargingRed.InnerText = m_ChargingLeds[device][0].ToString(); Node.AppendChild(xmlChargingRed);
|
||||
XmlNode xmlChargingGreen = m_Xdoc.CreateNode(XmlNodeType.Element, "ChargingGreen", null); xmlChargingGreen.InnerText = m_ChargingLeds[device][1].ToString(); Node.AppendChild(xmlChargingGreen);
|
||||
XmlNode xmlChargingBlue = m_Xdoc.CreateNode(XmlNodeType.Element, "ChargingBlue", null); xmlChargingBlue.InnerText = m_ChargingLeds[device][2].ToString(); Node.AppendChild(xmlChargingBlue);
|
||||
XmlNode xmlTouchpadJitterCompensation = m_Xdoc.CreateNode(XmlNodeType.Element, "touchpadJitterCompensation", null); xmlTouchpadJitterCompensation.InnerText = touchpadJitterCompensation[device].ToString(); Node.AppendChild(xmlTouchpadJitterCompensation);
|
||||
XmlNode xmlLowerRCOn = m_Xdoc.CreateNode(XmlNodeType.Element, "lowerRCOn", null); xmlLowerRCOn.InnerText = lowerRCOn[device].ToString(); Node.AppendChild(xmlLowerRCOn);
|
||||
XmlNode xmlTapSensitivity = m_Xdoc.CreateNode(XmlNodeType.Element, "tapSensitivity", null); xmlTapSensitivity.InnerText = tapSensitivity[device].ToString(); Node.AppendChild(xmlTapSensitivity);
|
||||
@ -610,7 +651,7 @@ namespace DS4Control
|
||||
XmlNode xmlRainbow = m_Xdoc.CreateNode(XmlNodeType.Element, "Rainbow", null); xmlRainbow.InnerText = rainbow[device].ToString(); Node.AppendChild(xmlRainbow);
|
||||
XmlNode xmlLSD = m_Xdoc.CreateNode(XmlNodeType.Element, "LSDeadZone", null); xmlLSD.InnerText = LSDeadzone[device].ToString(); Node.AppendChild(xmlLSD);
|
||||
XmlNode xmlRSD = m_Xdoc.CreateNode(XmlNodeType.Element, "RSDeadZone", null); xmlRSD.InnerText = RSDeadzone[device].ToString(); Node.AppendChild(xmlRSD);
|
||||
|
||||
XmlNode xmlChargingType = m_Xdoc.CreateNode(XmlNodeType.Element, "ChargingType", null); xmlChargingType.InnerText = chargingType[device].ToString(); Node.AppendChild(xmlChargingType);
|
||||
XmlNode NodeControl = m_Xdoc.CreateNode(XmlNodeType.Element, "Control", null);
|
||||
|
||||
XmlNode Key = m_Xdoc.CreateNode(XmlNodeType.Element, "Key", null);
|
||||
@ -820,6 +861,12 @@ namespace DS4Control
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/LowBlue"); Byte.TryParse(Item.InnerText, out m_LowLeds[device][2]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/ChargingRed"); Byte.TryParse(Item.InnerText, out m_ChargingLeds[device][0]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/ChargingGreen"); Byte.TryParse(Item.InnerText, out m_ChargingLeds[device][1]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/ChargingBlue"); Byte.TryParse(Item.InnerText, out m_ChargingLeds[device][2]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/touchpadJitterCompensation"); Boolean.TryParse(Item.InnerText, out touchpadJitterCompensation[device]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/lowerRCOn"); Boolean.TryParse(Item.InnerText, out lowerRCOn[device]); }
|
||||
@ -842,6 +889,8 @@ namespace DS4Control
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/RSDeadZone"); Byte.TryParse(Item.InnerText, out RSDeadzone[device]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/ChargingType"); Int32.TryParse(Item.InnerText, out chargingType[device]); }
|
||||
catch { missingSetting = true; }
|
||||
|
||||
DS4KeyType keyType;
|
||||
UInt16 wvk;
|
||||
@ -994,6 +1043,12 @@ namespace DS4Control
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/LowBlue"); Byte.TryParse(Item.InnerText, out m_LowLeds[device][2]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/ChargingRed"); Byte.TryParse(Item.InnerText, out m_ChargingLeds[device][0]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/ChargingGreen"); Byte.TryParse(Item.InnerText, out m_ChargingLeds[device][1]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/ChargingBlue"); Byte.TryParse(Item.InnerText, out m_ChargingLeds[device][2]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/touchpadJitterCompensation"); Boolean.TryParse(Item.InnerText, out touchpadJitterCompensation[device]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/lowerRCOn"); Boolean.TryParse(Item.InnerText, out lowerRCOn[device]); }
|
||||
@ -1016,6 +1071,8 @@ namespace DS4Control
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/RSDeadZone"); Byte.TryParse(Item.InnerText, out RSDeadzone[device]); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/ScpControl/ChargingType"); Int32.TryParse(Item.InnerText, out chargingType[device]); }
|
||||
catch { missingSetting = true; }
|
||||
|
||||
DS4KeyType keyType;
|
||||
UInt16 wvk;
|
||||
|
@ -225,6 +225,7 @@
|
||||
<None Include="Resources\none.png" />
|
||||
<None Include="Resources\export.png" />
|
||||
<None Include="Resources\imageres_import.png" />
|
||||
<None Include="Resources\saveprofile.png" />
|
||||
<Content Include="Resources\Scp_All.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
8
DS4Tool/Hotkeys.Designer.cs
generated
8
DS4Tool/Hotkeys.Designer.cs
generated
@ -156,12 +156,12 @@
|
||||
//
|
||||
this.linkJhebbel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.linkJhebbel.AutoSize = true;
|
||||
this.linkJhebbel.Location = new System.Drawing.Point(450, 361);
|
||||
this.linkJhebbel.Location = new System.Drawing.Point(429, 361);
|
||||
this.linkJhebbel.Name = "linkJhebbel";
|
||||
this.linkJhebbel.Size = new System.Drawing.Size(41, 13);
|
||||
this.linkJhebbel.Size = new System.Drawing.Size(87, 13);
|
||||
this.linkJhebbel.TabIndex = 18;
|
||||
this.linkJhebbel.TabStop = true;
|
||||
this.linkJhebbel.Text = "jhebbel";
|
||||
this.linkJhebbel.Text = "jhebbel (DSDCS)";
|
||||
this.linkJhebbel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkJhebbel_LinkClicked);
|
||||
//
|
||||
// linkUninstall
|
||||
@ -435,7 +435,7 @@
|
||||
this.label20.Name = "label20";
|
||||
this.label20.Size = new System.Drawing.Size(172, 13);
|
||||
this.label20.TabIndex = 14;
|
||||
this.label20.Text = "L1+R1+Touchpad Slide left or right";
|
||||
this.label20.Text = "2 finger touchpad swipe left or right";
|
||||
//
|
||||
// label24
|
||||
//
|
||||
|
248
DS4Tool/Options.Designer.cs
generated
248
DS4Tool/Options.Designer.cs
generated
@ -70,7 +70,6 @@
|
||||
this.lowColorChooserButton = new System.Windows.Forms.Button();
|
||||
this.numUDRainbow = new System.Windows.Forms.NumericUpDown();
|
||||
this.pBRainbow = new System.Windows.Forms.PictureBox();
|
||||
this.flashLed = new System.Windows.Forms.CheckBox();
|
||||
this.blueBar = new System.Windows.Forms.TrackBar();
|
||||
this.greenBar = new System.Windows.Forms.TrackBar();
|
||||
this.redBar = new System.Windows.Forms.TrackBar();
|
||||
@ -125,7 +124,6 @@
|
||||
this.lBProfileTip = new System.Windows.Forms.Label();
|
||||
this.tBProfile = new System.Windows.Forms.TextBox();
|
||||
this.btnSaveProfile = new System.Windows.Forms.Button();
|
||||
this.lBSeperator = new System.Windows.Forms.Label();
|
||||
this.lbRS = new System.Windows.Forms.Label();
|
||||
this.lbLS = new System.Windows.Forms.Label();
|
||||
this.numUDRS = new System.Windows.Forms.NumericUpDown();
|
||||
@ -137,12 +135,18 @@
|
||||
this.nUDSixaxis = new System.Windows.Forms.NumericUpDown();
|
||||
this.cBControllerInput = new System.Windows.Forms.CheckBox();
|
||||
this.gBLightbar = new System.Windows.Forms.GroupBox();
|
||||
this.btnChargingColor = new System.Windows.Forms.Button();
|
||||
this.rBColor = new System.Windows.Forms.RadioButton();
|
||||
this.rBFade = new System.Windows.Forms.RadioButton();
|
||||
this.rBNormal = new System.Windows.Forms.RadioButton();
|
||||
this.rBRainbow = new System.Windows.Forms.RadioButton();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.lBFlashAt = new System.Windows.Forms.Label();
|
||||
this.nUDflashLED = new System.Windows.Forms.NumericUpDown();
|
||||
this.gBRumble = new System.Windows.Forms.GroupBox();
|
||||
this.gBDeadzone = new System.Windows.Forms.GroupBox();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.nUDflashLED = new System.Windows.Forms.NumericUpDown();
|
||||
this.lBFlashAt = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.advColorDialog = new ScpServer.AdvancedColorDialog();
|
||||
this.MainPanel.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pBController)).BeginInit();
|
||||
@ -181,9 +185,9 @@
|
||||
this.gBOther.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSixaxis)).BeginInit();
|
||||
this.gBLightbar.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDflashLED)).BeginInit();
|
||||
this.gBRumble.SuspendLayout();
|
||||
this.gBDeadzone.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDflashLED)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// bnTouchUpper
|
||||
@ -295,7 +299,7 @@
|
||||
this.MainPanel.Controls.Add(this.bnOptions);
|
||||
this.MainPanel.Controls.Add(this.bnPS);
|
||||
this.MainPanel.Controls.Add(this.bnShare);
|
||||
this.MainPanel.Location = new System.Drawing.Point(7, 77);
|
||||
this.MainPanel.Location = new System.Drawing.Point(7, 44);
|
||||
this.MainPanel.Name = "MainPanel";
|
||||
this.MainPanel.Size = new System.Drawing.Size(249, 137);
|
||||
this.MainPanel.TabIndex = 185;
|
||||
@ -668,7 +672,7 @@
|
||||
this.SticksPanel.Controls.Add(this.bnRSLeft);
|
||||
this.SticksPanel.Controls.Add(this.bnLSDown);
|
||||
this.SticksPanel.Controls.Add(this.bnR3);
|
||||
this.SticksPanel.Location = new System.Drawing.Point(7, 77);
|
||||
this.SticksPanel.Location = new System.Drawing.Point(7, 44);
|
||||
this.SticksPanel.Name = "SticksPanel";
|
||||
this.SticksPanel.Size = new System.Drawing.Size(249, 142);
|
||||
this.SticksPanel.TabIndex = 187;
|
||||
@ -888,7 +892,7 @@
|
||||
// lBControlTip
|
||||
//
|
||||
this.lBControlTip.AutoSize = true;
|
||||
this.lBControlTip.Location = new System.Drawing.Point(25, 42);
|
||||
this.lBControlTip.Location = new System.Drawing.Point(25, 9);
|
||||
this.lBControlTip.Name = "lBControlTip";
|
||||
this.lBControlTip.Size = new System.Drawing.Size(219, 26);
|
||||
this.lBControlTip.TabIndex = 181;
|
||||
@ -929,7 +933,7 @@
|
||||
"Right Stick Down :",
|
||||
"Right Stick Left :",
|
||||
"Right Stick Right :"});
|
||||
this.lBControls.Location = new System.Drawing.Point(258, 42);
|
||||
this.lBControls.Location = new System.Drawing.Point(258, 9);
|
||||
this.lBControls.Name = "lBControls";
|
||||
this.lBControls.Size = new System.Drawing.Size(169, 173);
|
||||
this.lBControls.TabIndex = 180;
|
||||
@ -949,7 +953,7 @@
|
||||
//
|
||||
// numUDRainbow
|
||||
//
|
||||
this.numUDRainbow.Location = new System.Drawing.Point(180, 16);
|
||||
this.numUDRainbow.Location = new System.Drawing.Point(181, 16);
|
||||
this.numUDRainbow.Maximum = new decimal(new int[] {
|
||||
60,
|
||||
0,
|
||||
@ -963,7 +967,7 @@
|
||||
// pBRainbow
|
||||
//
|
||||
this.pBRainbow.Image = global::ScpServer.Properties.Resources.rainbow;
|
||||
this.pBRainbow.Location = new System.Drawing.Point(161, 18);
|
||||
this.pBRainbow.Location = new System.Drawing.Point(159, 18);
|
||||
this.pBRainbow.Name = "pBRainbow";
|
||||
this.pBRainbow.Size = new System.Drawing.Size(16, 16);
|
||||
this.pBRainbow.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
@ -971,19 +975,6 @@
|
||||
this.pBRainbow.TabStop = false;
|
||||
this.pBRainbow.Click += new System.EventHandler(this.pbRainbow_Click);
|
||||
//
|
||||
// flashLed
|
||||
//
|
||||
this.flashLed.AutoSize = true;
|
||||
this.flashLed.Location = new System.Drawing.Point(433, 103);
|
||||
this.flashLed.Name = "flashLed";
|
||||
this.flashLed.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.flashLed.Size = new System.Drawing.Size(103, 17);
|
||||
this.flashLed.TabIndex = 163;
|
||||
this.flashLed.Text = "Flash when Low";
|
||||
this.flashLed.UseVisualStyleBackColor = true;
|
||||
this.flashLed.Visible = false;
|
||||
this.flashLed.CheckedChanged += new System.EventHandler(this.flashWhenLowBattery_CheckedChanged);
|
||||
//
|
||||
// blueBar
|
||||
//
|
||||
this.blueBar.AutoSize = false;
|
||||
@ -1035,11 +1026,11 @@
|
||||
// batteryLed
|
||||
//
|
||||
this.batteryLed.AutoSize = true;
|
||||
this.batteryLed.Location = new System.Drawing.Point(320, 17);
|
||||
this.batteryLed.Location = new System.Drawing.Point(316, 17);
|
||||
this.batteryLed.Name = "batteryLed";
|
||||
this.batteryLed.Size = new System.Drawing.Size(115, 17);
|
||||
this.batteryLed.Size = new System.Drawing.Size(111, 17);
|
||||
this.batteryLed.TabIndex = 162;
|
||||
this.batteryLed.Text = "Battery Level Color";
|
||||
this.batteryLed.Text = "Color by Battery %";
|
||||
this.batteryLed.UseVisualStyleBackColor = true;
|
||||
this.batteryLed.CheckedChanged += new System.EventHandler(this.ledAsBatteryIndicator_CheckedChanged);
|
||||
//
|
||||
@ -1064,7 +1055,7 @@
|
||||
// lBspc
|
||||
//
|
||||
this.lBspc.AutoSize = true;
|
||||
this.lBspc.Location = new System.Drawing.Point(225, 18);
|
||||
this.lBspc.Location = new System.Drawing.Point(223, 19);
|
||||
this.lBspc.Name = "lBspc";
|
||||
this.lBspc.Size = new System.Drawing.Size(59, 13);
|
||||
this.lBspc.TabIndex = 157;
|
||||
@ -1306,7 +1297,7 @@
|
||||
this.tBsixaxisAccelZ.AutoSize = false;
|
||||
this.tBsixaxisAccelZ.BackColor = System.Drawing.Color.White;
|
||||
this.tBsixaxisAccelZ.Enabled = false;
|
||||
this.tBsixaxisAccelZ.Location = new System.Drawing.Point(394, 6);
|
||||
this.tBsixaxisAccelZ.Location = new System.Drawing.Point(382, 6);
|
||||
this.tBsixaxisAccelZ.Maximum = 32767;
|
||||
this.tBsixaxisAccelZ.Minimum = -32768;
|
||||
this.tBsixaxisAccelZ.Name = "tBsixaxisAccelZ";
|
||||
@ -1333,7 +1324,7 @@
|
||||
this.tBsixaxisAccelY.AutoSize = false;
|
||||
this.tBsixaxisAccelY.BackColor = System.Drawing.Color.White;
|
||||
this.tBsixaxisAccelY.Enabled = false;
|
||||
this.tBsixaxisAccelY.Location = new System.Drawing.Point(347, 6);
|
||||
this.tBsixaxisAccelY.Location = new System.Drawing.Point(335, 6);
|
||||
this.tBsixaxisAccelY.Maximum = 32767;
|
||||
this.tBsixaxisAccelY.Minimum = -32768;
|
||||
this.tBsixaxisAccelY.Name = "tBsixaxisAccelY";
|
||||
@ -1355,7 +1346,7 @@
|
||||
this.tBsixaxisAccelX.AutoSize = false;
|
||||
this.tBsixaxisAccelX.BackColor = System.Drawing.Color.White;
|
||||
this.tBsixaxisAccelX.Enabled = false;
|
||||
this.tBsixaxisAccelX.Location = new System.Drawing.Point(301, 6);
|
||||
this.tBsixaxisAccelX.Location = new System.Drawing.Point(289, 6);
|
||||
this.tBsixaxisAccelX.Maximum = 32767;
|
||||
this.tBsixaxisAccelX.Minimum = -32768;
|
||||
this.tBsixaxisAccelX.Name = "tBsixaxisAccelX";
|
||||
@ -1442,7 +1433,7 @@
|
||||
//
|
||||
this.lB6Accel.AutoSize = true;
|
||||
this.lB6Accel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lB6Accel.Location = new System.Drawing.Point(232, 6);
|
||||
this.lB6Accel.Location = new System.Drawing.Point(220, 6);
|
||||
this.lB6Accel.Name = "lB6Accel";
|
||||
this.lB6Accel.Size = new System.Drawing.Size(72, 13);
|
||||
this.lB6Accel.TabIndex = 215;
|
||||
@ -1628,53 +1619,45 @@
|
||||
this.SixaxisPanel.Controls.Add(this.tBsixaxisGyroZ);
|
||||
this.SixaxisPanel.Controls.Add(this.tBsixaxisAccelY);
|
||||
this.SixaxisPanel.Controls.Add(this.tBsixaxisAccelZ);
|
||||
this.SixaxisPanel.Location = new System.Drawing.Point(442, 6);
|
||||
this.SixaxisPanel.Location = new System.Drawing.Point(1, 193);
|
||||
this.SixaxisPanel.Name = "SixaxisPanel";
|
||||
this.SixaxisPanel.Size = new System.Drawing.Size(441, 29);
|
||||
this.SixaxisPanel.Size = new System.Drawing.Size(435, 27);
|
||||
this.SixaxisPanel.TabIndex = 236;
|
||||
//
|
||||
// lBProfileTip
|
||||
//
|
||||
this.lBProfileTip.AutoSize = true;
|
||||
this.lBProfileTip.Location = new System.Drawing.Point(5, 12);
|
||||
this.lBProfileTip.Location = new System.Drawing.Point(13, 302);
|
||||
this.lBProfileTip.Name = "lBProfileTip";
|
||||
this.lBProfileTip.Size = new System.Drawing.Size(70, 13);
|
||||
this.lBProfileTip.TabIndex = 239;
|
||||
this.lBProfileTip.Text = "Profile Name:";
|
||||
this.lBProfileTip.Visible = false;
|
||||
//
|
||||
// tBProfile
|
||||
//
|
||||
this.tBProfile.ForeColor = System.Drawing.SystemColors.GrayText;
|
||||
this.tBProfile.Location = new System.Drawing.Point(77, 9);
|
||||
this.tBProfile.Location = new System.Drawing.Point(85, 299);
|
||||
this.tBProfile.Name = "tBProfile";
|
||||
this.tBProfile.Size = new System.Drawing.Size(185, 20);
|
||||
this.tBProfile.TabIndex = 238;
|
||||
this.tBProfile.Text = "<type profile name here>";
|
||||
this.tBProfile.Visible = false;
|
||||
this.tBProfile.TextChanged += new System.EventHandler(this.tBProfile_TextChanged);
|
||||
this.tBProfile.Enter += new System.EventHandler(this.tBProfile_Enter);
|
||||
this.tBProfile.Leave += new System.EventHandler(this.tBProfile_Leave);
|
||||
//
|
||||
// btnSaveProfile
|
||||
//
|
||||
this.btnSaveProfile.Location = new System.Drawing.Point(268, 7);
|
||||
this.btnSaveProfile.Location = new System.Drawing.Point(276, 297);
|
||||
this.btnSaveProfile.Name = "btnSaveProfile";
|
||||
this.btnSaveProfile.Size = new System.Drawing.Size(78, 23);
|
||||
this.btnSaveProfile.TabIndex = 237;
|
||||
this.btnSaveProfile.Text = "Save Profile";
|
||||
this.btnSaveProfile.UseVisualStyleBackColor = true;
|
||||
this.btnSaveProfile.Visible = false;
|
||||
this.btnSaveProfile.Click += new System.EventHandler(this.saveButton_Click);
|
||||
//
|
||||
// lBSeperator
|
||||
//
|
||||
this.lBSeperator.AutoSize = true;
|
||||
this.lBSeperator.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lBSeperator.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(221)))), ((int)(((byte)(221)))), ((int)(((byte)(221)))));
|
||||
this.lBSeperator.Location = new System.Drawing.Point(3, 23);
|
||||
this.lBSeperator.Name = "lBSeperator";
|
||||
this.lBSeperator.Size = new System.Drawing.Size(433, 13);
|
||||
this.lBSeperator.TabIndex = 240;
|
||||
this.lBSeperator.Text = "_______________________________________________________________________";
|
||||
//
|
||||
// lbRS
|
||||
//
|
||||
this.lbRS.AutoSize = true;
|
||||
@ -1782,7 +1765,7 @@
|
||||
this.gBTouchpad.Controls.Add(this.numUDScroll);
|
||||
this.gBTouchpad.Controls.Add(this.numUDTap);
|
||||
this.gBTouchpad.Controls.Add(this.cBScroll);
|
||||
this.gBTouchpad.Location = new System.Drawing.Point(442, 221);
|
||||
this.gBTouchpad.Location = new System.Drawing.Point(440, 220);
|
||||
this.gBTouchpad.Name = "gBTouchpad";
|
||||
this.gBTouchpad.Size = new System.Drawing.Size(438, 70);
|
||||
this.gBTouchpad.TabIndex = 246;
|
||||
@ -1799,7 +1782,7 @@
|
||||
this.gBOther.Controls.Add(this.flushHIDQueue);
|
||||
this.gBOther.Controls.Add(this.lBIdleMinutes);
|
||||
this.gBOther.Controls.Add(this.lBControllerOff);
|
||||
this.gBOther.Location = new System.Drawing.Point(6, 221);
|
||||
this.gBOther.Location = new System.Drawing.Point(7, 220);
|
||||
this.gBOther.Name = "gBOther";
|
||||
this.gBOther.Size = new System.Drawing.Size(421, 70);
|
||||
this.gBOther.TabIndex = 247;
|
||||
@ -1843,6 +1826,12 @@
|
||||
//
|
||||
// gBLightbar
|
||||
//
|
||||
this.gBLightbar.Controls.Add(this.btnChargingColor);
|
||||
this.gBLightbar.Controls.Add(this.rBColor);
|
||||
this.gBLightbar.Controls.Add(this.rBFade);
|
||||
this.gBLightbar.Controls.Add(this.rBNormal);
|
||||
this.gBLightbar.Controls.Add(this.rBRainbow);
|
||||
this.gBLightbar.Controls.Add(this.label2);
|
||||
this.gBLightbar.Controls.Add(this.label1);
|
||||
this.gBLightbar.Controls.Add(this.lBFlashAt);
|
||||
this.gBLightbar.Controls.Add(this.pBRainbow);
|
||||
@ -1852,13 +1841,112 @@
|
||||
this.gBLightbar.Controls.Add(this.FullPanel);
|
||||
this.gBLightbar.Controls.Add(this.lBspc);
|
||||
this.gBLightbar.Controls.Add(this.batteryLed);
|
||||
this.gBLightbar.Location = new System.Drawing.Point(442, 113);
|
||||
this.gBLightbar.Location = new System.Drawing.Point(440, 76);
|
||||
this.gBLightbar.Name = "gBLightbar";
|
||||
this.gBLightbar.Size = new System.Drawing.Size(438, 102);
|
||||
this.gBLightbar.Size = new System.Drawing.Size(438, 129);
|
||||
this.gBLightbar.TabIndex = 247;
|
||||
this.gBLightbar.TabStop = false;
|
||||
this.gBLightbar.Text = "Lightbar";
|
||||
//
|
||||
// btnChargingColor
|
||||
//
|
||||
this.btnChargingColor.BackColor = System.Drawing.Color.White;
|
||||
this.btnChargingColor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnChargingColor.Location = new System.Drawing.Point(391, 108);
|
||||
this.btnChargingColor.Name = "btnChargingColor";
|
||||
this.btnChargingColor.Size = new System.Drawing.Size(13, 13);
|
||||
this.btnChargingColor.TabIndex = 49;
|
||||
this.btnChargingColor.UseVisualStyleBackColor = false;
|
||||
this.btnChargingColor.Visible = false;
|
||||
this.btnChargingColor.Click += new System.EventHandler(this.btnChargingColor_Click);
|
||||
//
|
||||
// rBColor
|
||||
//
|
||||
this.rBColor.AutoSize = true;
|
||||
this.rBColor.Location = new System.Drawing.Point(336, 106);
|
||||
this.rBColor.Name = "rBColor";
|
||||
this.rBColor.Size = new System.Drawing.Size(49, 17);
|
||||
this.rBColor.TabIndex = 238;
|
||||
this.rBColor.TabStop = true;
|
||||
this.rBColor.Text = "Color";
|
||||
this.rBColor.UseVisualStyleBackColor = true;
|
||||
this.rBColor.CheckedChanged += new System.EventHandler(this.rBColor_CheckedChanged);
|
||||
//
|
||||
// rBFade
|
||||
//
|
||||
this.rBFade.AutoSize = true;
|
||||
this.rBFade.Location = new System.Drawing.Point(158, 106);
|
||||
this.rBFade.Name = "rBFade";
|
||||
this.rBFade.Size = new System.Drawing.Size(99, 17);
|
||||
this.rBFade.TabIndex = 237;
|
||||
this.rBFade.Text = "Fade in and out";
|
||||
this.rBFade.UseVisualStyleBackColor = true;
|
||||
this.rBFade.CheckedChanged += new System.EventHandler(this.rBFade_CheckedChanged);
|
||||
//
|
||||
// rBNormal
|
||||
//
|
||||
this.rBNormal.AutoSize = true;
|
||||
this.rBNormal.Checked = true;
|
||||
this.rBNormal.Location = new System.Drawing.Point(97, 106);
|
||||
this.rBNormal.Name = "rBNormal";
|
||||
this.rBNormal.Size = new System.Drawing.Size(58, 17);
|
||||
this.rBNormal.TabIndex = 237;
|
||||
this.rBNormal.TabStop = true;
|
||||
this.rBNormal.Text = "Normal";
|
||||
this.rBNormal.UseVisualStyleBackColor = true;
|
||||
this.rBNormal.CheckedChanged += new System.EventHandler(this.rBNormal_CheckedChanged);
|
||||
//
|
||||
// rBRainbow
|
||||
//
|
||||
this.rBRainbow.AutoSize = true;
|
||||
this.rBRainbow.Location = new System.Drawing.Point(263, 106);
|
||||
this.rBRainbow.Name = "rBRainbow";
|
||||
this.rBRainbow.Size = new System.Drawing.Size(67, 17);
|
||||
this.rBRainbow.TabIndex = 237;
|
||||
this.rBRainbow.Text = "Rainbow";
|
||||
this.rBRainbow.UseVisualStyleBackColor = true;
|
||||
this.rBRainbow.CheckedChanged += new System.EventHandler(this.rBRainbow_CheckedChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(9, 108);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(82, 13);
|
||||
this.label2.TabIndex = 236;
|
||||
this.label2.Text = "While Charging:";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(98, 18);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(15, 13);
|
||||
this.label1.TabIndex = 207;
|
||||
this.label1.Text = "%";
|
||||
//
|
||||
// lBFlashAt
|
||||
//
|
||||
this.lBFlashAt.AutoSize = true;
|
||||
this.lBFlashAt.Location = new System.Drawing.Point(9, 18);
|
||||
this.lBFlashAt.Name = "lBFlashAt";
|
||||
this.lBFlashAt.Size = new System.Drawing.Size(44, 13);
|
||||
this.lBFlashAt.TabIndex = 207;
|
||||
this.lBFlashAt.Text = "Flash at";
|
||||
//
|
||||
// nUDflashLED
|
||||
//
|
||||
this.nUDflashLED.Increment = new decimal(new int[] {
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nUDflashLED.Location = new System.Drawing.Point(54, 16);
|
||||
this.nUDflashLED.Name = "nUDflashLED";
|
||||
this.nUDflashLED.Size = new System.Drawing.Size(43, 20);
|
||||
this.nUDflashLED.TabIndex = 167;
|
||||
this.nUDflashLED.ValueChanged += new System.EventHandler(this.nUDflashLED_ValueChanged);
|
||||
//
|
||||
// gBRumble
|
||||
//
|
||||
this.gBRumble.Controls.Add(this.rumbleBoostLabel);
|
||||
@ -1868,7 +1956,7 @@
|
||||
this.gBRumble.Controls.Add(this.numUDLightRumble);
|
||||
this.gBRumble.Controls.Add(this.rightMotorLabel);
|
||||
this.gBRumble.Controls.Add(this.rumbleBoostBar);
|
||||
this.gBRumble.Location = new System.Drawing.Point(444, 40);
|
||||
this.gBRumble.Location = new System.Drawing.Point(442, 3);
|
||||
this.gBRumble.Name = "gBRumble";
|
||||
this.gBRumble.Size = new System.Drawing.Size(213, 67);
|
||||
this.gBRumble.TabIndex = 247;
|
||||
@ -1885,7 +1973,7 @@
|
||||
this.gBDeadzone.Controls.Add(this.numUDRS);
|
||||
this.gBDeadzone.Controls.Add(this.numUDR2);
|
||||
this.gBDeadzone.Controls.Add(this.numUDLS);
|
||||
this.gBDeadzone.Location = new System.Drawing.Point(686, 40);
|
||||
this.gBDeadzone.Location = new System.Drawing.Point(684, 3);
|
||||
this.gBDeadzone.Name = "gBDeadzone";
|
||||
this.gBDeadzone.Size = new System.Drawing.Size(194, 67);
|
||||
this.gBDeadzone.TabIndex = 248;
|
||||
@ -1895,45 +1983,15 @@
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(352, 7);
|
||||
this.btnCancel.Location = new System.Drawing.Point(360, 297);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnCancel.TabIndex = 249;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Visible = false;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// nUDflashLED
|
||||
//
|
||||
this.nUDflashLED.Increment = new decimal(new int[] {
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nUDflashLED.Location = new System.Drawing.Point(60, 16);
|
||||
this.nUDflashLED.Name = "nUDflashLED";
|
||||
this.nUDflashLED.Size = new System.Drawing.Size(43, 20);
|
||||
this.nUDflashLED.TabIndex = 167;
|
||||
this.nUDflashLED.ValueChanged += new System.EventHandler(this.nUDflashLED_ValueChanged);
|
||||
//
|
||||
// lBFlashAt
|
||||
//
|
||||
this.lBFlashAt.AutoSize = true;
|
||||
this.lBFlashAt.Location = new System.Drawing.Point(15, 18);
|
||||
this.lBFlashAt.Name = "lBFlashAt";
|
||||
this.lBFlashAt.Size = new System.Drawing.Size(44, 13);
|
||||
this.lBFlashAt.TabIndex = 207;
|
||||
this.lBFlashAt.Text = "Flash at";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(104, 18);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(15, 13);
|
||||
this.label1.TabIndex = 207;
|
||||
this.label1.Text = "%";
|
||||
//
|
||||
// advColorDialog
|
||||
//
|
||||
this.advColorDialog.AnyColor = true;
|
||||
@ -1946,13 +2004,11 @@
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(888, 297);
|
||||
this.ClientSize = new System.Drawing.Size(888, 295);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.flashLed);
|
||||
this.Controls.Add(this.gBDeadzone);
|
||||
this.Controls.Add(this.gBRumble);
|
||||
this.Controls.Add(this.gBLightbar);
|
||||
this.Controls.Add(this.gBOther);
|
||||
this.Controls.Add(this.gBTouchpad);
|
||||
this.Controls.Add(this.SixaxisPanel);
|
||||
this.Controls.Add(this.lBProfileTip);
|
||||
@ -1962,7 +2018,7 @@
|
||||
this.Controls.Add(this.lBControls);
|
||||
this.Controls.Add(this.MainPanel);
|
||||
this.Controls.Add(this.SticksPanel);
|
||||
this.Controls.Add(this.lBSeperator);
|
||||
this.Controls.Add(this.gBOther);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
@ -2015,11 +2071,11 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSixaxis)).EndInit();
|
||||
this.gBLightbar.ResumeLayout(false);
|
||||
this.gBLightbar.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDflashLED)).EndInit();
|
||||
this.gBRumble.ResumeLayout(false);
|
||||
this.gBRumble.PerformLayout();
|
||||
this.gBDeadzone.ResumeLayout(false);
|
||||
this.gBDeadzone.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDflashLED)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -2071,7 +2127,6 @@
|
||||
private System.Windows.Forms.NumericUpDown numUDRainbow;
|
||||
private System.Windows.Forms.PictureBox pBRainbow;
|
||||
private System.Windows.Forms.Button lowColorChooserButton;
|
||||
private System.Windows.Forms.CheckBox flashLed;
|
||||
private System.Windows.Forms.TrackBar blueBar;
|
||||
private System.Windows.Forms.TrackBar greenBar;
|
||||
private System.Windows.Forms.TrackBar redBar;
|
||||
@ -2126,7 +2181,6 @@
|
||||
private System.Windows.Forms.Label lBProfileTip;
|
||||
private System.Windows.Forms.TextBox tBProfile;
|
||||
private System.Windows.Forms.Button btnSaveProfile;
|
||||
private System.Windows.Forms.Label lBSeperator;
|
||||
private System.Windows.Forms.Label lBControlTip;
|
||||
private System.Windows.Forms.Label lbRS;
|
||||
private System.Windows.Forms.Label lbLS;
|
||||
@ -2145,6 +2199,12 @@
|
||||
private System.Windows.Forms.NumericUpDown nUDflashLED;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label lBFlashAt;
|
||||
private System.Windows.Forms.RadioButton rBFade;
|
||||
private System.Windows.Forms.RadioButton rBNormal;
|
||||
private System.Windows.Forms.RadioButton rBRainbow;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button btnChargingColor;
|
||||
private System.Windows.Forms.RadioButton rBColor;
|
||||
}
|
||||
}
|
||||
|
@ -12,10 +12,10 @@ namespace ScpServer
|
||||
{
|
||||
private DS4Control.Control scpDevice;
|
||||
public int device;
|
||||
private string filename;
|
||||
Byte[] oldLedColor, oldLowLedColor;
|
||||
public string filename;
|
||||
Byte[] oldLedColor, oldLowLedColor, oldChargingColor;
|
||||
Timer inputtimer = new Timer(), sixaxisTimer = new Timer();
|
||||
private List<Button> buttons = new List<Button>();
|
||||
public List<Button> buttons = new List<Button>();
|
||||
private Button lastSelected;
|
||||
private int alphacolor;
|
||||
private Color reg, full;
|
||||
@ -54,8 +54,9 @@ namespace ScpServer
|
||||
lowGreenBar.Value = lowColor.green;
|
||||
lowBlueBar.Value = lowColor.blue;
|
||||
|
||||
DS4Color cColor = Global.loadChargingColor(device);
|
||||
btnChargingColor.BackColor = Color.FromArgb(cColor.red, cColor.green, cColor.blue);
|
||||
rumbleBoostBar.Value = Global.loadRumbleBoost(device);
|
||||
flashLed.Checked = Global.getFlashWhenLowBattery(device);
|
||||
numUDTouch.Value = Global.getTouchSensitivity(device);
|
||||
cBSlide.Checked = Global.getTouchSensitivity(device) > 0;
|
||||
numUDScroll.Value = Global.getScrollSensitivity(device);
|
||||
@ -81,6 +82,13 @@ namespace ScpServer
|
||||
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
||||
lowColorChooserButton.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
||||
numUDRainbow.Value = (decimal)Global.getRainbow(device);
|
||||
switch (Global.getChargingType(deviceNum))
|
||||
{
|
||||
case 1: rBFade.Checked = true; break;
|
||||
case 2: rBRainbow.Checked = true; break;
|
||||
case 3: rBColor.Checked = true; break;
|
||||
default: rBNormal.Checked = true; break;
|
||||
}
|
||||
if (Global.getRainbow(device) == 0)
|
||||
{
|
||||
pBRainbow.Image = greyscale;
|
||||
@ -225,7 +233,7 @@ namespace ScpServer
|
||||
trackBar.Value = value;
|
||||
}
|
||||
|
||||
private void Set()
|
||||
public void Set()
|
||||
{
|
||||
lowBatteryPanel.Visible = batteryLed.Checked;
|
||||
lbFull.Text = (batteryLed.Checked ? "Full:" : "Color:");
|
||||
@ -235,7 +243,6 @@ namespace ScpServer
|
||||
Global.setLeftTriggerMiddle(device, (byte)Math.Round((numUDL2.Value * 255), 0));
|
||||
Global.setRightTriggerMiddle(device, (byte)Math.Round((numUDR2.Value * 255), 0));
|
||||
Global.saveRumbleBoost(device, (byte)rumbleBoostBar.Value);
|
||||
Global.setFlashWhenLowBattery(device, flashLed.Checked);
|
||||
Global.setTouchSensitivity(device, (byte)numUDTouch.Value);
|
||||
Global.setTouchpadJitterCompensation(device, touchpadJitterCompensation.Checked);
|
||||
Global.setLowerRCOn(device, cBlowerRCOn.Checked);
|
||||
@ -328,7 +335,9 @@ namespace ScpServer
|
||||
blueBar.Value = advColorDialog.Color.B;
|
||||
}
|
||||
else Global.saveColor(device, oldLedColor[0], oldLedColor[1], oldLedColor[2]);
|
||||
//Global.saveLowColor(device, oldLowLedColor[0], oldLowLedColor[1], oldLowLedColor[2]);
|
||||
Global.saveChargingColor(device, oldChargingColor[0], oldChargingColor[1], oldChargingColor[2]);
|
||||
Global.saveLowColor(device, oldLowLedColor[0], oldLowLedColor[1], oldLowLedColor[2]);
|
||||
oldChargingColor = null;
|
||||
oldLedColor = null;
|
||||
oldLowLedColor = null;
|
||||
}
|
||||
@ -344,24 +353,46 @@ namespace ScpServer
|
||||
lowBlueBar.Value = advColorDialog.Color.B;
|
||||
}
|
||||
else Global.saveLowColor(device, oldLowLedColor[0], oldLowLedColor[1], oldLowLedColor[2]);
|
||||
Global.saveChargingColor(device, oldChargingColor[0], oldChargingColor[1], oldChargingColor[2]);
|
||||
Global.saveColor(device, oldLedColor[0], oldLedColor[1], oldLedColor[2]);
|
||||
oldChargingColor = null;
|
||||
oldLedColor = null;
|
||||
oldLowLedColor = null;
|
||||
}
|
||||
|
||||
|
||||
private void btnChargingColor_Click(object sender, EventArgs e)
|
||||
{
|
||||
advColorDialog.Color = btnChargingColor.BackColor;
|
||||
advColorDialog_OnUpdateColor(btnChargingColor.BackColor, e);
|
||||
if (advColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
btnChargingColor.BackColor = advColorDialog.Color;
|
||||
}
|
||||
else Global.saveChargingColor(device, oldChargingColor[0], oldChargingColor[1], oldChargingColor[2]);
|
||||
Global.saveLowColor(device, oldLowLedColor[0], oldLowLedColor[1], oldLowLedColor[2]);
|
||||
Global.saveColor(device, oldLedColor[0], oldLedColor[1], oldLedColor[2]);
|
||||
oldChargingColor = null;
|
||||
oldLedColor = null;
|
||||
oldLowLedColor = null;
|
||||
}
|
||||
private void advColorDialog_OnUpdateColor(object sender, EventArgs e)
|
||||
{
|
||||
if (oldLedColor == null || oldLowLedColor == null)
|
||||
if (oldLedColor == null || oldLowLedColor == null || oldChargingColor == null)
|
||||
{
|
||||
DS4Color color = Global.loadColor(device);
|
||||
oldLedColor = new Byte[] { color.red, color.green, color.blue };
|
||||
color = Global.loadLowColor(device);
|
||||
oldLowLedColor = new Byte[] { color.red, color.green, color.blue };
|
||||
color = Global.loadChargingColor(device);
|
||||
oldChargingColor = new Byte[] { color.red, color.green, color.blue };
|
||||
}
|
||||
if (sender is Color)
|
||||
{
|
||||
Color color = (Color)sender;
|
||||
Global.saveColor(device, color.R, color.G, color.B);
|
||||
Global.saveLowColor(device, color.R, color.G, color.B);
|
||||
Global.saveChargingColor(device, color.R, color.G, color.B);
|
||||
}
|
||||
}
|
||||
int bgc = 255; //Color of the form background, If greyscale color
|
||||
@ -518,10 +549,6 @@ namespace ScpServer
|
||||
lbFull.Text = (batteryLed.Checked ? "Full:" : "Color:");
|
||||
}
|
||||
|
||||
private void flashWhenLowBattery_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Global.setFlashWhenLowBattery(device, flashLed.Checked);
|
||||
}
|
||||
private void lowerRCOffCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Global.setLowerRCOn(device, cBlowerRCOn.Checked);
|
||||
@ -724,14 +751,14 @@ namespace ScpServer
|
||||
{
|
||||
//pBRainbow.Location = new Point(216 - 78, pBRainbow.Location.Y);
|
||||
pBController.BackgroundImage = Properties.Resources.rainbowC;
|
||||
batteryLed.Text = "Battery Level Dim";
|
||||
batteryLed.Text = "Dim by Battery %";
|
||||
}
|
||||
else
|
||||
{
|
||||
lowBatteryPanel.Enabled = batteryLed.Checked;
|
||||
//pBRainbow.Location = new Point(216, pBRainbow.Location.Y);
|
||||
pBController.BackgroundImage = null;
|
||||
batteryLed.Text = "Battery Level Color";
|
||||
batteryLed.Text = "Color by Battery %";
|
||||
}
|
||||
lBspc.Enabled = on;
|
||||
lowBatteryPanel.Enabled = !on;
|
||||
@ -835,5 +862,31 @@ namespace ScpServer
|
||||
nUDflashLED.Value = Math.Round(nUDflashLED.Value / 10, 0) * 10;
|
||||
Global.setFlashAt(device, (int)nUDflashLED.Value);
|
||||
}
|
||||
|
||||
private void rBNormal_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Global.setChargingType(device, 0);
|
||||
btnChargingColor.Visible = false;
|
||||
}
|
||||
|
||||
private void rBFade_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Global.setChargingType(device, 1);
|
||||
btnChargingColor.Visible = false;
|
||||
}
|
||||
|
||||
private void rBRainbow_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Global.setChargingType(device, 2);
|
||||
btnChargingColor.Visible = false;
|
||||
}
|
||||
|
||||
private void rBColor_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Global.setChargingType(device, 3);
|
||||
btnChargingColor.Visible = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -181,4 +181,7 @@
|
||||
<data name="import" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\imageres_import.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="saveprofile" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\saveprofile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
10
DS4Tool/Properties/Resources1.Designer.cs
generated
10
DS4Tool/Properties/Resources1.Designer.cs
generated
@ -240,6 +240,16 @@ namespace ScpServer.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap saveprofile {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("saveprofile", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
BIN
DS4Tool/Resources/saveprofile.png
Normal file
BIN
DS4Tool/Resources/saveprofile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
106
DS4Tool/ScpForm.Designer.cs
generated
106
DS4Tool/ScpForm.Designer.cs
generated
@ -83,6 +83,11 @@
|
||||
this.pBStatus3 = new System.Windows.Forms.PictureBox();
|
||||
this.pBStatus4 = new System.Windows.Forms.PictureBox();
|
||||
this.tabProfiles = new System.Windows.Forms.TabPage();
|
||||
this.tSOptions = new System.Windows.Forms.ToolStrip();
|
||||
this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
|
||||
this.tSTBProfile = new System.Windows.Forms.ToolStripTextBox();
|
||||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||||
this.tSBCancel = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.tsBNewProfle = new System.Windows.Forms.ToolStripButton();
|
||||
this.tsBEditProfile = new System.Windows.Forms.ToolStripButton();
|
||||
@ -115,6 +120,7 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.pBStatus3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pBStatus4)).BeginInit();
|
||||
this.tabProfiles.SuspendLayout();
|
||||
this.tSOptions.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.cMProfile.SuspendLayout();
|
||||
this.tabLog.SuspendLayout();
|
||||
@ -390,7 +396,7 @@
|
||||
this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 23.34039F));
|
||||
this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.31077F));
|
||||
this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 117F));
|
||||
this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 48F));
|
||||
this.tLPControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 45F));
|
||||
this.tLPControllers.Controls.Add(this.pBStatus1, 1, 1);
|
||||
this.tLPControllers.Controls.Add(this.lbPad1, 0, 1);
|
||||
this.tLPControllers.Controls.Add(this.lbPad2, 0, 2);
|
||||
@ -432,7 +438,7 @@
|
||||
this.pBStatus1.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pBStatus1.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus1.Image")));
|
||||
this.pBStatus1.InitialImage = global::ScpServer.Properties.Resources.BT;
|
||||
this.pBStatus1.Location = new System.Drawing.Point(370, 19);
|
||||
this.pBStatus1.Location = new System.Drawing.Point(373, 19);
|
||||
this.pBStatus1.Name = "pBStatus1";
|
||||
this.pBStatus1.Size = new System.Drawing.Size(39, 20);
|
||||
this.pBStatus1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
@ -464,7 +470,7 @@
|
||||
// bnEditC3
|
||||
//
|
||||
this.bnEditC3.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.bnEditC3.Location = new System.Drawing.Point(739, 76);
|
||||
this.bnEditC3.Location = new System.Drawing.Point(742, 76);
|
||||
this.bnEditC3.Name = "bnEditC3";
|
||||
this.bnEditC3.Size = new System.Drawing.Size(40, 23);
|
||||
this.bnEditC3.TabIndex = 43;
|
||||
@ -476,7 +482,7 @@
|
||||
// bnEditC4
|
||||
//
|
||||
this.bnEditC4.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.bnEditC4.Location = new System.Drawing.Point(739, 105);
|
||||
this.bnEditC4.Location = new System.Drawing.Point(742, 105);
|
||||
this.bnEditC4.Name = "bnEditC4";
|
||||
this.bnEditC4.Size = new System.Drawing.Size(40, 23);
|
||||
this.bnEditC4.TabIndex = 43;
|
||||
@ -511,7 +517,7 @@
|
||||
//
|
||||
this.cBController1.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.cBController1.FormattingEnabled = true;
|
||||
this.cBController1.Location = new System.Drawing.Point(622, 19);
|
||||
this.cBController1.Location = new System.Drawing.Point(625, 19);
|
||||
this.cBController1.Name = "cBController1";
|
||||
this.cBController1.Size = new System.Drawing.Size(111, 21);
|
||||
this.cBController1.TabIndex = 42;
|
||||
@ -521,7 +527,7 @@
|
||||
// bnEditC2
|
||||
//
|
||||
this.bnEditC2.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.bnEditC2.Location = new System.Drawing.Point(739, 47);
|
||||
this.bnEditC2.Location = new System.Drawing.Point(742, 47);
|
||||
this.bnEditC2.Name = "bnEditC2";
|
||||
this.bnEditC2.Size = new System.Drawing.Size(40, 23);
|
||||
this.bnEditC2.TabIndex = 43;
|
||||
@ -534,7 +540,7 @@
|
||||
//
|
||||
this.cBController2.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.cBController2.FormattingEnabled = true;
|
||||
this.cBController2.Location = new System.Drawing.Point(622, 48);
|
||||
this.cBController2.Location = new System.Drawing.Point(625, 48);
|
||||
this.cBController2.Name = "cBController2";
|
||||
this.cBController2.Size = new System.Drawing.Size(111, 21);
|
||||
this.cBController2.TabIndex = 42;
|
||||
@ -545,7 +551,7 @@
|
||||
//
|
||||
this.cBController3.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.cBController3.FormattingEnabled = true;
|
||||
this.cBController3.Location = new System.Drawing.Point(622, 77);
|
||||
this.cBController3.Location = new System.Drawing.Point(625, 77);
|
||||
this.cBController3.Name = "cBController3";
|
||||
this.cBController3.Size = new System.Drawing.Size(111, 21);
|
||||
this.cBController3.TabIndex = 42;
|
||||
@ -555,7 +561,7 @@
|
||||
// bnEditC1
|
||||
//
|
||||
this.bnEditC1.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.bnEditC1.Location = new System.Drawing.Point(739, 18);
|
||||
this.bnEditC1.Location = new System.Drawing.Point(742, 18);
|
||||
this.bnEditC1.Name = "bnEditC1";
|
||||
this.bnEditC1.Size = new System.Drawing.Size(40, 23);
|
||||
this.bnEditC1.TabIndex = 43;
|
||||
@ -568,7 +574,7 @@
|
||||
//
|
||||
this.cBController4.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.cBController4.FormattingEnabled = true;
|
||||
this.cBController4.Location = new System.Drawing.Point(622, 106);
|
||||
this.cBController4.Location = new System.Drawing.Point(625, 106);
|
||||
this.cBController4.Name = "cBController4";
|
||||
this.cBController4.Size = new System.Drawing.Size(111, 21);
|
||||
this.cBController4.TabIndex = 42;
|
||||
@ -580,7 +586,7 @@
|
||||
this.label2.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point(623, 0);
|
||||
this.label2.Location = new System.Drawing.Point(626, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(109, 15);
|
||||
this.label2.TabIndex = 45;
|
||||
@ -602,7 +608,7 @@
|
||||
this.label4.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label4.Location = new System.Drawing.Point(366, 0);
|
||||
this.label4.Location = new System.Drawing.Point(369, 0);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(47, 15);
|
||||
this.label4.TabIndex = 45;
|
||||
@ -613,7 +619,7 @@
|
||||
this.label5.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label5.Location = new System.Drawing.Point(515, 0);
|
||||
this.label5.Location = new System.Drawing.Point(518, 0);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(51, 15);
|
||||
this.label5.TabIndex = 45;
|
||||
@ -624,7 +630,7 @@
|
||||
this.lBBatt1.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.lBBatt1.AutoSize = true;
|
||||
this.lBBatt1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lBBatt1.Location = new System.Drawing.Point(521, 22);
|
||||
this.lBBatt1.Location = new System.Drawing.Point(524, 22);
|
||||
this.lBBatt1.Name = "lBBatt1";
|
||||
this.lBBatt1.Size = new System.Drawing.Size(39, 15);
|
||||
this.lBBatt1.TabIndex = 44;
|
||||
@ -635,7 +641,7 @@
|
||||
this.lBBatt2.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.lBBatt2.AutoSize = true;
|
||||
this.lBBatt2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lBBatt2.Location = new System.Drawing.Point(521, 51);
|
||||
this.lBBatt2.Location = new System.Drawing.Point(524, 51);
|
||||
this.lBBatt2.Name = "lBBatt2";
|
||||
this.lBBatt2.Size = new System.Drawing.Size(39, 15);
|
||||
this.lBBatt2.TabIndex = 44;
|
||||
@ -646,7 +652,7 @@
|
||||
this.lBBatt3.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.lBBatt3.AutoSize = true;
|
||||
this.lBBatt3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lBBatt3.Location = new System.Drawing.Point(521, 80);
|
||||
this.lBBatt3.Location = new System.Drawing.Point(524, 80);
|
||||
this.lBBatt3.Name = "lBBatt3";
|
||||
this.lBBatt3.Size = new System.Drawing.Size(39, 15);
|
||||
this.lBBatt3.TabIndex = 44;
|
||||
@ -657,7 +663,7 @@
|
||||
this.lBBatt4.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.lBBatt4.AutoSize = true;
|
||||
this.lBBatt4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lBBatt4.Location = new System.Drawing.Point(521, 109);
|
||||
this.lBBatt4.Location = new System.Drawing.Point(524, 109);
|
||||
this.lBBatt4.Name = "lBBatt4";
|
||||
this.lBBatt4.Size = new System.Drawing.Size(39, 15);
|
||||
this.lBBatt4.TabIndex = 44;
|
||||
@ -668,7 +674,7 @@
|
||||
this.pBStatus2.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pBStatus2.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus2.Image")));
|
||||
this.pBStatus2.InitialImage = global::ScpServer.Properties.Resources.BT;
|
||||
this.pBStatus2.Location = new System.Drawing.Point(370, 48);
|
||||
this.pBStatus2.Location = new System.Drawing.Point(373, 48);
|
||||
this.pBStatus2.Name = "pBStatus2";
|
||||
this.pBStatus2.Size = new System.Drawing.Size(39, 20);
|
||||
this.pBStatus2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
@ -680,7 +686,7 @@
|
||||
this.pBStatus3.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pBStatus3.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus3.Image")));
|
||||
this.pBStatus3.InitialImage = global::ScpServer.Properties.Resources.BT;
|
||||
this.pBStatus3.Location = new System.Drawing.Point(370, 77);
|
||||
this.pBStatus3.Location = new System.Drawing.Point(373, 77);
|
||||
this.pBStatus3.Name = "pBStatus3";
|
||||
this.pBStatus3.Size = new System.Drawing.Size(39, 20);
|
||||
this.pBStatus3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
@ -692,7 +698,7 @@
|
||||
this.pBStatus4.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pBStatus4.Image = ((System.Drawing.Image)(resources.GetObject("pBStatus4.Image")));
|
||||
this.pBStatus4.InitialImage = global::ScpServer.Properties.Resources.BT;
|
||||
this.pBStatus4.Location = new System.Drawing.Point(370, 106);
|
||||
this.pBStatus4.Location = new System.Drawing.Point(373, 106);
|
||||
this.pBStatus4.Name = "pBStatus4";
|
||||
this.pBStatus4.Size = new System.Drawing.Size(39, 20);
|
||||
this.pBStatus4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
@ -701,6 +707,7 @@
|
||||
//
|
||||
// tabProfiles
|
||||
//
|
||||
this.tabProfiles.Controls.Add(this.tSOptions);
|
||||
this.tabProfiles.Controls.Add(this.toolStrip1);
|
||||
this.tabProfiles.Controls.Add(this.lBProfiles);
|
||||
this.tabProfiles.Location = new System.Drawing.Point(4, 22);
|
||||
@ -711,6 +718,56 @@
|
||||
this.tabProfiles.Text = "Profiles";
|
||||
this.tabProfiles.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tSOptions
|
||||
//
|
||||
this.tSOptions.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
|
||||
this.tSOptions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripLabel1,
|
||||
this.tSTBProfile,
|
||||
this.toolStripButton1,
|
||||
this.tSBCancel});
|
||||
this.tSOptions.Location = new System.Drawing.Point(3, 28);
|
||||
this.tSOptions.Name = "tSOptions";
|
||||
this.tSOptions.Size = new System.Drawing.Size(780, 25);
|
||||
this.tSOptions.TabIndex = 2;
|
||||
this.tSOptions.Text = "toolStrip2";
|
||||
//
|
||||
// toolStripLabel1
|
||||
//
|
||||
this.toolStripLabel1.Name = "toolStripLabel1";
|
||||
this.toolStripLabel1.Size = new System.Drawing.Size(82, 22);
|
||||
this.toolStripLabel1.Text = "Profile Name: ";
|
||||
//
|
||||
// tSTBProfile
|
||||
//
|
||||
this.tSTBProfile.ForeColor = System.Drawing.SystemColors.GrayText;
|
||||
this.tSTBProfile.Name = "tSTBProfile";
|
||||
this.tSTBProfile.Size = new System.Drawing.Size(185, 25);
|
||||
this.tSTBProfile.Text = "<type profile name here>";
|
||||
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);
|
||||
//
|
||||
// toolStripButton1
|
||||
//
|
||||
this.toolStripButton1.AutoToolTip = false;
|
||||
this.toolStripButton1.Image = global::ScpServer.Properties.Resources.saveprofile;
|
||||
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButton1.Name = "toolStripButton1";
|
||||
this.toolStripButton1.Size = new System.Drawing.Size(88, 22);
|
||||
this.toolStripButton1.Text = "Save Profile";
|
||||
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
|
||||
//
|
||||
// tSBCancel
|
||||
//
|
||||
this.tSBCancel.AutoToolTip = false;
|
||||
this.tSBCancel.Image = global::ScpServer.Properties.Resources.delete;
|
||||
this.tSBCancel.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.tSBCancel.Name = "tSBCancel";
|
||||
this.tSBCancel.Size = new System.Drawing.Size(63, 22);
|
||||
this.tSBCancel.Text = "Cancel";
|
||||
this.tSBCancel.Click += new System.EventHandler(this.tSBCancel_Click);
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
|
||||
@ -824,7 +881,7 @@
|
||||
this.importToolStripMenuItem,
|
||||
this.exportToolStripMenuItem});
|
||||
this.cMProfile.Name = "cMProfile";
|
||||
this.cMProfile.Size = new System.Drawing.Size(189, 246);
|
||||
this.cMProfile.Size = new System.Drawing.Size(189, 224);
|
||||
//
|
||||
// editToolStripMenuItem
|
||||
//
|
||||
@ -952,6 +1009,8 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.pBStatus4)).EndInit();
|
||||
this.tabProfiles.ResumeLayout(false);
|
||||
this.tabProfiles.PerformLayout();
|
||||
this.tSOptions.ResumeLayout(false);
|
||||
this.tSOptions.PerformLayout();
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.cMProfile.ResumeLayout(false);
|
||||
@ -1037,6 +1096,11 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem newProfileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem exportToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStrip tSOptions;
|
||||
private System.Windows.Forms.ToolStripLabel toolStripLabel1;
|
||||
private System.Windows.Forms.ToolStripTextBox tSTBProfile;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
||||
private System.Windows.Forms.ToolStripButton tSBCancel;
|
||||
//private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ namespace ScpServer
|
||||
{
|
||||
public partial class ScpForm : Form
|
||||
{
|
||||
double version = 9.2;
|
||||
double version = 9.3;
|
||||
private DS4Control.Control rootHub;
|
||||
delegate void LogDebugDelegate(DateTime Time, String Data);
|
||||
|
||||
@ -100,9 +100,9 @@ namespace ScpServer
|
||||
InitializeComponent();
|
||||
|
||||
ThemeUtil.SetTheme(lvDebug);
|
||||
|
||||
SetupArrays();
|
||||
CheckDrivers();
|
||||
tSOptions.Visible = false;
|
||||
}
|
||||
|
||||
protected void Form_Load(object sender, EventArgs e)
|
||||
@ -168,6 +168,11 @@ namespace ScpServer
|
||||
test.Tick += test_Tick;
|
||||
}
|
||||
|
||||
private void test_Tick(object sender, EventArgs e)
|
||||
{
|
||||
label1.Visible = true;
|
||||
label1.Text = DS4LightBar.fadetimer[0].ToString();
|
||||
}
|
||||
|
||||
void Hotkeys(object sender, EventArgs e)
|
||||
{
|
||||
@ -189,17 +194,6 @@ namespace ScpServer
|
||||
}
|
||||
}
|
||||
|
||||
private void test_Tick(object sender, EventArgs e)
|
||||
{
|
||||
label1.Visible = true;
|
||||
int speed = Global.getButtonMouseSensitivity(0);
|
||||
label1.Text = (((rootHub.getDS4State(0).RX - 127) / 127d) * speed).ToString() + "and " + Mapping.mvalue;
|
||||
/*label1.Text = Mapping.globalState.currentClicks.toggle.ToString() + " Left is " +
|
||||
Mapping.getBoolMapping(DS4Controls.DpadLeft, rootHub.getDS4State(0)) +
|
||||
" Toggle is " + Mapping.pressedonce[256] +
|
||||
Mapping.test;*/
|
||||
}
|
||||
|
||||
private void CheckDrivers()
|
||||
{
|
||||
bool deriverinstalled = false;
|
||||
@ -434,6 +428,8 @@ namespace ScpServer
|
||||
lbLastMessage.Text = string.Empty;
|
||||
}
|
||||
|
||||
private static int WM_QUERYENDSESSION = 0x11;
|
||||
private static bool systemShutdown = false;
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
try
|
||||
@ -448,7 +444,11 @@ namespace ScpServer
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
if (m.Msg == WM_QUERYENDSESSION)
|
||||
systemShutdown = true;
|
||||
|
||||
// If this is WM_QUERYENDSESSION, the closing event should be
|
||||
// raised in the base WndProc.
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
|
||||
@ -645,6 +645,10 @@ namespace ScpServer
|
||||
this.Show();
|
||||
WindowState = FormWindowState.Normal;
|
||||
toolStrip1.Enabled = false;
|
||||
tSOptions.Visible = true;
|
||||
toolStrip1.Visible = false;
|
||||
if (profile != "")
|
||||
tSTBProfile.Text = profile;
|
||||
opt = new Options(rootHub, devID, profile, this);
|
||||
opt.Text = "Options for Controller " + (devID + 1);
|
||||
opt.Icon = this.Icon;
|
||||
@ -655,6 +659,7 @@ namespace ScpServer
|
||||
tabProfiles.Controls.Add(opt);
|
||||
lBProfiles.SendToBack();
|
||||
toolStrip1.SendToBack();
|
||||
tSOptions.SendToBack();
|
||||
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
opt.FormClosed += delegate
|
||||
{
|
||||
@ -663,6 +668,8 @@ namespace ScpServer
|
||||
FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
|
||||
this.Size = oldsize;
|
||||
oldsize = new System.Drawing.Size(0, 0);
|
||||
tSOptions.Visible = false;
|
||||
toolStrip1.Visible = true;
|
||||
toolStrip1.Enabled = true;
|
||||
};
|
||||
oldsize = this.Size;
|
||||
@ -894,6 +901,13 @@ namespace ScpServer
|
||||
|
||||
protected void Form_Close(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (systemShutdown)
|
||||
// Reset the variable because the user might cancel the
|
||||
// shutdown.
|
||||
{
|
||||
systemShutdown = false;
|
||||
DS4LightBar.shuttingdown = true;
|
||||
}
|
||||
if (oldsize == new System.Drawing.Size(0, 0))
|
||||
{
|
||||
Global.setFormWidth(this.Width);
|
||||
@ -907,6 +921,51 @@ namespace ScpServer
|
||||
Global.Save();
|
||||
rootHub.Stop();
|
||||
}
|
||||
|
||||
private void tBProfile_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
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("|"))
|
||||
tSTBProfile.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
else
|
||||
tSTBProfile.ForeColor = System.Drawing.SystemColors.GrayText;
|
||||
}
|
||||
|
||||
private void tBProfile_Enter(object sender, EventArgs e)
|
||||
{
|
||||
if (tSTBProfile.Text == "<type profile name here>")
|
||||
tSTBProfile.Text = "";
|
||||
}
|
||||
|
||||
private void tBProfile_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (tSTBProfile.Text == "")
|
||||
tSTBProfile.Text = "<type profile name here>";
|
||||
}
|
||||
|
||||
private void tSBCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (opt != null)
|
||||
opt.Close();
|
||||
}
|
||||
|
||||
private void toolStripButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (opt != null)
|
||||
{
|
||||
opt.Set();
|
||||
|
||||
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.setAProfile(opt.device, tSTBProfile.Text);
|
||||
Global.SaveProfile(opt.device, tSTBProfile.Text, opt.buttons.ToArray());
|
||||
Global.Save();
|
||||
opt.Close();
|
||||
}
|
||||
else
|
||||
MessageBox.Show("Please enter a valid name", "Not valid", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ThemeUtil
|
||||
|
@ -6526,6 +6526,9 @@
|
||||
1WDefQHxFbbcLCQjmgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="tSOptions.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>891, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>568, 17</value>
|
||||
</metadata>
|
||||
|
Loading…
Reference in New Issue
Block a user