From 49e2e642eddf0800bf956d1ca22b2b7a397e090e Mon Sep 17 00:00:00 2001 From: jays2kings Date: Thu, 26 Jun 2014 14:02:01 -0400 Subject: [PATCH] Sixaxis Deadzones can be reconfigured: 0.25+ recommended to lay down the controller without movement Mouse Acceleration option Rumble settings now more simple Better detection of where profiles and settings are stored, if you use jheb's tool and this as a portable one, it better detects which settings are which. Smaller filesize for profiles. Reorder of tabs --- DS4Control/Mapping.cs | 123 +++-- DS4Control/ScpUtil.cs | 479 +++++++++-------- DS4Tool/Options.Designer.cs | 245 +++++---- DS4Tool/Options.cs | 65 +-- DS4Tool/ScpForm.Designer.cs | 2 +- DS4Tool/ScpForm.cs | 30 +- DS4Tool/ScpForm.resx | 988 ++++++++++++++---------------------- 7 files changed, 844 insertions(+), 1088 deletions(-) diff --git a/DS4Control/Mapping.cs b/DS4Control/Mapping.cs index e940c52..44bfcfa 100644 --- a/DS4Control/Mapping.cs +++ b/DS4Control/Mapping.cs @@ -456,10 +456,14 @@ namespace DS4Control case DS4Controls.TouchLeft: return 27; case DS4Controls.TouchRight: return 28; case DS4Controls.TouchUpper: return 29; + case DS4Controls.GyroXNeg: return 30; + case DS4Controls.GyroXPos: return 31; + case DS4Controls.GyroZNeg: return 32; + case DS4Controls.GyroZPos: return 33; } return 0; } - public static bool[] pressedonce = new bool[261], macrodone = new bool[30]; + public static bool[] pressedonce = new bool[261], macrodone = new bool[34]; public static int test = 0; /** Map DS4 Buttons/Axes to other DS4 Buttons/Axes (largely the same as Xinput ones) and to keyboard and mouse buttons. */ public static async void MapCustom(int device, DS4State cState, DS4State MappedState, DS4StateExposed eState) @@ -506,18 +510,18 @@ namespace DS4Control if (keys[0] == 271 && !MappedState.PS) MappedState.PS = getBoolMapping(customKey.Key, cState, eState); if (keys[0] == 272 && !MappedState.L1) MappedState.L1 = getBoolMapping(customKey.Key, cState, eState); if (keys[0] == 273 && !MappedState.R1) MappedState.R1 = getBoolMapping(customKey.Key, cState, eState); - if (keys[0] == 274 && MappedState.L2 == 0) MappedState.L2 = getByteMapping(customKey.Key, cState, eState); - if (keys[0] == 275 && MappedState.R2 == 0) MappedState.R2 = getByteMapping(customKey.Key, cState, eState); + if (keys[0] == 274 && MappedState.L2 == 0) MappedState.L2 = getByteMapping(device, customKey.Key, cState, eState); + if (keys[0] == 275 && MappedState.R2 == 0) MappedState.R2 = getByteMapping(device, customKey.Key, cState, eState); if (keys[0] == 276 && !MappedState.L3) MappedState.L3 = getBoolMapping(customKey.Key, cState, eState); if (keys[0] == 277 && !MappedState.R3) MappedState.R3 = getBoolMapping(customKey.Key, cState, eState); - if (keys[0] == 278 && LYChanged) MappedState.LY = getXYAxisMapping(customKey.Key, cState, eState); - if (keys[0] == 279 && LYChanged) MappedState.LY = getXYAxisMapping(customKey.Key, cState, eState, true); - if (keys[0] == 280 && LXChanged) MappedState.LX = getXYAxisMapping(customKey.Key, cState, eState); - if (keys[0] == 281 && LXChanged) MappedState.LX = getXYAxisMapping(customKey.Key, cState, eState, true); - if (keys[0] == 282 && RYChanged) MappedState.RY = getXYAxisMapping(customKey.Key, cState, eState); - if (keys[0] == 283 && RYChanged) MappedState.RY = getXYAxisMapping(customKey.Key, cState, eState, true); - if (keys[0] == 284 && RXChanged) MappedState.RX = getXYAxisMapping(customKey.Key, cState, eState); - if (keys[0] == 285 && RXChanged) MappedState.RX = getXYAxisMapping(customKey.Key, cState, eState, true); + if (keys[0] == 278 && LYChanged) MappedState.LY = getXYAxisMapping(device, customKey.Key, cState, eState); + if (keys[0] == 279 && LYChanged) MappedState.LY = getXYAxisMapping(device, customKey.Key, cState, eState, true); + if (keys[0] == 280 && LXChanged) MappedState.LX = getXYAxisMapping(device, customKey.Key, cState, eState); + if (keys[0] == 281 && LXChanged) MappedState.LX = getXYAxisMapping(device, customKey.Key, cState, eState, true); + if (keys[0] == 282 && RYChanged) MappedState.RY = getXYAxisMapping(device, customKey.Key, cState, eState); + if (keys[0] == 283 && RYChanged) MappedState.RY = getXYAxisMapping(device, customKey.Key, cState, eState, true); + if (keys[0] == 284 && RXChanged) MappedState.RX = getXYAxisMapping(device, customKey.Key, cState, eState); + if (keys[0] == 285 && RXChanged) MappedState.RX = getXYAxisMapping(device, customKey.Key, cState, eState, true); } if (!macrodone[DS4ControltoInt(customKey.Key)]) { @@ -599,8 +603,6 @@ namespace DS4Control pressedonce[customKey.Value] = false; } - - bool LX = false, LY = false, RX = false, RY = false; MappedState.LX = 127; MappedState.LY = 127; MappedState.RX = 127; @@ -713,70 +715,43 @@ namespace DS4Control break; case X360Controls.LXNeg: if (LXChanged) - { - MappedState.LX = getXYAxisMapping(customButton.Key, cState, eState); - LX = true; - } + MappedState.LX = getXYAxisMapping(device, customButton.Key, cState, eState); break; case X360Controls.LYNeg: if (LYChanged) - { - MappedState.LY = getXYAxisMapping(customButton.Key, cState, eState); - LY = true; - } + MappedState.LY = getXYAxisMapping(device, customButton.Key, cState, eState); break; case X360Controls.RXNeg: if (RXChanged) - { - MappedState.RX = getXYAxisMapping(customButton.Key, cState, eState); - if (MappedState.RX != 127) - RX = true; - } + MappedState.RX = getXYAxisMapping(device, customButton.Key, cState, eState); break; case X360Controls.RYNeg: if (RYChanged) - { - MappedState.RY = getXYAxisMapping(customButton.Key, cState, eState); - RY = true; - } + MappedState.RY = getXYAxisMapping(device, customButton.Key, cState, eState); break; case X360Controls.LXPos: if (LXChanged) - { - MappedState.LX = getXYAxisMapping(customButton.Key, cState, eState, true); - //Console.WriteLine(MappedState.LX + ""); - LX = true; - } + MappedState.LX = getXYAxisMapping(device, customButton.Key, cState, eState, true); break; case X360Controls.LYPos: if (LYChanged) - { - MappedState.LY = getXYAxisMapping(customButton.Key, cState, eState, true); - //Console.WriteLine(MappedState.LY + ""); - LY = true; - } + MappedState.LY = getXYAxisMapping(device, customButton.Key, cState, eState, true); break; case X360Controls.RXPos: if (RXChanged) - { - MappedState.RX = getXYAxisMapping(customButton.Key, cState, eState, true); - RX = true; - } + MappedState.RX = getXYAxisMapping(device, customButton.Key, cState, eState, true); break; case X360Controls.RYPos: if (RYChanged) - { - MappedState.RY = getXYAxisMapping(customButton.Key, cState, eState, true); - RY = true; - } + MappedState.RY = getXYAxisMapping(device, customButton.Key, cState, eState, true); break; case X360Controls.LT: if (MappedState.L2 == 0) - MappedState.L2 = getByteMapping(customButton.Key, cState, eState); + MappedState.L2 = getByteMapping(device, customButton.Key, cState, eState); break; case X360Controls.RT: if (MappedState.R2 == 0) - MappedState.R2 = getByteMapping(customButton.Key, cState, eState); + MappedState.R2 = getByteMapping(device, customButton.Key, cState, eState); break; case X360Controls.LeftMouse: if (getBoolMapping(customButton.Key, cState, eState)) @@ -850,9 +825,13 @@ namespace DS4Control } public static DateTime[] mousenow = { DateTime.UtcNow, DateTime.UtcNow, DateTime.UtcNow, DateTime.UtcNow }; public static double mvalue = 0; + public static int[] mouseaccel = new int[34]; + public static bool[] mousedoublecheck = new bool[34]; private static int getMouseMapping(int device, DS4Controls control, DS4State cState, DS4StateExposed eState, int mnum) { - + int controlnum = DS4ControltoInt(control); + double SXD = Global.getSXDeadzone(device); + double SZD = Global.getSZDeadzone(device); int deadzone = 10; double value = 0; int speed = Global.getButtonMouseSensitivity(device); @@ -914,13 +893,13 @@ namespace DS4Control if (eState != null) switch (control) { - case DS4Controls.GyroXPos: return (byte)(eState.GyroX > 1800 ? + case DS4Controls.GyroXPos: return (byte)(eState.GyroX > SXD * 7500 ? Math.Pow(root + speed / divide, eState.GyroX / 48) : 0); - case DS4Controls.GyroXNeg: return (byte)(eState.GyroX < -1800 ? + case DS4Controls.GyroXNeg: return (byte)(eState.GyroX < -SXD * 7500 ? Math.Pow(root + speed / divide, -eState.GyroX / 48) : 0); - case DS4Controls.GyroZPos: return (byte)(eState.GyroZ > 1800 ? + case DS4Controls.GyroZPos: return (byte)(eState.GyroZ > SZD * 7500 ? Math.Pow(root + speed / divide, eState.GyroZ / 48) : 0); - case DS4Controls.GyroZNeg: return (byte)(eState.GyroZ < -1800 ? + case DS4Controls.GyroZNeg: return (byte)(eState.GyroZ < -SZD * 7500 ? Math.Pow(root + speed / divide, -eState.GyroZ / 48) : 0); } bool LXChanged = (Math.Abs(127 - cState.LX) < deadzone); @@ -929,6 +908,16 @@ namespace DS4Control bool RYChanged = (Math.Abs(127 - cState.RY) < deadzone); if (LXChanged || LYChanged || RXChanged || RYChanged) now = DateTime.UtcNow; + if (Global.getMouseAccel(device)) + { + if (value > 0) + mouseaccel[controlnum]++; + else if (!mousedoublecheck[controlnum]) + mouseaccel[controlnum] = 0; + mousedoublecheck[controlnum] = value != 0; + if (mouseaccel[controlnum] > 1000) + value *= (double)Math.Min(2000, (mouseaccel[controlnum])) / 1000d; + } if (value <= 1) { if (now >= mousenow[mnum] + TimeSpan.FromMilliseconds((1 - value) * 500)) @@ -954,8 +943,10 @@ namespace DS4Control static bool[] touchArea = { true, true, true, true }; - public static byte getByteMapping(DS4Controls control, DS4State cState, DS4StateExposed eState) + public static byte getByteMapping(int device, DS4Controls control, DS4State cState, DS4StateExposed eState) { + double SXD = Global.getSXDeadzone(device); + double SZD = Global.getSZDeadzone(device); if (!cState.TouchButton) for (int i = 0; i < 4; i++) touchArea[i] = false; @@ -1001,10 +992,10 @@ namespace DS4Control if (eState != null) switch (control) { - case DS4Controls.GyroXPos: return (byte)(eState.GyroX > 1800 ? Math.Min(255, eState.GyroX / 24) : 0); - case DS4Controls.GyroXNeg: return (byte)(eState.GyroX < -1800 ? Math.Min(255,-eState.GyroX / 24) : 0); - case DS4Controls.GyroZPos: return (byte)(eState.GyroZ > 1800 ? Math.Min(255, eState.GyroZ / 24) : 0); - case DS4Controls.GyroZNeg: return (byte)(eState.GyroZ < -1800 ? Math.Min(255, -eState.GyroZ / 24) : 0); + case DS4Controls.GyroXPos: return (byte)(eState.GyroX > SXD * 7500 ? Math.Min(255, eState.GyroX / 24) : 0); + case DS4Controls.GyroXNeg: return (byte)(eState.GyroX < -SXD * 7500 ? Math.Min(255, -eState.GyroX / 24) : 0); + case DS4Controls.GyroZPos: return (byte)(eState.GyroZ > SZD * 7500 ? Math.Min(255, eState.GyroZ / 24) : 0); + case DS4Controls.GyroZNeg: return (byte)(eState.GyroZ < -SZD * 7500 ? Math.Min(255, -eState.GyroZ / 24) : 0); } if (cState.TouchButton) { @@ -1093,10 +1084,12 @@ namespace DS4Control return false; } - public static byte getXYAxisMapping(DS4Controls control, DS4State cState, DS4StateExposed eState, bool alt = false) + public static byte getXYAxisMapping(int device, DS4Controls control, DS4State cState, DS4StateExposed eState, bool alt = false) { byte trueVal = 0; byte falseVal = 127; + double SXD = Global.getSXDeadzone(device); + double SZD = Global.getSZDeadzone(device); if (alt) trueVal = 255; if (!cState.TouchButton) @@ -1137,16 +1130,16 @@ namespace DS4Control { switch (control) { - case DS4Controls.GyroXPos: if (eState.GyroX > 1800) + case DS4Controls.GyroXPos: if (eState.GyroX > SXD * 7500) if (alt) return (byte)Math.Min(255, 127 + eState.GyroX / 48); else return (byte)Math.Max(0, 127 - eState.GyroX / 48); else return falseVal; - case DS4Controls.GyroXNeg: if (eState.GyroX < -1800) + case DS4Controls.GyroXNeg: if (eState.GyroX < -SXD * 7500) if (alt) return (byte)Math.Min(255, 127 + -eState.GyroX / 48); else return (byte)Math.Max(0, 127 - -eState.GyroX / 48); else return falseVal; - case DS4Controls.GyroZPos: if (eState.GyroZ > 1800) + case DS4Controls.GyroZPos: if (eState.GyroZ > SZD * 7500) if (alt) return (byte)Math.Min(255, 127 + eState.GyroZ / 48); else return (byte)Math.Max(0, 127 - eState.GyroZ / 48); else return falseVal; - case DS4Controls.GyroZNeg: if (eState.GyroZ < -1800) + case DS4Controls.GyroZNeg: if (eState.GyroZ < -SZD * 7500) if (alt) return (byte)Math.Min(255, 127 + -eState.GyroZ / 48); else return (byte)Math.Max(0, 127 - -eState.GyroZ / 48); else return falseVal; } diff --git a/DS4Control/ScpUtil.cs b/DS4Control/ScpUtil.cs index b2135ed..f96b30a 100644 --- a/DS4Control/ScpUtil.cs +++ b/DS4Control/ScpUtil.cs @@ -416,6 +416,22 @@ namespace DS4Control { m_Config.m_RightTriggerMiddle[device] = value; } + public static double getSXDeadzone(int device) + { + return m_Config.SXDeadzone[device]; + } + public static void setSXDeadzone(int device, double value) + { + m_Config.SXDeadzone[device] = value; + } + public static double getSZDeadzone(int device) + { + return m_Config.SZDeadzone[device]; + } + public static void setSZDeadzone(int device, double value) + { + m_Config.SZDeadzone[device] = value; + } public static byte getLSDeadzone(int device) { return m_Config.LSDeadzone[device]; @@ -432,6 +448,14 @@ namespace DS4Control { m_Config.RSDeadzone[device] = value; } + public static bool getMouseAccel(int device) + { + return m_Config.mouseAccel[device]; + } + public static void setMouseAccel(int device, bool value) + { + m_Config.mouseAccel[device] = value; + } public static void setAProfile(int device, string filepath) { m_Config.profilePath[device] = appdatapath + @"\Profiles\" + filepath + ".xml"; @@ -487,11 +511,11 @@ namespace DS4Control } public static void LoadProfile(int device) { - m_Config.LoadProfile(device); + m_Config.LoadProfile(device, null); } public static void LoadTempProfile(int device, string name) { - m_Config.LoadProfile(device, appdatapath + @"\Profiles\" + name + ".xml"); + m_Config.LoadProfile(device, null, appdatapath + @"\Profiles\" + name + ".xml"); } public static bool Save() { @@ -592,12 +616,14 @@ namespace DS4Control public String[] profilePath = { String.Empty, String.Empty, String.Empty, String.Empty, String.Empty }; public Byte[] m_Rumble = { 100, 100, 100, 100, 100 }; public Byte[] touchSensitivity = { 100, 100, 100, 100, 100 }; - public Byte[] LSDeadzone = { 0, 0, 0, 0, 0 }, RSDeadzone = { 0, 0, 0, 0, 0}; + public Byte[] LSDeadzone = { 0, 0, 0, 0, 0 }, RSDeadzone = { 0, 0, 0, 0, 0 }; + public double[] SXDeadzone = { 0.25, 0.25, 0.25, 0.25, 0.25 }, SZDeadzone = { 0.25, 0.25, 0.25, 0.25, 0.25 }; public Byte[] tapSensitivity = { 0, 0, 0, 0, 0 }; public bool[] doubleTap = { false, false, false, false, false }; public int[] scrollSensitivity = { 0, 0, 0, 0, 0 }; public double[] rainbow = { 0, 0, 0, 0, 0 }; public int[] flashAt = { 30, 30, 30, 30, 30 }; + public bool[] mouseAccel = { true, true, true, true, true }; public Byte[][] m_LowLeds = new Byte[][] { new Byte[] {0,0,0}, @@ -704,20 +730,20 @@ namespace DS4Control XmlNode xmlFlushHIDQueue = m_Xdoc.CreateNode(XmlNodeType.Element, "flushHIDQueue", null); xmlFlushHIDQueue.InnerText = flushHIDQueue[device].ToString(); Node.AppendChild(xmlFlushHIDQueue); XmlNode xmlIdleDisconnectTimeout = m_Xdoc.CreateNode(XmlNodeType.Element, "idleDisconnectTimeout", null); xmlIdleDisconnectTimeout.InnerText = idleDisconnectTimeout[device].ToString(); Node.AppendChild(xmlIdleDisconnectTimeout); - XmlNode xmlRed = m_Xdoc.CreateNode(XmlNodeType.Element, "Red", null); xmlRed.InnerText = m_Leds[device][0].ToString(); Node.AppendChild(xmlRed); - XmlNode xmlGreen = m_Xdoc.CreateNode(XmlNodeType.Element, "Green", null); xmlGreen.InnerText = m_Leds[device][1].ToString(); Node.AppendChild(xmlGreen); - XmlNode xmlBlue = m_Xdoc.CreateNode(XmlNodeType.Element, "Blue", null); xmlBlue.InnerText = m_Leds[device][2].ToString(); Node.AppendChild(xmlBlue); + XmlNode xmlColor = m_Xdoc.CreateNode(XmlNodeType.Element, "Color", null); + xmlColor.InnerText = m_Leds[device][0].ToString() + "," + m_Leds[device][1].ToString() + "," + m_Leds[device][2].ToString(); + Node.AppendChild(xmlColor); XmlNode xmlRumbleBoost = m_Xdoc.CreateNode(XmlNodeType.Element, "RumbleBoost", null); xmlRumbleBoost.InnerText = m_Rumble[device].ToString(); Node.AppendChild(xmlRumbleBoost); XmlNode xmlLedAsBatteryIndicator = m_Xdoc.CreateNode(XmlNodeType.Element, "ledAsBatteryIndicator", null); xmlLedAsBatteryIndicator.InnerText = ledAsBattery[device].ToString(); Node.AppendChild(xmlLedAsBatteryIndicator); XmlNode xmlLowBatteryFlash = m_Xdoc.CreateNode(XmlNodeType.Element, "lowBatteryFlash", null); xmlLowBatteryFlash.InnerText = flashLedLowBattery[device].ToString(); Node.AppendChild(xmlLowBatteryFlash); XmlNode xmlFlashBatterAt = m_Xdoc.CreateNode(XmlNodeType.Element, "flashBatteryAt", null); xmlFlashBatterAt.InnerText = flashAt[device].ToString(); Node.AppendChild(xmlFlashBatterAt); XmlNode xmlTouchSensitivity = m_Xdoc.CreateNode(XmlNodeType.Element, "touchSensitivity", null); xmlTouchSensitivity.InnerText = touchSensitivity[device].ToString(); Node.AppendChild(xmlTouchSensitivity); - XmlNode 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 xmlLowColor = m_Xdoc.CreateNode(XmlNodeType.Element, "LowColor", null); + xmlLowColor.InnerText = m_LowLeds[device][0].ToString() + "," + m_LowLeds[device][1].ToString() + "," + m_LowLeds[device][2].ToString(); + Node.AppendChild(xmlLowColor); + XmlNode xmlChargingColor = m_Xdoc.CreateNode(XmlNodeType.Element, "ChargingColor", null); + xmlChargingColor.InnerText = m_ChargingLeds[device][0].ToString() + "," + m_ChargingLeds[device][1].ToString() + "," + m_ChargingLeds[device][2].ToString(); + Node.AppendChild(xmlChargingColor); 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); @@ -729,7 +755,10 @@ 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 xmlSXD = m_Xdoc.CreateNode(XmlNodeType.Element, "SXDeadZone", null); xmlSXD.InnerText = SXDeadzone[device].ToString(); Node.AppendChild(xmlSXD); + XmlNode xmlSZD = m_Xdoc.CreateNode(XmlNodeType.Element, "SZDeadZone", null); xmlSZD.InnerText = SZDeadzone[device].ToString(); Node.AppendChild(xmlSZD); XmlNode xmlChargingType = m_Xdoc.CreateNode(XmlNodeType.Element, "ChargingType", null); xmlChargingType.InnerText = chargingType[device].ToString(); Node.AppendChild(xmlChargingType); + XmlNode xmlMouseAccel = m_Xdoc.CreateNode(XmlNodeType.Element, "MouseAcceleration", null); xmlMouseAccel.InnerText = mouseAccel[device].ToString(); Node.AppendChild(xmlMouseAccel); XmlNode NodeControl = m_Xdoc.CreateNode(XmlNodeType.Element, "Control", null); XmlNode Key = m_Xdoc.CreateNode(XmlNodeType.Element, "Key", null); @@ -738,7 +767,6 @@ namespace DS4Control XmlNode Button = m_Xdoc.CreateNode(XmlNodeType.Element, "Button", null); foreach (var button in buttons) - // try { // Save even if string (for xbox controller buttons) if (button.Tag != null) @@ -777,10 +805,6 @@ namespace DS4Control else Button.AppendChild(buttonNode); } } - //catch - // { - // NodeControl.InnerText = ""; - //} Node.AppendChild(NodeControl); if (Button.HasChildNodes) NodeControl.AppendChild(Button); @@ -892,192 +916,8 @@ namespace DS4Control } return X360Controls.Unbound; } - public Boolean LoadProfile(int device, System.Windows.Forms.Control[] buttons) - { - Boolean Loaded = true; - Dictionary customMapKeyTypes = new Dictionary(); - Dictionary customMapKeys = new Dictionary(); - Dictionary customMapButtons = new Dictionary(); - Dictionary customMapMacros = new Dictionary(); - Boolean missingSetting = false; - try - { - if (File.Exists(profilePath[device])) - { - XmlNode Item; - - m_Xdoc.Load(profilePath[device]); - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/flushHIDQueue"); Boolean.TryParse(Item.InnerText, out flushHIDQueue[device]); } - catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/idleDisconnectTimeout"); Int32.TryParse(Item.InnerText, out idleDisconnectTimeout[device]); } - catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/Red"); Byte.TryParse(Item.InnerText, out m_Leds[device][0]); } - catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/Green"); Byte.TryParse(Item.InnerText, out m_Leds[device][1]); } - catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/Blue"); Byte.TryParse(Item.InnerText, out m_Leds[device][2]); } - catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/RumbleBoost"); Byte.TryParse(Item.InnerText, out m_Rumble[device]); } - catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/ledAsBatteryIndicator"); Boolean.TryParse(Item.InnerText, out ledAsBattery[device]); } - catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/lowBatteryFlash"); Boolean.TryParse(Item.InnerText, out flashLedLowBattery[device]); } - catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/flashBatteryAt"); Int32.TryParse(Item.InnerText, out flashAt[device]); } - catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/touchSensitivity"); Byte.TryParse(Item.InnerText, out touchSensitivity[device]); } - catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/LowRed"); Byte.TryParse(Item.InnerText, out m_LowLeds[device][0]); } - catch { missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/LowGreen"); Byte.TryParse(Item.InnerText, out m_LowLeds[device][1]); } - 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]); } - catch { missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/tapSensitivity"); Byte.TryParse(Item.InnerText, out tapSensitivity[device]); } - catch { missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/doubleTap"); Boolean.TryParse(Item.InnerText, out doubleTap[device]); } - catch { missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/scrollSensitivity"); Int32.TryParse(Item.InnerText, out scrollSensitivity[device]); } - catch { missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/LeftTriggerMiddle"); Byte.TryParse(Item.InnerText, out m_LeftTriggerMiddle[device]); } - catch { missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/RightTriggerMiddle"); Byte.TryParse(Item.InnerText, out m_RightTriggerMiddle[device]); } - catch { missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/ButtonMouseSensitivity"); Int32.TryParse(Item.InnerText, out buttonMouseSensitivity[device]); } - catch { missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/Rainbow"); Double.TryParse(Item.InnerText, out rainbow[device]); } - catch { rainbow[device] = 0; missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/LSDeadZone"); Byte.TryParse(Item.InnerText, out LSDeadzone[device]); } - 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; - foreach (var button in buttons) - try - { - //bool foundBinding = false; - Item = m_Xdoc.SelectSingleNode(String.Format("/ScpControl/Control/KeyType/{0}", button.Name)); - if (Item != null) - { - //foundBinding = true; - keyType = DS4KeyType.None; - if (Item.InnerText.Contains(DS4KeyType.Unbound.ToString())) - { - keyType = DS4KeyType.Unbound; - button.Tag = "Unbound"; - button.Text = "Unbound"; - } - else - { - bool SC = Item.InnerText.Contains(DS4KeyType.ScanCode.ToString()); - bool TG = Item.InnerText.Contains(DS4KeyType.Toggle.ToString()); - bool MC = Item.InnerText.Contains(DS4KeyType.Macro.ToString()); - bool MR = Item.InnerText.Contains(DS4KeyType.HoldMacro.ToString()); - button.Font = new Font(button.Font, - (SC ? FontStyle.Bold : FontStyle.Regular) | (TG ? FontStyle.Italic : FontStyle.Regular) | - (MC ? FontStyle.Underline : FontStyle.Regular) | (MR ? FontStyle.Strikeout : FontStyle.Regular)); - if (Item.InnerText.Contains(DS4KeyType.ScanCode.ToString())) - keyType |= DS4KeyType.ScanCode; - if (Item.InnerText.Contains(DS4KeyType.Toggle.ToString())) - keyType |= DS4KeyType.Toggle; - if (Item.InnerText.Contains(DS4KeyType.Macro.ToString())) - keyType |= DS4KeyType.Macro; - } - if (keyType != DS4KeyType.None) - customMapKeyTypes.Add(getDS4ControlsByName(Item.Name), keyType); - } - - Item = m_Xdoc.SelectSingleNode(String.Format("/ScpControl/Control/Macro/{0}", button.Name)); - if (Item != null) - { - string[] splitter = Item.InnerText.Split('/'); - int[] keys = new int[splitter.Length]; - for (int i = 0; i < keys.Length; i++) - { - keys[i] = int.Parse(splitter[i]); - if (keys[i] < 255) splitter[i] = ((System.Windows.Forms.Keys)keys[i]).ToString(); - else if (keys[i] == 256) splitter[i] = "Left Mouse Button"; - else if (keys[i] == 257) splitter[i] = "Right Mouse Button"; - else if (keys[i] == 258) splitter[i] = "Middle Mouse Button"; - else if (keys[i] == 259) splitter[i] = "4th Mouse Button"; - else if (keys[i] == 260) splitter[i] = "5th Mouse Button"; - else if (keys[i] > 300) splitter[i] = "Wait " + (keys[i] - 300) + "ms"; - } - button.Text = "Macro"; - button.Tag = keys; - customMapMacros.Add(getDS4ControlsByName(button.Name), Item.InnerText); - } - else if (m_Xdoc.SelectSingleNode(String.Format("/ScpControl/Control/Key/{0}", button.Name)) != null) - { - Item = m_Xdoc.SelectSingleNode(String.Format("/ScpControl/Control/Key/{0}", button.Name)); - if (UInt16.TryParse(Item.InnerText, out wvk)) - { - //foundBinding = true; - customMapKeys.Add(getDS4ControlsByName(Item.Name), wvk); - button.Tag = wvk; - button.Text = ((System.Windows.Forms.Keys)wvk).ToString(); - } - } - else - { - Item = m_Xdoc.SelectSingleNode(String.Format("/ScpControl/Control/Button/{0}", button.Name)); - if (Item != null) - { - //foundBinding = true; - button.Tag = Item.InnerText; - button.Text = Item.InnerText; - customMapButtons.Add(getDS4ControlsByName(button.Name), getX360ControlsByName(Item.InnerText)); - } - } - } - catch - { - - } - } - } - catch { Loaded = false; } - - if (Loaded) - { - this.customMapButtons[device] = customMapButtons; - this.customMapKeys[device] = customMapKeys; - this.customMapKeyTypes[device] = customMapKeyTypes; - this.customMapMacros[device] = customMapMacros; - } - // Only add missing settings if the actual load was graceful - if (missingSetting && Loaded) - SaveProfile(device, profilePath[device], buttons); - - return Loaded; - } - public Boolean LoadProfile(int device, string propath = "") + public Boolean LoadProfile(int device, System.Windows.Forms.Control[] buttons, string propath = "") { Boolean Loaded = true; Dictionary customMapKeyTypes = new Dictionary(); @@ -1103,16 +943,31 @@ namespace DS4Control try { Item = m_Xdoc.SelectSingleNode("/ScpControl/idleDisconnectTimeout"); Int32.TryParse(Item.InnerText, out idleDisconnectTimeout[device]); } catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/Red"); Byte.TryParse(Item.InnerText, out m_Leds[device][0]); } + //New method for saving color + try + { + Item = m_Xdoc.SelectSingleNode("/ScpControl/Color"); + string[] colors; + if (!string.IsNullOrEmpty(Item.InnerText)) + colors = Item.InnerText.Split(','); + else + colors = new string[0]; + for (int i = 0; i < colors.Length; i++) + m_Leds[device][i] = byte.Parse(colors[i]); + } catch { missingSetting = true; } + if (string.IsNullOrEmpty(m_Xdoc.SelectSingleNode("/ScpControl/Color").InnerText)) + { + //Old method of color saving + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/Red"); Byte.TryParse(Item.InnerText, out m_Leds[device][0]); } + catch { missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/Green"); Byte.TryParse(Item.InnerText, out m_Leds[device][1]); } - catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/Blue"); Byte.TryParse(Item.InnerText, out m_Leds[device][2]); } - catch { missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/Green"); Byte.TryParse(Item.InnerText, out m_Leds[device][1]); } + catch { missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/Blue"); Byte.TryParse(Item.InnerText, out m_Leds[device][2]); } + catch { missingSetting = true; } + } try { Item = m_Xdoc.SelectSingleNode("/ScpControl/RumbleBoost"); Byte.TryParse(Item.InnerText, out m_Rumble[device]); } catch { missingSetting = true; } @@ -1127,19 +982,51 @@ namespace DS4Control try { Item = m_Xdoc.SelectSingleNode("/ScpControl/touchSensitivity"); Byte.TryParse(Item.InnerText, out touchSensitivity[device]); } catch { missingSetting = true; } - - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/LowRed"); Byte.TryParse(Item.InnerText, out m_LowLeds[device][0]); } + //New method for saving color + try + { + Item = m_Xdoc.SelectSingleNode("/ScpControl/LowColor"); + string[] colors; + if (!string.IsNullOrEmpty(Item.InnerText)) + colors = Item.InnerText.Split(','); + else + colors = new string[0]; + for (int i = 0; i < colors.Length; i++) + m_LowLeds[device][i] = byte.Parse(colors[i]); + } catch { missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/ScpControl/LowGreen"); Byte.TryParse(Item.InnerText, out m_LowLeds[device][1]); } - 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]); } + if (string.IsNullOrEmpty(m_Xdoc.SelectSingleNode("/ScpControl/LowColor").InnerText)) + { + //Old method of color saving + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/LowRed"); Byte.TryParse(Item.InnerText, out m_LowLeds[device][0]); } + catch { missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/LowGreen"); Byte.TryParse(Item.InnerText, out m_LowLeds[device][1]); } + catch { missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/LowBlue"); Byte.TryParse(Item.InnerText, out m_LowLeds[device][2]); } + catch { missingSetting = true; } + } + //New method for saving color + try + { + Item = m_Xdoc.SelectSingleNode("/ScpControl/ChargingColor"); + string[] colors; + if (!string.IsNullOrEmpty(Item.InnerText)) + colors = Item.InnerText.Split(','); + else + colors = new string[0]; + for (int i = 0; i < colors.Length; i++) + m_ChargingLeds[device][i] = byte.Parse(colors[i]); + } catch { missingSetting = true; } + if (string.IsNullOrEmpty(m_Xdoc.SelectSingleNode("/ScpControl/ChargingColor").InnerText)) + { + 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]); } @@ -1162,43 +1049,137 @@ 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/SXDeadZone"); Double.TryParse(Item.InnerText, out SXDeadzone[device]); } + catch { missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/SZDeadZone"); Double.TryParse(Item.InnerText, out SZDeadzone[device]); } + catch { missingSetting = true; } try { Item = m_Xdoc.SelectSingleNode("/ScpControl/ChargingType"); Int32.TryParse(Item.InnerText, out chargingType[device]); } catch { missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/ScpControl/MouseAcceleration"); Boolean.TryParse(Item.InnerText, out mouseAccel[device]); } + catch { missingSetting = true; } DS4KeyType keyType; UInt16 wvk; - XmlNode ParentItem = m_Xdoc.SelectSingleNode("/ScpControl/Control/Button"); - if (ParentItem != null) - foreach (XmlNode item in ParentItem.ChildNodes) - customMapButtons.Add(getDS4ControlsByName(item.Name), getX360ControlsByName(item.InnerText)); - ParentItem = m_Xdoc.SelectSingleNode("/ScpControl/Control/Macro"); - if (ParentItem != null) - foreach (XmlNode item in ParentItem.ChildNodes) + if (buttons == null) + { + XmlNode ParentItem = m_Xdoc.SelectSingleNode("/ScpControl/Control/Button"); + if (ParentItem != null) + foreach (XmlNode item in ParentItem.ChildNodes) + customMapButtons.Add(getDS4ControlsByName(item.Name), getX360ControlsByName(item.InnerText)); + ParentItem = m_Xdoc.SelectSingleNode("/ScpControl/Control/Macro"); + if (ParentItem != null) + foreach (XmlNode item in ParentItem.ChildNodes) customMapMacros.Add(getDS4ControlsByName(item.Name), item.InnerText); - ParentItem = m_Xdoc.SelectSingleNode("/ScpControl/Control/Key"); - if (ParentItem != null) - foreach (XmlNode item in ParentItem.ChildNodes) - if (UInt16.TryParse(item.InnerText, out wvk)) - customMapKeys.Add(getDS4ControlsByName(item.Name), wvk); - ParentItem = m_Xdoc.SelectSingleNode("/ScpControl/Control/KeyType"); - if (ParentItem != null) - foreach (XmlNode item in ParentItem.ChildNodes) - if (item != null) + ParentItem = m_Xdoc.SelectSingleNode("/ScpControl/Control/Key"); + if (ParentItem != null) + foreach (XmlNode item in ParentItem.ChildNodes) + if (UInt16.TryParse(item.InnerText, out wvk)) + customMapKeys.Add(getDS4ControlsByName(item.Name), wvk); + ParentItem = m_Xdoc.SelectSingleNode("/ScpControl/Control/KeyType"); + if (ParentItem != null) + foreach (XmlNode item in ParentItem.ChildNodes) + if (item != null) + { + keyType = DS4KeyType.None; + if (item.InnerText.Contains(DS4KeyType.ScanCode.ToString())) + keyType |= DS4KeyType.ScanCode; + if (item.InnerText.Contains(DS4KeyType.Toggle.ToString())) + keyType |= DS4KeyType.Toggle; + if (item.InnerText.Contains(DS4KeyType.Macro.ToString())) + keyType |= DS4KeyType.Macro; + if (item.InnerText.Contains(DS4KeyType.HoldMacro.ToString())) + keyType |= DS4KeyType.HoldMacro; + if (item.InnerText.Contains(DS4KeyType.Unbound.ToString())) + keyType |= DS4KeyType.Unbound; + if (keyType != DS4KeyType.None) + customMapKeyTypes.Add(getDS4ControlsByName(item.Name), keyType); + } + } + else + { + foreach (var button in buttons) + try { - keyType = DS4KeyType.None; - if (item.InnerText.Contains(DS4KeyType.ScanCode.ToString())) - keyType |= DS4KeyType.ScanCode; - if (item.InnerText.Contains(DS4KeyType.Toggle.ToString())) - keyType |= DS4KeyType.Toggle; - if (item.InnerText.Contains(DS4KeyType.Macro.ToString())) - keyType |= DS4KeyType.Macro; - if (item.InnerText.Contains(DS4KeyType.HoldMacro.ToString())) - keyType |= DS4KeyType.HoldMacro; - if (item.InnerText.Contains(DS4KeyType.Unbound.ToString())) - keyType |= DS4KeyType.Unbound; - if (keyType != DS4KeyType.None) - customMapKeyTypes.Add(getDS4ControlsByName(item.Name), keyType); + //bool foundBinding = false; + Item = m_Xdoc.SelectSingleNode(String.Format("/ScpControl/Control/KeyType/{0}", button.Name)); + if (Item != null) + { + //foundBinding = true; + keyType = DS4KeyType.None; + if (Item.InnerText.Contains(DS4KeyType.Unbound.ToString())) + { + keyType = DS4KeyType.Unbound; + button.Tag = "Unbound"; + button.Text = "Unbound"; + } + else + { + bool SC = Item.InnerText.Contains(DS4KeyType.ScanCode.ToString()); + bool TG = Item.InnerText.Contains(DS4KeyType.Toggle.ToString()); + bool MC = Item.InnerText.Contains(DS4KeyType.Macro.ToString()); + bool MR = Item.InnerText.Contains(DS4KeyType.HoldMacro.ToString()); + button.Font = new Font(button.Font, + (SC ? FontStyle.Bold : FontStyle.Regular) | (TG ? FontStyle.Italic : FontStyle.Regular) | + (MC ? FontStyle.Underline : FontStyle.Regular) | (MR ? FontStyle.Strikeout : FontStyle.Regular)); + if (Item.InnerText.Contains(DS4KeyType.ScanCode.ToString())) + keyType |= DS4KeyType.ScanCode; + if (Item.InnerText.Contains(DS4KeyType.Toggle.ToString())) + keyType |= DS4KeyType.Toggle; + if (Item.InnerText.Contains(DS4KeyType.Macro.ToString())) + keyType |= DS4KeyType.Macro; + } + if (keyType != DS4KeyType.None) + customMapKeyTypes.Add(getDS4ControlsByName(Item.Name), keyType); + } + + Item = m_Xdoc.SelectSingleNode(String.Format("/ScpControl/Control/Macro/{0}", button.Name)); + if (Item != null) + { + string[] splitter = Item.InnerText.Split('/'); + int[] keys = new int[splitter.Length]; + for (int i = 0; i < keys.Length; i++) + { + keys[i] = int.Parse(splitter[i]); + if (keys[i] < 255) splitter[i] = ((System.Windows.Forms.Keys)keys[i]).ToString(); + else if (keys[i] == 256) splitter[i] = "Left Mouse Button"; + else if (keys[i] == 257) splitter[i] = "Right Mouse Button"; + else if (keys[i] == 258) splitter[i] = "Middle Mouse Button"; + else if (keys[i] == 259) splitter[i] = "4th Mouse Button"; + else if (keys[i] == 260) splitter[i] = "5th Mouse Button"; + else if (keys[i] > 300) splitter[i] = "Wait " + (keys[i] - 300) + "ms"; + } + button.Text = "Macro"; + button.Tag = keys; + customMapMacros.Add(getDS4ControlsByName(button.Name), Item.InnerText); + } + else if (m_Xdoc.SelectSingleNode(String.Format("/ScpControl/Control/Key/{0}", button.Name)) != null) + { + Item = m_Xdoc.SelectSingleNode(String.Format("/ScpControl/Control/Key/{0}", button.Name)); + if (UInt16.TryParse(Item.InnerText, out wvk)) + { + //foundBinding = true; + customMapKeys.Add(getDS4ControlsByName(Item.Name), wvk); + button.Tag = wvk; + button.Text = ((System.Windows.Forms.Keys)wvk).ToString(); + } + } + else + { + Item = m_Xdoc.SelectSingleNode(String.Format("/ScpControl/Control/Button/{0}", button.Name)); + if (Item != null) + { + //foundBinding = true; + button.Tag = Item.InnerText; + button.Text = Item.InnerText; + customMapButtons.Add(getDS4ControlsByName(button.Name), getX360ControlsByName(Item.InnerText)); + } + } } + catch + { + + } + } } } catch { Loaded = false; } diff --git a/DS4Tool/Options.Designer.cs b/DS4Tool/Options.Designer.cs index cee5594..a7ec677 100644 --- a/DS4Tool/Options.Designer.cs +++ b/DS4Tool/Options.Designer.cs @@ -121,9 +121,6 @@ this.lowBatteryPanel = new System.Windows.Forms.Panel(); this.SixaxisPanel = new System.Windows.Forms.Panel(); this.bnGyroZP = new System.Windows.Forms.Button(); - this.lBProfileTip = new System.Windows.Forms.Label(); - this.tBProfile = new System.Windows.Forms.TextBox(); - this.btnSaveProfile = new System.Windows.Forms.Button(); this.lbRS = new System.Windows.Forms.Label(); this.lbLS = new System.Windows.Forms.Label(); this.nUDRS = new System.Windows.Forms.NumericUpDown(); @@ -147,12 +144,17 @@ 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.lbSixaxisX = new System.Windows.Forms.Label(); + this.lbSixaxisZ = new System.Windows.Forms.Label(); + this.nUDSZ = new System.Windows.Forms.NumericUpDown(); + this.nUDSX = new System.Windows.Forms.NumericUpDown(); this.bnGyroXP = new System.Windows.Forms.Button(); this.bnGyroXN = new System.Windows.Forms.Button(); this.bnGyroZN = new System.Windows.Forms.Button(); this.fLPTiltControls = new System.Windows.Forms.FlowLayoutPanel(); + this.label2 = new System.Windows.Forms.Label(); this.advColorDialog = new ScpServer.AdvancedColorDialog(); + this.cBMouseAccel = new System.Windows.Forms.CheckBox(); this.MainPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pBController)).BeginInit(); this.SticksPanel.SuspendLayout(); @@ -193,6 +195,8 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDflashLED)).BeginInit(); this.gBRumble.SuspendLayout(); this.gBDeadzone.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSZ)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSX)).BeginInit(); this.fLPTiltControls.SuspendLayout(); this.SuspendLayout(); // @@ -899,7 +903,7 @@ // lBControlTip // this.lBControlTip.AutoSize = true; - this.lBControlTip.Location = new System.Drawing.Point(25, 3); + this.lBControlTip.Location = new System.Drawing.Point(25, 7); this.lBControlTip.Name = "lBControlTip"; this.lBControlTip.Size = new System.Drawing.Size(219, 26); this.lBControlTip.TabIndex = 181; @@ -1086,7 +1090,7 @@ this.cBDoubleTap.AutoSize = true; this.cBDoubleTap.Checked = true; this.cBDoubleTap.CheckState = System.Windows.Forms.CheckState.Checked; - this.cBDoubleTap.Location = new System.Drawing.Point(357, 17); + this.cBDoubleTap.Location = new System.Drawing.Point(349, 16); this.cBDoubleTap.Name = "cBDoubleTap"; this.cBDoubleTap.RightToLeft = System.Windows.Forms.RightToLeft.No; this.cBDoubleTap.Size = new System.Drawing.Size(82, 17); @@ -1100,7 +1104,7 @@ this.cBTap.AutoSize = true; this.cBTap.Checked = true; this.cBTap.CheckState = System.Windows.Forms.CheckState.Checked; - this.cBTap.Location = new System.Drawing.Point(326, 47); + this.cBTap.Location = new System.Drawing.Point(318, 46); this.cBTap.Name = "cBTap"; this.cBTap.RightToLeft = System.Windows.Forms.RightToLeft.Yes; this.cBTap.Size = new System.Drawing.Size(45, 17); @@ -1111,7 +1115,7 @@ // // nUDTap // - this.nUDTap.Location = new System.Drawing.Point(377, 46); + this.nUDTap.Location = new System.Drawing.Point(369, 45); this.nUDTap.Maximum = new decimal(new int[] { 200, 0, @@ -1132,7 +1136,7 @@ this.cBScroll.AutoSize = true; this.cBScroll.Checked = true; this.cBScroll.CheckState = System.Windows.Forms.CheckState.Checked; - this.cBScroll.Location = new System.Drawing.Point(180, 48); + this.cBScroll.Location = new System.Drawing.Point(169, 47); this.cBScroll.Name = "cBScroll"; this.cBScroll.RightToLeft = System.Windows.Forms.RightToLeft.Yes; this.cBScroll.Size = new System.Drawing.Size(52, 17); @@ -1157,7 +1161,7 @@ // // nUDScroll // - this.nUDScroll.Location = new System.Drawing.Point(234, 46); + this.nUDScroll.Location = new System.Drawing.Point(227, 45); this.nUDScroll.Maximum = new decimal(new int[] { 10, 0, @@ -1209,7 +1213,7 @@ // cBlowerRCOn // this.cBlowerRCOn.AutoSize = true; - this.cBlowerRCOn.Location = new System.Drawing.Point(218, 10); + this.cBlowerRCOn.Location = new System.Drawing.Point(182, 11); this.cBlowerRCOn.Name = "cBlowerRCOn"; this.cBlowerRCOn.RightToLeft = System.Windows.Forms.RightToLeft.No; this.cBlowerRCOn.Size = new System.Drawing.Size(100, 30); @@ -1223,7 +1227,7 @@ this.cBTouchpadJitterCompensation.AutoSize = true; this.cBTouchpadJitterCompensation.Checked = true; this.cBTouchpadJitterCompensation.CheckState = System.Windows.Forms.CheckState.Checked; - this.cBTouchpadJitterCompensation.Location = new System.Drawing.Point(42, 17); + this.cBTouchpadJitterCompensation.Location = new System.Drawing.Point(12, 18); this.cBTouchpadJitterCompensation.Name = "cBTouchpadJitterCompensation"; this.cBTouchpadJitterCompensation.RightToLeft = System.Windows.Forms.RightToLeft.No; this.cBTouchpadJitterCompensation.Size = new System.Drawing.Size(118, 17); @@ -1244,7 +1248,7 @@ // lBR2 // this.lBR2.AutoSize = true; - this.lBR2.Location = new System.Drawing.Point(109, 17); + this.lBR2.Location = new System.Drawing.Point(88, 17); this.lBR2.Name = "lBR2"; this.lBR2.Size = new System.Drawing.Size(21, 13); this.lBR2.TabIndex = 197; @@ -1281,7 +1285,7 @@ 0, 0, 65536}); - this.nUDR2.Location = new System.Drawing.Point(133, 15); + this.nUDR2.Location = new System.Drawing.Point(111, 15); this.nUDR2.Maximum = new decimal(new int[] { 1, 0, @@ -1332,11 +1336,12 @@ // leftMotorLabel // this.leftMotorLabel.AutoSize = true; - this.leftMotorLabel.Location = new System.Drawing.Point(8, 45); + this.leftMotorLabel.Location = new System.Drawing.Point(763, 208); this.leftMotorLabel.Name = "leftMotorLabel"; - this.leftMotorLabel.Size = new System.Drawing.Size(25, 13); + this.leftMotorLabel.Size = new System.Drawing.Size(13, 13); this.leftMotorLabel.TabIndex = 209; - this.leftMotorLabel.Text = "Left"; + this.leftMotorLabel.Text = "L"; + this.leftMotorLabel.Visible = false; // // tBsixaxisAccelX // @@ -1353,11 +1358,12 @@ // rightMotorLabel // this.rightMotorLabel.AutoSize = true; - this.rightMotorLabel.Location = new System.Drawing.Point(111, 45); + this.rightMotorLabel.Location = new System.Drawing.Point(674, 207); this.rightMotorLabel.Name = "rightMotorLabel"; - this.rightMotorLabel.Size = new System.Drawing.Size(32, 13); + this.rightMotorLabel.Size = new System.Drawing.Size(15, 13); this.rightMotorLabel.TabIndex = 208; - this.rightMotorLabel.Text = "Right"; + this.rightMotorLabel.Text = "R"; + this.rightMotorLabel.Visible = false; // // tBsixaxisGyroZ // @@ -1374,11 +1380,12 @@ // rumbleBoostLabel // this.rumbleBoostLabel.AutoSize = true; - this.rumbleBoostLabel.Location = new System.Drawing.Point(8, 17); + this.rumbleBoostLabel.Location = new System.Drawing.Point(842, 212); this.rumbleBoostLabel.Name = "rumbleBoostLabel"; this.rumbleBoostLabel.Size = new System.Drawing.Size(34, 13); this.rumbleBoostLabel.TabIndex = 207; this.rumbleBoostLabel.Text = "Boost"; + this.rumbleBoostLabel.Visible = false; // // tBsixaxisGyroY // @@ -1406,14 +1413,14 @@ // // nUDRumbleBoost // - this.nUDRumbleBoost.Location = new System.Drawing.Point(46, 14); + this.nUDRumbleBoost.Location = new System.Drawing.Point(14, 15); this.nUDRumbleBoost.Maximum = new decimal(new int[] { - 200, + 150, 0, 0, 0}); this.nUDRumbleBoost.Name = "nUDRumbleBoost"; - this.nUDRumbleBoost.Size = new System.Drawing.Size(52, 20); + this.nUDRumbleBoost.Size = new System.Drawing.Size(43, 20); this.nUDRumbleBoost.TabIndex = 211; this.nUDRumbleBoost.Value = new decimal(new int[] { 100, @@ -1433,15 +1440,16 @@ // // nUDHeavyRumble // - this.nUDHeavyRumble.Location = new System.Drawing.Point(149, 43); + this.nUDHeavyRumble.Location = new System.Drawing.Point(695, 205); this.nUDHeavyRumble.Maximum = new decimal(new int[] { 255, 0, 0, 0}); this.nUDHeavyRumble.Name = "nUDHeavyRumble"; - this.nUDHeavyRumble.Size = new System.Drawing.Size(52, 20); + this.nUDHeavyRumble.Size = new System.Drawing.Size(43, 20); this.nUDHeavyRumble.TabIndex = 212; + this.nUDHeavyRumble.Visible = false; this.nUDHeavyRumble.ValueChanged += new System.EventHandler(this.numUDHeavyRumble_ValueChanged); // // lB6Gryo @@ -1456,22 +1464,23 @@ // // nUDLightRumble // - this.nUDLightRumble.Location = new System.Drawing.Point(46, 43); + this.nUDLightRumble.Location = new System.Drawing.Point(782, 205); this.nUDLightRumble.Maximum = new decimal(new int[] { 255, 0, 0, 0}); this.nUDLightRumble.Name = "nUDLightRumble"; - this.nUDLightRumble.Size = new System.Drawing.Size(52, 20); + this.nUDLightRumble.Size = new System.Drawing.Size(43, 20); this.nUDLightRumble.TabIndex = 213; + this.nUDLightRumble.Visible = false; this.nUDLightRumble.ValueChanged += new System.EventHandler(this.numUDLightRumble_ValueChanged); // // btnRumbleTest // - this.btnRumbleTest.Location = new System.Drawing.Point(161, 11); + this.btnRumbleTest.Location = new System.Drawing.Point(14, 39); this.btnRumbleTest.Name = "btnRumbleTest"; - this.btnRumbleTest.Size = new System.Drawing.Size(41, 23); + this.btnRumbleTest.Size = new System.Drawing.Size(64, 23); this.btnRumbleTest.TabIndex = 214; this.btnRumbleTest.Text = "Test"; this.btnRumbleTest.UseVisualStyleBackColor = true; @@ -1624,44 +1633,10 @@ this.bnGyroZP.UseVisualStyleBackColor = true; this.bnGyroZP.Click += new System.EventHandler(this.Show_ControlsBn); // - // lBProfileTip - // - this.lBProfileTip.AutoSize = true; - 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(85, 299); - this.tBProfile.Name = "tBProfile"; - this.tBProfile.Size = new System.Drawing.Size(185, 20); - this.tBProfile.TabIndex = 238; - this.tBProfile.Text = ""; - 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(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); - // // lbRS // this.lbRS.AutoSize = true; - this.lbRS.Location = new System.Drawing.Point(110, 46); + this.lbRS.Location = new System.Drawing.Point(88, 46); this.lbRS.Name = "lbRS"; this.lbRS.Size = new System.Drawing.Size(22, 13); this.lbRS.TabIndex = 197; @@ -1684,7 +1659,7 @@ 0, 0, 65536}); - this.nUDRS.Location = new System.Drawing.Point(133, 43); + this.nUDRS.Location = new System.Drawing.Point(111, 43); this.nUDRS.Maximum = new decimal(new int[] { 1, 0, @@ -1767,13 +1742,14 @@ this.gBTouchpad.Controls.Add(this.cBScroll); this.gBTouchpad.Location = new System.Drawing.Point(440, 220); this.gBTouchpad.Name = "gBTouchpad"; - this.gBTouchpad.Size = new System.Drawing.Size(438, 70); + this.gBTouchpad.Size = new System.Drawing.Size(437, 70); this.gBTouchpad.TabIndex = 246; this.gBTouchpad.TabStop = false; this.gBTouchpad.Text = "Touchpad"; // // gBOther // + this.gBOther.Controls.Add(this.cBMouseAccel); this.gBOther.Controls.Add(this.nUDSixaxis); this.gBOther.Controls.Add(this.cBControllerInput); this.gBOther.Controls.Add(this.nUDIdleDisconnect); @@ -1963,16 +1939,12 @@ // // gBRumble // - this.gBRumble.Controls.Add(this.rumbleBoostLabel); - this.gBRumble.Controls.Add(this.nUDHeavyRumble); + this.gBRumble.Controls.Add(this.label2); this.gBRumble.Controls.Add(this.btnRumbleTest); - this.gBRumble.Controls.Add(this.leftMotorLabel); - this.gBRumble.Controls.Add(this.nUDLightRumble); - this.gBRumble.Controls.Add(this.rightMotorLabel); this.gBRumble.Controls.Add(this.nUDRumbleBoost); this.gBRumble.Location = new System.Drawing.Point(442, 3); this.gBRumble.Name = "gBRumble"; - this.gBRumble.Size = new System.Drawing.Size(213, 67); + this.gBRumble.Size = new System.Drawing.Size(89, 67); this.gBRumble.TabIndex = 247; this.gBRumble.TabStop = false; this.gBRumble.Text = "Rumble"; @@ -1981,30 +1953,89 @@ // this.gBDeadzone.Controls.Add(this.lBL2); this.gBDeadzone.Controls.Add(this.nUDL2); + this.gBDeadzone.Controls.Add(this.lbSixaxisX); + this.gBDeadzone.Controls.Add(this.lbSixaxisZ); this.gBDeadzone.Controls.Add(this.lBR2); this.gBDeadzone.Controls.Add(this.lbRS); + this.gBDeadzone.Controls.Add(this.nUDSZ); this.gBDeadzone.Controls.Add(this.lbLS); + this.gBDeadzone.Controls.Add(this.nUDSX); this.gBDeadzone.Controls.Add(this.nUDRS); this.gBDeadzone.Controls.Add(this.nUDR2); this.gBDeadzone.Controls.Add(this.nUDLS); - this.gBDeadzone.Location = new System.Drawing.Point(684, 3); + this.gBDeadzone.Location = new System.Drawing.Point(598, 2); this.gBDeadzone.Name = "gBDeadzone"; - this.gBDeadzone.Size = new System.Drawing.Size(194, 67); + this.gBDeadzone.Size = new System.Drawing.Size(282, 67); this.gBDeadzone.TabIndex = 248; this.gBDeadzone.TabStop = false; this.gBDeadzone.Text = "Deadzone"; // - // btnCancel + // lbSixaxisX // - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - 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); + this.lbSixaxisX.AutoSize = true; + this.lbSixaxisX.Location = new System.Drawing.Point(168, 16); + this.lbSixaxisX.Name = "lbSixaxisX"; + this.lbSixaxisX.Size = new System.Drawing.Size(49, 13); + this.lbSixaxisX.TabIndex = 197; + this.lbSixaxisX.Text = "Sixaxis X"; + // + // lbSixaxisZ + // + this.lbSixaxisZ.AutoSize = true; + this.lbSixaxisZ.Location = new System.Drawing.Point(168, 45); + this.lbSixaxisZ.Name = "lbSixaxisZ"; + this.lbSixaxisZ.Size = new System.Drawing.Size(49, 13); + this.lbSixaxisZ.TabIndex = 197; + this.lbSixaxisZ.Text = "Sixaxis Z"; + // + // nUDSZ + // + this.nUDSZ.DecimalPlaces = 2; + this.nUDSZ.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.nUDSZ.Location = new System.Drawing.Point(223, 43); + this.nUDSZ.Maximum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSZ.Name = "nUDSZ"; + this.nUDSZ.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.nUDSZ.Size = new System.Drawing.Size(50, 20); + this.nUDSZ.TabIndex = 203; + this.nUDSZ.Value = new decimal(new int[] { + 25, + 0, + 0, + 131072}); + this.nUDSZ.ValueChanged += new System.EventHandler(this.nUDSZ_ValueChanged); + // + // nUDSX + // + this.nUDSX.DecimalPlaces = 2; + this.nUDSX.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.nUDSX.Location = new System.Drawing.Point(223, 14); + this.nUDSX.Maximum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSX.Name = "nUDSX"; + this.nUDSX.Size = new System.Drawing.Size(50, 20); + this.nUDSX.TabIndex = 202; + this.nUDSX.Value = new decimal(new int[] { + 25, + 0, + 0, + 131072}); + this.nUDSX.ValueChanged += new System.EventHandler(this.nUDSX_ValueChanged); // // bnGyroXP // @@ -2047,36 +2078,56 @@ this.fLPTiltControls.Size = new System.Drawing.Size(350, 31); this.fLPTiltControls.TabIndex = 252; // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(63, 17); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(15, 13); + this.label2.TabIndex = 207; + this.label2.Text = "%"; + // // advColorDialog // this.advColorDialog.AnyColor = true; this.advColorDialog.Color = System.Drawing.Color.Blue; this.advColorDialog.FullOpen = true; // + // cBMouseAccel + // + this.cBMouseAccel.AutoSize = true; + this.cBMouseAccel.Location = new System.Drawing.Point(161, 17); + this.cBMouseAccel.Name = "cBMouseAccel"; + this.cBMouseAccel.Size = new System.Drawing.Size(85, 17); + this.cBMouseAccel.TabIndex = 251; + this.cBMouseAccel.Text = "Acceleration"; + this.cBMouseAccel.UseVisualStyleBackColor = true; + this.cBMouseAccel.CheckedChanged += new System.EventHandler(this.cBMouseAccel_CheckedChanged); + // // Options // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.BackColor = System.Drawing.Color.White; - this.CancelButton = this.btnCancel; this.ClientSize = new System.Drawing.Size(888, 295); - this.Controls.Add(this.btnCancel); + this.Controls.Add(this.rumbleBoostLabel); + this.Controls.Add(this.nUDHeavyRumble); this.Controls.Add(this.lB6Gryo); this.Controls.Add(this.gBDeadzone); + this.Controls.Add(this.leftMotorLabel); this.Controls.Add(this.gBRumble); + this.Controls.Add(this.nUDLightRumble); + this.Controls.Add(this.rightMotorLabel); this.Controls.Add(this.gBLightbar); this.Controls.Add(this.gBTouchpad); - this.Controls.Add(this.lBProfileTip); - this.Controls.Add(this.tBProfile); - this.Controls.Add(this.btnSaveProfile); this.Controls.Add(this.lBControlTip); this.Controls.Add(this.lBControls); this.Controls.Add(this.MainPanel); this.Controls.Add(this.SticksPanel); this.Controls.Add(this.gBOther); - this.Controls.Add(this.fLPTiltControls); this.Controls.Add(this.SixaxisPanel); + this.Controls.Add(this.fLPTiltControls); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; @@ -2132,6 +2183,8 @@ this.gBRumble.PerformLayout(); this.gBDeadzone.ResumeLayout(false); this.gBDeadzone.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSZ)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSX)).EndInit(); this.fLPTiltControls.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -2234,9 +2287,6 @@ private System.Windows.Forms.Panel lowBatteryPanel; private System.Windows.Forms.Panel FullPanel; private System.Windows.Forms.Panel SixaxisPanel; - private System.Windows.Forms.Label lBProfileTip; - private System.Windows.Forms.TextBox tBProfile; - private System.Windows.Forms.Button btnSaveProfile; private System.Windows.Forms.Label lBControlTip; private System.Windows.Forms.Label lbRS; private System.Windows.Forms.Label lbLS; @@ -2250,7 +2300,6 @@ private System.Windows.Forms.GroupBox gBRumble; private System.Windows.Forms.GroupBox gBDeadzone; private System.Windows.Forms.CheckBox cBControllerInput; - private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.NumericUpDown nUDSixaxis; private System.Windows.Forms.NumericUpDown nUDflashLED; private System.Windows.Forms.Label label1; @@ -2267,6 +2316,12 @@ private System.Windows.Forms.Button bnGyroZP; private System.Windows.Forms.Button bnGyroZN; private System.Windows.Forms.FlowLayoutPanel fLPTiltControls; + private System.Windows.Forms.Label lbSixaxisX; + private System.Windows.Forms.Label lbSixaxisZ; + private System.Windows.Forms.NumericUpDown nUDSZ; + private System.Windows.Forms.NumericUpDown nUDSX; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.CheckBox cBMouseAccel; } }  \ No newline at end of file diff --git a/DS4Tool/Options.cs b/DS4Tool/Options.cs index dea02e3..7a8831b 100644 --- a/DS4Tool/Options.cs +++ b/DS4Tool/Options.cs @@ -39,7 +39,6 @@ namespace ScpServer { Global.setAProfile(4, name); Global.LoadProfile(deviceNum); - tBProfile.Text = filename; DS4Color color = Global.loadColor(device); redBar.Value = color.red; greenBar.Value = color.green; @@ -104,6 +103,8 @@ namespace ScpServer } nUDLS.Value = Math.Round((decimal)(Global.getLSDeadzone(device) / 127d ), 3); nUDRS.Value = Math.Round((decimal)(Global.getRSDeadzone(device) / 127d ), 3); + nUDSX.Value = (decimal)Global.getSXDeadzone(device); + nUDSZ.Value = (decimal)Global.getSZDeadzone(device); } else Set(); @@ -275,26 +276,13 @@ namespace ScpServer Global.setLSDeadzone(device, (byte)Math.Round((nUDLS.Value * 127), 0)); Global.setButtonMouseSensitivity(device, (int)numUDMouseSens.Value); Global.setFlashAt(device, (int)nUDflashLED.Value); + Global.setSXDeadzone(device, (double)nUDSX.Value); + Global.setSZDeadzone(device, (double)nUDSZ.Value); + Global.setMouseAccel(device, cBMouseAccel.Checked); if (nUDRainbow.Value == 0) pBRainbow.Image = greyscale; else pBRainbow.Image = colored; } - private void saveButton_Click(object sender, EventArgs e) - { - Set(); - - if (tBProfile.Text != null && tBProfile.Text != "" && !tBProfile.Text.Contains("\\") && !tBProfile.Text.Contains("/") && !tBProfile.Text.Contains(":") && !tBProfile.Text.Contains("*") && !tBProfile.Text.Contains("?") && !tBProfile.Text.Contains("\"") && !tBProfile.Text.Contains("<") && !tBProfile.Text.Contains(">") && !tBProfile.Text.Contains("|")) - { - System.IO.File.Delete(Global.appdatapath + @"\Profiles\" + filename + ".xml"); - Global.setAProfile(device, tBProfile.Text); - Global.SaveProfile(device, tBProfile.Text, buttons.ToArray()); - Global.Save(); - this.Close(); - } - else - MessageBox.Show("Please enter a valid name", "Not valid", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - } - KBM360 kbm360 = null; private void Show_ControlsBn(object sender, EventArgs e) @@ -556,7 +544,7 @@ namespace ScpServer { if (((Button)sender).Text == "Test") { - scpDevice.setRumble((byte)nUDHeavyRumble.Value, (byte)nUDLightRumble.Value, (int)nUDSixaxis.Value - 1); + scpDevice.setRumble(255, 255, (int)nUDSixaxis.Value - 1); ((Button)sender).Text = "Stop"; } else @@ -629,26 +617,6 @@ namespace ScpServer sixaxisTimer.Stop(); } - private void tBProfile_TextChanged(object sender, EventArgs e) - { - if (tBProfile.Text != null && tBProfile.Text != "" && !tBProfile.Text.Contains("\\") && !tBProfile.Text.Contains("/") && !tBProfile.Text.Contains(":") && !tBProfile.Text.Contains("*") && !tBProfile.Text.Contains("?") && !tBProfile.Text.Contains("\"") && !tBProfile.Text.Contains("<") && !tBProfile.Text.Contains(">") && !tBProfile.Text.Contains("|")) - tBProfile.ForeColor = System.Drawing.SystemColors.WindowText; - else - tBProfile.ForeColor = System.Drawing.SystemColors.GrayText; - } - - private void tBProfile_Enter(object sender, EventArgs e) - { - if (tBProfile.Text == "") - tBProfile.Text = ""; - } - - private void tBProfile_Leave(object sender, EventArgs e) - { - if (tBProfile.Text == "") - tBProfile.Text = ""; - } - private void cBSlide_CheckedChanged(object sender, EventArgs e) { if (cBSlide.Checked) @@ -682,12 +650,6 @@ namespace ScpServer Global.setDoubleTap(device, cBDoubleTap.Checked); } - private void tbProfile_EnterDown(object sender, KeyEventArgs e) - { - if (e.KeyValue == 13) - saveButton_Click(sender, e); - } - public void UpdateLists() { lBControls.Items[0] = "Cross : " + bnCross.Text; @@ -869,6 +831,16 @@ namespace ScpServer Global.setRightTriggerMiddle(device, (byte)(nUDR2.Value * 255)); } + private void nUDSX_ValueChanged(object sender, EventArgs e) + { + Global.setSXDeadzone(device, (double)nUDSX.Value); + } + + private void nUDSZ_ValueChanged(object sender, EventArgs e) + { + Global.setSZDeadzone(device, (double)nUDSZ.Value); + } + Image L = Properties.Resources.LeftTouch; Image R = Properties.Resources.RightTouch; Image M = Properties.Resources.MultiTouch; @@ -971,5 +943,10 @@ namespace ScpServer else sixaxisTimer.Stop(); } + + private void cBMouseAccel_CheckedChanged(object sender, EventArgs e) + { + Global.setMouseAccel(device, cBMouseAccel.Checked); + } } } diff --git a/DS4Tool/ScpForm.Designer.cs b/DS4Tool/ScpForm.Designer.cs index 4e790b2..ce81bf6 100644 --- a/DS4Tool/ScpForm.Designer.cs +++ b/DS4Tool/ScpForm.Designer.cs @@ -320,9 +320,9 @@ // this.tabMain.Controls.Add(this.tabControllers); this.tabMain.Controls.Add(this.tabProfiles); - this.tabMain.Controls.Add(this.tabLog); 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; diff --git a/DS4Tool/ScpForm.cs b/DS4Tool/ScpForm.cs index bb2b138..2d7018b 100644 --- a/DS4Tool/ScpForm.cs +++ b/DS4Tool/ScpForm.cs @@ -13,11 +13,12 @@ using Microsoft.Win32; using System.Diagnostics; using System.Xml; using System.Text; +using System.Globalization; namespace ScpServer { public partial class ScpForm : Form { - double version = 10.6; + double version = 10.65; private DS4Control.Control rootHub; delegate void LogDebugDelegate(DateTime Time, String Data); @@ -125,18 +126,18 @@ namespace ScpServer protected void Form_Load(object sender, EventArgs e) { SetupArrays(); - if (File.Exists(exepath + "\\Profiles.xml") - && File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool\\Profiles.xml")) + if (File.Exists(exepath + "\\Auto Profiles.xml") + && File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool\\Auto Profiles.xml")) new SaveWhere(true).ShowDialog(); - else if (File.Exists(exepath + "\\Profiles.xml")) + else if (File.Exists(exepath + "\\Auto Profiles.xml")) Global.SaveWhere(exepath); - else if (File.Exists(appdatapath + "\\Profiles.xml")) + else if (File.Exists(appdatapath + "\\Auto Profiles.xml")) Global.SaveWhere(appdatapath); - else if (!File.Exists(exepath + "\\Profiles.xml") - && !File.Exists(appdatapath + "\\Profiles.xml")) + else if (!File.Exists(exepath + "\\Auto Profiles.xml") + && !File.Exists(appdatapath + "\\Auto Profiles.xml")) { - new WelcomeDialog().ShowDialog(); new SaveWhere(false).ShowDialog(); + MessageBox.Show("If you haven't installed the Virtual Bus driver, go to Settings and \"Controller Setup\"", "Welcome to DS4Windows"); } @@ -257,7 +258,7 @@ namespace ScpServer private void test_Tick(object sender, EventArgs e) { lBTest.Visible = true; - lBTest.Text = rootHub.getDS4StateMapped(0).LY.ToString(); + lBTest.Text = Mapping.mouseaccel[18]+""; } void Hotkeys(object sender, EventArgs e) { @@ -394,7 +395,7 @@ namespace ScpServer double newversion; try { - if (double.TryParse(File.ReadAllText(Global.appdatapath + "\\version.txt"), out newversion)) + if (double.TryParse(File.ReadAllText(Global.appdatapath + "\\version.txt"), NumberStyles.Any, CultureInfo.InvariantCulture, out newversion)) if (newversion > version) if (MessageBox.Show("Download Version " + newversion + " now?", "DS4Windows Update Available!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { @@ -571,11 +572,6 @@ namespace ScpServer this.Show(); this.ShowInTaskbar = true; } - //Added last message alternative - - /*if (this.Height > 220) - lbLastMessage.Visible = tabMain.SelectedIndex != 2; - else lbLastMessage.Visible = true;*/ } protected void btnStartStop_Click(object sender, EventArgs e) @@ -1029,7 +1025,7 @@ namespace ScpServer private void tabMain_SelectedIndexChanged(object sender, EventArgs e) { - lbLastMessage.Visible = tabMain.SelectedIndex != 2; + lbLastMessage.Visible = tabMain.SelectedIndex != 4; if (opt != null) if (tabMain.SelectedIndex != 1) opt.inputtimer.Stop(); @@ -1217,7 +1213,7 @@ namespace ScpServer double newversion; try { - if (double.TryParse(File.ReadAllText(Global.appdatapath + "\\version.txt"), out newversion)) + if (double.TryParse(File.ReadAllText(Global.appdatapath + "\\version.txt"), NumberStyles.Any, CultureInfo.InvariantCulture, out newversion)) if (newversion > Global.getVersion()) if (MessageBox.Show("Download Version " + newversion + " now?", "DS4Windows Update Available!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { diff --git a/DS4Tool/ScpForm.resx b/DS4Tool/ScpForm.resx index 4d873fc..2d94c63 100644 --- a/DS4Tool/ScpForm.resx +++ b/DS4Tool/ScpForm.resx @@ -117,6 +117,19 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Time + + + + 147 + + + Data + + + 145 + Fill @@ -129,9 +142,8 @@ 3, 3 - 780, 284 + 660, 250 - 0 @@ -147,93 +159,9 @@ 0 - - Time - - - 147 - - - Data - - - 145 - 17, 17 - - lBTest - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlButton - - - 0 - - - btnStartStop - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlButton - - - 1 - - - lbLastMessage - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlButton - - - 2 - - - llbHelp - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlButton - - - 3 - - - Bottom - - - 0, 162 - - - 424, 30 - - - 10 - - - pnlButton - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - Bottom, Right @@ -241,7 +169,7 @@ True - 170, 9 + 420, 9 98, 13 @@ -271,7 +199,7 @@ Bottom, Right - 359, 4 + 609, 4 58, 23 @@ -301,7 +229,7 @@ 4, 9 - 264, 18 + 514, 18 41 @@ -325,7 +253,7 @@ True - 274, 9 + 524, 9 79, 13 @@ -348,6 +276,30 @@ 3 + + Bottom + + + 0, 305 + + + 674, 30 + + + 10 + + + pnlButton + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + None @@ -355,7 +307,7 @@ True - 669, 30 + 74, 56 73, 13 @@ -475,10 +427,10 @@ False - 3, 287 + 3, 253 - 780, 23 + 660, 23 9 @@ -507,6 +459,48 @@ 339, 17 + + 214, 22 + + + Edit Profile for Controller 1 + + + 214, 22 + + + Edit Profile for Controller 2 + + + 214, 22 + + + Edit Profile for Controller 3 + + + 214, 22 + + + Edit Profile for Controller 4 + + + 211, 6 + + + Segoe UI, 9pt, style=Bold + + + 214, 22 + + + Open + + + 214, 22 + + + Exit (Middle Mouse) + 215, 142 @@ -6694,48 +6688,6 @@ True - - 214, 22 - - - Edit Profile for Controller 1 - - - 214, 22 - - - Edit Profile for Controller 2 - - - 214, 22 - - - Edit Profile for Controller 3 - - - 214, 22 - - - Edit Profile for Controller 4 - - - 211, 6 - - - Segoe UI, 9pt, style=Bold - - - 214, 22 - - - Open - - - 214, 22 - - - Exit (Middle Mouse) - 211, 6 @@ -6808,7 +6760,7 @@ - 134, 19 + 285, 19 39, 20 @@ -6901,7 +6853,7 @@ Left - 375, 76 + 624, 76 37, 23 @@ -6928,7 +6880,7 @@ Left - 375, 105 + 624, 105 37, 23 @@ -7021,7 +6973,7 @@ None - 258, 19 + 507, 19 111, 21 @@ -7045,7 +6997,7 @@ Left - 375, 47 + 624, 47 37, 23 @@ -7072,7 +7024,7 @@ None - 258, 48 + 507, 48 111, 21 @@ -7096,7 +7048,7 @@ None - 258, 77 + 507, 77 111, 21 @@ -7120,7 +7072,7 @@ Left - 375, 18 + 624, 18 37, 23 @@ -7147,7 +7099,7 @@ None - 258, 106 + 507, 106 111, 21 @@ -7177,7 +7129,7 @@ Microsoft Sans Serif, 9pt, style=Bold - 259, 0 + 508, 0 109, 15 @@ -7243,7 +7195,7 @@ Microsoft Sans Serif, 9pt, style=Bold - 130, 0 + 281, 0 47, 15 @@ -7276,7 +7228,7 @@ Microsoft Sans Serif, 9pt, style=Bold - 197, 0 + 414, 0 51, 15 @@ -7309,7 +7261,7 @@ Microsoft Sans Serif, 9pt - 203, 22 + 420, 22 39, 15 @@ -7342,7 +7294,7 @@ Microsoft Sans Serif, 9pt - 203, 51 + 420, 51 39, 15 @@ -7375,7 +7327,7 @@ Microsoft Sans Serif, 9pt - 203, 80 + 420, 80 39, 15 @@ -7408,7 +7360,7 @@ Microsoft Sans Serif, 9pt - 203, 109 + 420, 109 39, 15 @@ -7491,7 +7443,7 @@ - 134, 48 + 285, 48 39, 20 @@ -7574,7 +7526,7 @@ - 134, 77 + 285, 77 39, 20 @@ -7657,7 +7609,7 @@ - 134, 106 + 285, 106 39, 20 @@ -7690,7 +7642,7 @@ 5 - 416, 130 + 666, 130 46 @@ -7714,7 +7666,7 @@ 4, 22 - 416, 136 + 666, 279 3 @@ -7734,231 +7686,9 @@ 0 - - 891, 17 - - - 568, 17 - - - lBProfiles - - - System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabProfiles - - - 0 - - - tSOptions - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabProfiles - - - 1 - - - toolStrip1 - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabProfiles - - - 2 - - - 4, 22 - - - 3, 3, 3, 3 - - - 786, 313 - - - 0 - - - Profiles - - - tabProfiles - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabMain - - - 1 - - - 4, 22 - - - 3, 3, 3, 3 - - - 786, 313 - - - 1 - - - Log - - - tabLog - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabMain - - - 2 - - - 4, 22 - - - 786, 313 - - - 2 - - - Auto Profiles - - - tabAutoProfiles - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabMain - - - 3 - - - flowLayoutPanel1 - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabSettings - - - 0 - - - 4, 22 - - - 3, 3, 3, 3 - - - 786, 313 - - - 4 - - - Settings - - - tabSettings - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabMain - - - 4 - - - Fill - - - 0, 0 - - - 424, 162 - - - 12 - - - tabMain - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - 788, 17 - - 189, 224 - - - cMProfile - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Fill - - - Microsoft Sans Serif, 9.75pt - - - 16 - - - 3, 53 - - - 780, 257 - - - 0 - - - lBProfiles - - - System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabProfiles - - - 0 - Segoe UI, 9pt, style=Bold @@ -8022,33 +7752,48 @@ Export + + 189, 224 + + + cMProfile + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Fill + + + Microsoft Sans Serif, 9.75pt + + + 16 + + + 3, 53 + + + 660, 223 + + + 0 + + + lBProfiles + + + System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabProfiles + + + 0 + 891, 17 - - 3, 28 - - - 780, 25 - - - 2 - - - toolStrip2 - - - tSOptions - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabProfiles - - - 1 - 82, 22 @@ -8079,33 +7824,33 @@ Cancel + + 3, 28 + + + 660, 25 + + + 2 + + + toolStrip2 + + + tSOptions + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabProfiles + + + 1 + 568, 17 - - 3, 3 - - - 780, 25 - - - 1 - - - toolStrip1 - - - toolStrip1 - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabProfiles - - - 2 - Magenta @@ -8225,140 +7970,83 @@ Export Selected Profile - - True - - - cBNotifications - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - flowLayoutPanel1 - - - 3 - - - cBUpdate - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - flowLayoutPanel1 - - - 4 - - - pNUpdate - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - flowLayoutPanel1 - - - 5 - - - cBSwipeProfiles - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - flowLayoutPanel1 - - - 6 - - - cBDisconnectBT - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - flowLayoutPanel1 - - - 7 - - - linkProfiles - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - flowLayoutPanel1 - - - 8 - - - lLBUpdate - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - flowLayoutPanel1 - - - 10 - - - linkUninstall - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - flowLayoutPanel1 - - - 11 - - - lLSetup - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - flowLayoutPanel1 - - - 12 - - - Fill - - + 3, 3 - - 780, 307 + + 660, 25 - + + 1 + + + toolStrip1 + + + toolStrip1 + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabProfiles + + + 2 + + + 4, 22 + + + 3, 3, 3, 3 + + + 666, 279 + + 0 - - flowLayoutPanel1 + + Profiles - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tabProfiles - - tabSettings + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + tabMain + + + 1 + + + 4, 22 + + + 666, 279 + + + 2 + + + Auto Profiles + + + tabAutoProfiles + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabMain + + + 2 + + + True True @@ -8417,66 +8105,6 @@ 4 - - cBUpdateTime - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pNUpdate - - - 0 - - - lBCheckEvery - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pNUpdate - - - 1 - - - nUDUpdateTime - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pNUpdate - - - 2 - - - False - - - 3, 26 - - - 189, 22 - - - 43 - - - pNUpdate - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - flowLayoutPanel1 - - - 5 - hours @@ -8558,6 +8186,30 @@ 2 + + False + + + 3, 26 + + + 189, 22 + + + 43 + + + pNUpdate + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flowLayoutPanel1 + + + 5 + None @@ -8625,7 +8277,7 @@ True - 598, 30 + 3, 56 65, 13 @@ -8652,7 +8304,7 @@ None - 3, 51 + 153, 51 116, 23 @@ -8682,7 +8334,7 @@ None - 125, 51 + 275, 51 106, 23 @@ -8715,7 +8367,7 @@ True - 237, 56 + 387, 56 82, 13 @@ -8738,6 +8390,108 @@ 12 + + Fill + + + 3, 3 + + + 660, 273 + + + 0 + + + flowLayoutPanel1 + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabSettings + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 666, 279 + + + 4 + + + Settings + + + tabSettings + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabMain + + + 3 + + + 4, 22 + + + 3, 3, 3, 3 + + + 666, 279 + + + 1 + + + Log + + + tabLog + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabMain + + + 4 + + + Fill + + + 0, 0 + + + 674, 305 + + + 12 + + + tabMain + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + 673, 17 @@ -8751,7 +8505,7 @@ 96, 96 - 424, 192 + 674, 335 440, 231