Different implementation of linked profile support

Related to issue #84.
This commit is contained in:
Travis Nickles 2017-10-19 14:16:09 -05:00
parent e07f902751
commit ad2b6eea25
5 changed files with 547 additions and 60 deletions

View File

@ -116,7 +116,15 @@ namespace DS4Windows
device.SyncChange += this.On_SyncChange;
device.SyncChange += DS4Devices.UpdateSerial;
device.SerialChange += this.On_SerialChange;
LoadProfile(i, false, this, false);
if (device.isValidSerial() && containsLinkedProfile(device.getMacAddress()))
{
ProfilePath[i] = getLinkedProfile(device.getMacAddress());
}
else
{
ProfilePath[i] = OlderProfilePath[i];
}
LoadProfile(i, false, this, false, false);
touchPad[i] = new Mouse(i, device);
device.LightBarColor = getMainColor(i);
@ -295,7 +303,16 @@ namespace DS4Windows
device.SyncChange += this.On_SyncChange;
device.SyncChange += DS4Devices.UpdateSerial;
device.SerialChange += this.On_SerialChange;
LoadProfile(i, false, this, false);
if (device.isValidSerial() && containsLinkedProfile(device.getMacAddress()))
{
ProfilePath[i] = getLinkedProfile(device.getMacAddress());
}
else
{
ProfilePath[i] = OlderProfilePath[i];
}
LoadProfile(i, false, this, false, false);
touchPad[Index] = new Mouse(Index, device);
device.LightBarColor = getMainColor(Index);
device.Report += this.On_Report;

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Reflection;
@ -235,8 +236,9 @@ namespace DS4Windows
public static string[] tempprofilename = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public static bool[] tempprofileDistance = new bool[5] { false, false, false, false, false };
public static bool[] useDInputOnly = new bool[5] { true, true, true, true, true };
public static bool[] linkedProfileCheck = new bool[4] { true, true, true, true };
public static X360Controls[] defaultButtonMapping = { X360Controls.None, X360Controls.LXNeg, X360Controls.LXPos,
public static X360Controls[] defaultButtonMapping = { X360Controls.None, X360Controls.LXNeg, X360Controls.LXPos,
X360Controls.LYNeg, X360Controls.LYPos, X360Controls.RXNeg, X360Controls.RXPos, X360Controls.RYNeg, X360Controls.RYPos,
X360Controls.LB, X360Controls.LT, X360Controls.LS, X360Controls.RB, X360Controls.RT, X360Controls.RS, X360Controls.X,
X360Controls.Y, X360Controls.B, X360Controls.A, X360Controls.DpadUp, X360Controls.DpadRight, X360Controls.DpadDown,
@ -266,6 +268,7 @@ namespace DS4Windows
appdatapath = path;
m_Config.m_Profile = appdatapath + "\\Profiles.xml";
m_Config.m_Actions = appdatapath + "\\Actions.xml";
m_Config.m_linkedProfiles = Global.appdatapath + "\\LinkedProfiles.xml";
}
/// <summary>
@ -885,6 +888,7 @@ namespace DS4Windows
public static string[] LaunchProgram => m_Config.launchProgram;
public static string[] ProfilePath => m_Config.profilePath;
public static string[] OlderProfilePath => m_Config.olderProfilePath;
public static bool[] DistanceProfiles = m_Config.distanceProfiles;
public static List<string>[] ProfileActions => m_Config.profileActions;
@ -1031,11 +1035,45 @@ namespace DS4Windows
return defaultButtonMapping[(int)dc];
}
public static bool containsLinkedProfile(string serial)
{
string tempSerial = serial.Replace(":", string.Empty);
return m_Config.linkedProfiles.ContainsKey(tempSerial);
}
public static string getLinkedProfile(string serial)
{
string temp = string.Empty;
string tempSerial = serial.Replace(":", string.Empty);
if (m_Config.linkedProfiles.ContainsKey(tempSerial))
{
temp = m_Config.linkedProfiles[tempSerial];
}
return temp;
}
public static void changeLinkedProfile(string serial, string profile)
{
string tempSerial = serial.Replace(":", string.Empty);
m_Config.linkedProfiles[tempSerial] = profile;
}
public static void removeLinkedProfile(string serial)
{
string tempSerial = serial.Replace(":", string.Empty);
if (m_Config.linkedProfiles.ContainsKey(tempSerial))
{
m_Config.linkedProfiles.Remove(tempSerial);
}
}
public static bool Load() => m_Config.Load();
public static void LoadProfile(int device, bool launchprogram, ControlService control, bool xinputChange = true)
public static void LoadProfile(int device, bool launchprogram, ControlService control,
bool xinputChange = true, bool postLoad = true)
{
m_Config.LoadProfile(device, launchprogram, control, "", xinputChange);
m_Config.LoadProfile(device, launchprogram, control, "", xinputChange, postLoad);
tempprofilename[device] = string.Empty;
tempprofileDistance[device] = false;
}
@ -1058,6 +1096,16 @@ namespace DS4Windows
m_Config.SaveProfile(device, propath);
}
public static bool SaveLinkedProfiles()
{
return m_Config.SaveLinkedProfiles();
}
public static bool LoadLinkedProfiles()
{
return m_Config.LoadLinkedProfiles();
}
private static byte applyRatio(byte b1, byte b2, double r)
{
if (r > 100.0)
@ -1155,6 +1203,7 @@ namespace DS4Windows
//public String m_Profile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool" + "\\Profiles.xml";
public String m_Profile = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + "\\Profiles.xml";
public String m_Actions = Global.appdatapath + "\\Actions.xml";
public string m_linkedProfiles = Global.appdatapath + "\\LinkedProfiles.xml";
protected XmlDocument m_Xdoc = new XmlDocument();
// fifth value used for options, not fifth controller
@ -1168,6 +1217,8 @@ namespace DS4Windows
public bool[] ledAsBattery = new bool[5] { false, false, false, false, false };
public byte[] flashType = new byte[5] { 0, 0, 0, 0, 0 };
public string[] profilePath = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public string[] olderProfilePath = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public Dictionary<string, string> linkedProfiles = new Dictionary<string, string>();
// Cache properties instead of performing a string comparison every frame
public bool[] distanceProfiles = new bool[5] { false, false, false, false, false };
public Byte[] rumble = new Byte[5] { 100, 100, 100, 100, 100 };
@ -1922,7 +1973,7 @@ namespace DS4Windows
}
public bool LoadProfile(int device, bool launchprogram, ControlService control,
string propath = "", bool xinputChange = true)
string propath = "", bool xinputChange = true, bool postLoad = true)
{
bool Loaded = true;
Dictionary<DS4Controls, DS4KeyType> customMapKeyTypes = new Dictionary<DS4Controls, DS4KeyType>();
@ -2625,7 +2676,7 @@ namespace DS4Windows
// If a device exists, make sure to transfer relevant profile device
// options to device instance
if (device < 4)
if (postLoad && device < 4)
{
DS4Device tempDev = control.DS4Controllers[device];
if (tempDev != null)
@ -2781,32 +2832,40 @@ namespace DS4Windows
{
distanceProfiles[0] = true;
}
olderProfilePath[0] = profilePath[0];
}
catch { profilePath[0] = string.Empty; distanceProfiles[0] = false; missingSetting = true; }
catch { profilePath[0] = olderProfilePath[0] = string.Empty; distanceProfiles[0] = false; missingSetting = true; }
try {
Item = m_Xdoc.SelectSingleNode("/Profile/Controller2"); profilePath[1] = Item.InnerText;
if (profilePath[1].ToLower().Contains("distance"))
{
distanceProfiles[1] = true;
}
olderProfilePath[1] = profilePath[1];
}
catch { profilePath[1] = string.Empty; distanceProfiles[1] = false; missingSetting = true; }
catch { profilePath[1] = olderProfilePath[1] = string.Empty; distanceProfiles[1] = false; missingSetting = true; }
try {
Item = m_Xdoc.SelectSingleNode("/Profile/Controller3"); profilePath[2] = Item.InnerText;
if (profilePath[2].ToLower().Contains("distance"))
{
distanceProfiles[2] = true;
}
olderProfilePath[2] = profilePath[2];
}
catch { profilePath[2] = string.Empty; distanceProfiles[2] = false; missingSetting = true; }
catch { profilePath[2] = olderProfilePath[2] = string.Empty; distanceProfiles[2] = false; missingSetting = true; }
try {
Item = m_Xdoc.SelectSingleNode("/Profile/Controller4"); profilePath[3] = Item.InnerText;
if (profilePath[3].ToLower().Contains("distance"))
{
distanceProfiles[3] = true;
}
olderProfilePath[3] = profilePath[3];
}
catch { profilePath[3] = string.Empty; distanceProfiles[3] = false; missingSetting = true; }
catch { profilePath[3] = olderProfilePath[3] = string.Empty; distanceProfiles[3] = false; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/LastChecked"); DateTime.TryParse(Item.InnerText, out lastChecked); }
catch { missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/CheckWhen"); Int32.TryParse(Item.InnerText, out CheckWhen); }
@ -2884,10 +2943,10 @@ namespace DS4Windows
XmlNode xmlFormWidth = m_Xdoc.CreateNode(XmlNodeType.Element, "formWidth", null); xmlFormWidth.InnerText = formWidth.ToString(); Node.AppendChild(xmlFormWidth);
XmlNode xmlFormHeight = m_Xdoc.CreateNode(XmlNodeType.Element, "formHeight", null); xmlFormHeight.InnerText = formHeight.ToString(); Node.AppendChild(xmlFormHeight);
XmlNode xmlController1 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller1", null); xmlController1.InnerText = profilePath[0]; Node.AppendChild(xmlController1);
XmlNode xmlController2 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller2", null); xmlController2.InnerText = profilePath[1]; Node.AppendChild(xmlController2);
XmlNode xmlController3 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller3", null); xmlController3.InnerText = profilePath[2]; Node.AppendChild(xmlController3);
XmlNode xmlController4 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller4", null); xmlController4.InnerText = profilePath[3]; Node.AppendChild(xmlController4);
XmlNode xmlController1 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller1", null); xmlController1.InnerText = !Global.linkedProfileCheck[0] ? profilePath[0] : olderProfilePath[0]; Node.AppendChild(xmlController1);
XmlNode xmlController2 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller2", null); xmlController2.InnerText = !Global.linkedProfileCheck[1] ? profilePath[1] : olderProfilePath[1]; Node.AppendChild(xmlController2);
XmlNode xmlController3 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller3", null); xmlController3.InnerText = !Global.linkedProfileCheck[2] ? profilePath[2] : olderProfilePath[2]; Node.AppendChild(xmlController3);
XmlNode xmlController4 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller4", null); xmlController4.InnerText = !Global.linkedProfileCheck[3] ? profilePath[3] : olderProfilePath[3]; Node.AppendChild(xmlController4);
XmlNode xmlLastChecked = m_Xdoc.CreateNode(XmlNodeType.Element, "LastChecked", null); xmlLastChecked.InnerText = lastChecked.ToString(); Node.AppendChild(xmlLastChecked);
XmlNode xmlCheckWhen = m_Xdoc.CreateNode(XmlNodeType.Element, "CheckWhen", null); xmlCheckWhen.InnerText = CheckWhen.ToString(); Node.AppendChild(xmlCheckWhen);
@ -3123,6 +3182,105 @@ namespace DS4Windows
return saved;
}
public bool createLinkedProfiles()
{
bool saved = true;
XmlDocument m_Xdoc = new XmlDocument();
XmlNode Node;
Node = m_Xdoc.CreateXmlDeclaration("1.0", "utf-8", string.Empty);
m_Xdoc.AppendChild(Node);
Node = m_Xdoc.CreateComment(string.Format(" Mac Address and Profile Linking Data. {0} ", DateTime.Now));
m_Xdoc.AppendChild(Node);
Node = m_Xdoc.CreateWhitespace("\r\n");
m_Xdoc.AppendChild(Node);
Node = m_Xdoc.CreateNode(XmlNodeType.Element, "LinkedControllers", "");
m_Xdoc.AppendChild(Node);
try { m_Xdoc.Save(m_linkedProfiles); }
catch (UnauthorizedAccessException) { Log.LogToGui("Unauthorized Access - Save failed to path: " + m_linkedProfiles, false); saved = false; }
return saved;
}
public bool LoadLinkedProfiles()
{
bool loaded = true;
if (File.Exists(m_linkedProfiles))
{
XmlDocument linkedXdoc = new XmlDocument();
XmlNode Node;
linkedXdoc.Load(m_linkedProfiles);
linkedProfiles.Clear();
try
{
Node = linkedXdoc.SelectSingleNode("/LinkedControllers");
XmlNodeList links = Node.ChildNodes;
for (int i = 0, listLen = links.Count; i < listLen; i++)
{
XmlNode current = links[i];
string serial = current.Name.Replace("MAC", string.Empty);
string profile = current.InnerText;
linkedProfiles[serial] = profile;
}
}
catch { loaded = false; }
}
else
{
Log.LogToGui("LinkedProfiles.xml can't be found.", false);
loaded = false;
}
return loaded;
}
public bool SaveLinkedProfiles()
{
bool saved = true;
if (File.Exists(m_linkedProfiles))
{
XmlDocument linkedXdoc = new XmlDocument();
XmlNode Node;
Node = linkedXdoc.CreateXmlDeclaration("1.0", "utf-8", string.Empty);
linkedXdoc.AppendChild(Node);
Node = linkedXdoc.CreateComment(string.Format(" Mac Address and Profile Linking Data. {0} ", DateTime.Now));
linkedXdoc.AppendChild(Node);
Node = linkedXdoc.CreateWhitespace("\r\n");
linkedXdoc.AppendChild(Node);
Node = linkedXdoc.CreateNode(XmlNodeType.Element, "LinkedControllers", "");
linkedXdoc.AppendChild(Node);
Dictionary<string, string>.KeyCollection serials = linkedProfiles.Keys;
for (int i = 0, itemCount = linkedProfiles.Count; i < itemCount; i++)
{
string serial = serials.ElementAt(i);
string profile = linkedProfiles[serial];
XmlElement link = linkedXdoc.CreateElement("MAC" + serial);
link.InnerText = profile;
Node.AppendChild(link);
}
try { linkedXdoc.Save(m_linkedProfiles); }
catch (UnauthorizedAccessException) { Log.LogToGui("Unauthorized Access - Save failed to path: " + m_linkedProfiles, false); saved = false; }
}
else
{
saved = createLinkedProfiles();
saved = saved && SaveLinkedProfiles();
}
return saved;
}
public void UpdateDS4CSetting(int deviceNum, string buttonName, bool shift, object action, string exts, DS4KeyType kt, int trigger = 0)
{
DS4Controls dc;

View File

@ -83,6 +83,11 @@
this.bnLight1 = new System.Windows.Forms.Button();
this.bnLight2 = new System.Windows.Forms.Button();
this.bnLight4 = new System.Windows.Forms.Button();
this.lbLinkProfile = new System.Windows.Forms.Label();
this.linkCB1 = new System.Windows.Forms.CheckBox();
this.linkCB2 = new System.Windows.Forms.CheckBox();
this.linkCB3 = new System.Windows.Forms.CheckBox();
this.linkCB4 = new System.Windows.Forms.CheckBox();
this.lbNoControllers = new System.Windows.Forms.Label();
this.tabProfiles = new System.Windows.Forms.TabPage();
this.lBProfiles = new System.Windows.Forms.ListBox();
@ -367,21 +372,21 @@
// tLPControllers
//
resources.ApplyResources(this.tLPControllers, "tLPControllers");
this.tLPControllers.Controls.Add(this.bnLight3, 5, 3);
this.tLPControllers.Controls.Add(this.bnLight3, 6, 3);
this.tLPControllers.Controls.Add(this.pBStatus1, 1, 1);
this.tLPControllers.Controls.Add(this.lbPad1, 0, 1);
this.tLPControllers.Controls.Add(this.lbPad2, 0, 2);
this.tLPControllers.Controls.Add(this.bnEditC3, 4, 3);
this.tLPControllers.Controls.Add(this.bnEditC4, 4, 4);
this.tLPControllers.Controls.Add(this.bnEditC3, 5, 3);
this.tLPControllers.Controls.Add(this.bnEditC4, 5, 4);
this.tLPControllers.Controls.Add(this.lbPad3, 0, 3);
this.tLPControllers.Controls.Add(this.lbPad4, 0, 4);
this.tLPControllers.Controls.Add(this.cBController1, 3, 1);
this.tLPControllers.Controls.Add(this.bnEditC2, 4, 2);
this.tLPControllers.Controls.Add(this.cBController2, 3, 2);
this.tLPControllers.Controls.Add(this.cBController3, 3, 3);
this.tLPControllers.Controls.Add(this.bnEditC1, 4, 1);
this.tLPControllers.Controls.Add(this.cBController4, 3, 4);
this.tLPControllers.Controls.Add(this.lbSelectedProfile, 3, 0);
this.tLPControllers.Controls.Add(this.cBController1, 4, 1);
this.tLPControllers.Controls.Add(this.bnEditC2, 5, 2);
this.tLPControllers.Controls.Add(this.cBController2, 4, 2);
this.tLPControllers.Controls.Add(this.cBController3, 4, 3);
this.tLPControllers.Controls.Add(this.bnEditC1, 5, 1);
this.tLPControllers.Controls.Add(this.cBController4, 4, 4);
this.tLPControllers.Controls.Add(this.lbSelectedProfile, 4, 0);
this.tLPControllers.Controls.Add(this.lbID, 0, 0);
this.tLPControllers.Controls.Add(this.lbStatus, 1, 0);
this.tLPControllers.Controls.Add(this.lbBattery, 2, 0);
@ -392,9 +397,14 @@
this.tLPControllers.Controls.Add(this.pBStatus2, 1, 2);
this.tLPControllers.Controls.Add(this.pBStatus3, 1, 3);
this.tLPControllers.Controls.Add(this.pBStatus4, 1, 4);
this.tLPControllers.Controls.Add(this.bnLight1, 5, 1);
this.tLPControllers.Controls.Add(this.bnLight2, 5, 2);
this.tLPControllers.Controls.Add(this.bnLight4, 5, 4);
this.tLPControllers.Controls.Add(this.bnLight1, 6, 1);
this.tLPControllers.Controls.Add(this.bnLight2, 6, 2);
this.tLPControllers.Controls.Add(this.bnLight4, 6, 4);
this.tLPControllers.Controls.Add(this.lbLinkProfile, 3, 0);
this.tLPControllers.Controls.Add(this.linkCB1, 3, 1);
this.tLPControllers.Controls.Add(this.linkCB2, 3, 2);
this.tLPControllers.Controls.Add(this.linkCB3, 3, 3);
this.tLPControllers.Controls.Add(this.linkCB4, 3, 4);
this.tLPControllers.Name = "tLPControllers";
//
// bnLight3
@ -613,6 +623,43 @@
this.bnLight4.UseVisualStyleBackColor = false;
this.bnLight4.Click += new System.EventHandler(this.EditCustomLed);
//
// lbLinkProfile
//
resources.ApplyResources(this.lbLinkProfile, "lbLinkProfile");
this.lbLinkProfile.Name = "lbLinkProfile";
//
// linkCB1
//
resources.ApplyResources(this.linkCB1, "linkCB1");
this.linkCB1.Name = "linkCB1";
this.linkCB1.Tag = "0";
this.linkCB1.UseVisualStyleBackColor = true;
this.linkCB1.CheckedChanged += new System.EventHandler(this.linkCB_CheckedChanged);
//
// linkCB2
//
resources.ApplyResources(this.linkCB2, "linkCB2");
this.linkCB2.Name = "linkCB2";
this.linkCB2.Tag = "1";
this.linkCB2.UseVisualStyleBackColor = true;
this.linkCB2.CheckedChanged += new System.EventHandler(this.linkCB_CheckedChanged);
//
// linkCB3
//
resources.ApplyResources(this.linkCB3, "linkCB3");
this.linkCB3.Name = "linkCB3";
this.linkCB3.Tag = "2";
this.linkCB3.UseVisualStyleBackColor = true;
this.linkCB3.CheckedChanged += new System.EventHandler(this.linkCB_CheckedChanged);
//
// linkCB4
//
resources.ApplyResources(this.linkCB4, "linkCB4");
this.linkCB4.Name = "linkCB4";
this.linkCB4.Tag = "3";
this.linkCB4.UseVisualStyleBackColor = true;
this.linkCB4.CheckedChanged += new System.EventHandler(this.linkCB_CheckedChanged);
//
// lbNoControllers
//
resources.ApplyResources(this.lbNoControllers, "lbNoControllers");
@ -1302,7 +1349,6 @@
private System.Windows.Forms.Label lbSelectedProfile;
private System.Windows.Forms.Label lbID;
private System.Windows.Forms.Label lbStatus;
private System.Windows.Forms.Label lbBattery;
private System.Windows.Forms.Label lbBatt1;
private System.Windows.Forms.Label lbBatt2;
private System.Windows.Forms.Label lbBatt3;
@ -1383,6 +1429,12 @@
private System.Windows.Forms.RadioButton runStartProgRadio;
private System.Windows.Forms.RadioButton runStartTaskRadio;
private System.Windows.Forms.PictureBox uacPictureBox;
private System.Windows.Forms.Label lbBattery;
private System.Windows.Forms.Label lbLinkProfile;
private System.Windows.Forms.CheckBox linkCB1;
private System.Windows.Forms.CheckBox linkCB2;
private System.Windows.Forms.CheckBox linkCB3;
private System.Windows.Forms.CheckBox linkCB4;
//private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
}
}

View File

@ -35,6 +35,7 @@ namespace DS4Windows
private Button[] lights;
private PictureBox[] statPB;
private ToolStripMenuItem[] shortcuts;
protected CheckBox[] linkedProfileCB;
WebClient wc = new WebClient();
NonFormTimer hotkeysTimer = new NonFormTimer();
NonFormTimer autoProfilesTimer = new NonFormTimer();
@ -110,6 +111,8 @@ namespace DS4Windows
(ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[2],
(ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[3] };
linkedProfileCB = new CheckBox[4] { linkCB1, linkCB2, linkCB3, linkCB4 };
SystemEvents.PowerModeChanged += OnPowerChange;
tSOptions.Visible = false;
bool firstrun = false;
@ -312,6 +315,7 @@ namespace DS4Windows
autoProfilesTimer.Interval = 1000;
LoadP();
LoadLinkedProfiles();
Global.BatteryStatusChange += BatteryStatusUpdate;
Global.ControllerRemoved += ControllerRemovedChange;
@ -1159,9 +1163,35 @@ namespace DS4Windows
{
int devIndex = args.getIndex();
string serial = args.getSerial();
if (devIndex >= 0 && devIndex < ControlService.DS4_CONTROLLER_COUNT)
DS4Device device = (devIndex >= 0 && devIndex < ControlService.DS4_CONTROLLER_COUNT) ?
Program.rootHub.DS4Controllers[devIndex] : null;
if (device != null)
{
Pads[devIndex].Text = serial;
if (device.isSynced())
{
linkedProfileCB[devIndex].Enabled = true;
}
else
{
linkedProfileCB[devIndex].Enabled = false;
}
if (device.isValidSerial() && containsLinkedProfile(device.getMacAddress()))
{
ProfilePath[devIndex] = getLinkedProfile(device.getMacAddress());
int profileIndex = cbs[devIndex].FindString(ProfilePath[devIndex]);
if (profileIndex >= 0)
{
cbs[devIndex].SelectedIndex = profileIndex;
}
}
else
{
ProfilePath[devIndex] = OlderProfilePath[devIndex];
}
linkedProfileCB[devIndex].Checked = false;
}
}
}
@ -1191,6 +1221,20 @@ namespace DS4Windows
{
Pads[Index].Text = Program.rootHub.getDS4MacAddress(Index);
linkedProfileCB[Index].CheckedChanged -= linkCB_CheckedChanged;
if (DS4Device.isValidSerial(Pads[Index].Text))
{
linkedProfileCB[Index].Checked = containsLinkedProfile(Pads[Index].Text);
linkedProfileCB[Index].Enabled = true;
}
else
{
linkedProfileCB[Index].Checked = false;
linkedProfileCB[Index].Enabled = false;
}
linkedProfileCB[Index].CheckedChanged += linkCB_CheckedChanged;
switch (Program.rootHub.getDS4Status(Index))
{
case "USB": statPB[Index].Visible = true; statPB[Index].Image = Properties.Resources.USB; toolTip1.SetToolTip(statPB[Index], ""); break;
@ -1200,6 +1244,14 @@ namespace DS4Windows
}
Batteries[Index].Text = Program.rootHub.getDS4Battery(Index);
int profileIndex = cbs[Index].FindString(ProfilePath[Index]);
if (profileIndex >= 0)
{
cbs[Index].SelectedValueChanged -= Profile_Changed;
cbs[Index].SelectedIndex = profileIndex;
cbs[Index].SelectedValueChanged += Profile_Changed;
}
if (UseCustomLed[Index])
lights[Index].BackColor = CustomColor[Index].ToColorA;
else
@ -1295,6 +1347,7 @@ namespace DS4Windows
cbs[device].Visible = on;
shortcuts[device].Visible = on;
Batteries[device].Visible = on;
linkedProfileCB[device].Visible = on;
}
protected void On_Debug(object sender, DebugEventArgs e)
@ -1604,6 +1657,20 @@ namespace DS4Windows
lights[tdevice].BackColor = CustomColor[tdevice].ToColorA;
else
lights[tdevice].BackColor = MainColor[tdevice].ToColorA;
if (linkedProfileCB[tdevice].Checked)
{
DS4Device device = Program.rootHub.DS4Controllers[tdevice];
if (device != null && device.isValidSerial())
{
changeLinkedProfile(device.getMacAddress(), ProfilePath[tdevice]);
SaveLinkedProfiles();
}
}
else
{
OlderProfilePath[tdevice] = ProfilePath[tdevice];
}
}
else if (cb.SelectedIndex == cb.Items.Count - 1 && cb.Items.Count > 1) //if +New Profile selected
ShowOptions(tdevice, "");
@ -2359,6 +2426,37 @@ namespace DS4Windows
DownloadLang = cBDownloadLangauge.Checked;
}
private void linkCB_CheckedChanged(object sender, EventArgs e)
{
CheckBox linkCb = (CheckBox)sender;
int i = Convert.ToInt32(linkCb.Tag);
bool check = linkCb.Checked;
Global.linkedProfileCheck[i] = check;
DS4Device device = Program.rootHub.DS4Controllers[i];
if (device != null && device.isSynced())
{
if (check)
{
if (device.isValidSerial())
{
changeLinkedProfile(device.getMacAddress(), ProfilePath[i]);
}
}
else
{
removeLinkedProfile(device.getMacAddress());
ProfilePath[i] = OlderProfilePath[i];
int profileIndex = cbs[i].FindString(ProfilePath[i]);
if (profileIndex >= 0)
{
cbs[i].SelectedIndex = profileIndex;
}
}
SaveLinkedProfiles();
}
}
private void cBFlashWhenLate_CheckedChanged(object sender, EventArgs e)
{
FlashWhenLate = cBFlashWhenLate.Checked;

View File

@ -457,7 +457,7 @@
<value>True</value>
</data>
<data name="tLPControllers.ColumnCount" type="System.Int32, mscorlib">
<value>6</value>
<value>7</value>
</data>
<data name="bnLight3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -469,10 +469,10 @@
<value>NoControl</value>
</data>
<data name="bnLight3.Location" type="System.Drawing.Point, System.Drawing">
<value>813, 74</value>
<value>806, 74</value>
</data>
<data name="bnLight3.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 22</value>
<value>87, 22</value>
</data>
<data name="bnLight3.TabIndex" type="System.Int32, mscorlib">
<value>50</value>
@ -496,7 +496,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus1.Location" type="System.Drawing.Point, System.Drawing">
<value>386, 19</value>
<value>332, 19</value>
</data>
<data name="pBStatus1.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -598,7 +598,7 @@
<value>NoControl</value>
</data>
<data name="bnEditC3.Location" type="System.Drawing.Point, System.Drawing">
<value>770, 74</value>
<value>763, 74</value>
</data>
<data name="bnEditC3.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 22</value>
@ -628,7 +628,7 @@
<value>NoControl</value>
</data>
<data name="bnEditC4.Location" type="System.Drawing.Point, System.Drawing">
<value>770, 102</value>
<value>763, 102</value>
</data>
<data name="bnEditC4.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 22</value>
@ -727,7 +727,7 @@
<value>None</value>
</data>
<data name="cBController1.Location" type="System.Drawing.Point, System.Drawing">
<value>653, 18</value>
<value>646, 18</value>
</data>
<data name="cBController1.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -754,7 +754,7 @@
<value>NoControl</value>
</data>
<data name="bnEditC2.Location" type="System.Drawing.Point, System.Drawing">
<value>770, 46</value>
<value>763, 46</value>
</data>
<data name="bnEditC2.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 22</value>
@ -781,7 +781,7 @@
<value>None</value>
</data>
<data name="cBController2.Location" type="System.Drawing.Point, System.Drawing">
<value>653, 46</value>
<value>646, 46</value>
</data>
<data name="cBController2.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -805,7 +805,7 @@
<value>None</value>
</data>
<data name="cBController3.Location" type="System.Drawing.Point, System.Drawing">
<value>653, 74</value>
<value>646, 74</value>
</data>
<data name="cBController3.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -832,7 +832,7 @@
<value>NoControl</value>
</data>
<data name="bnEditC1.Location" type="System.Drawing.Point, System.Drawing">
<value>770, 18</value>
<value>763, 18</value>
</data>
<data name="bnEditC1.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 22</value>
@ -859,7 +859,7 @@
<value>None</value>
</data>
<data name="cBController4.Location" type="System.Drawing.Point, System.Drawing">
<value>653, 102</value>
<value>646, 102</value>
</data>
<data name="cBController4.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -892,7 +892,7 @@
<value>NoControl</value>
</data>
<data name="lbSelectedProfile.Location" type="System.Drawing.Point, System.Drawing">
<value>654, 0</value>
<value>647, 0</value>
</data>
<data name="lbSelectedProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>109, 15</value>
@ -964,7 +964,7 @@
<value>NoControl</value>
</data>
<data name="lbStatus.Location" type="System.Drawing.Point, System.Drawing">
<value>382, 0</value>
<value>328, 0</value>
</data>
<data name="lbStatus.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 15</value>
@ -1000,7 +1000,7 @@
<value>NoControl</value>
</data>
<data name="lbBattery.Location" type="System.Drawing.Point, System.Drawing">
<value>546, 0</value>
<value>432, 0</value>
</data>
<data name="lbBattery.Size" type="System.Drawing.Size, System.Drawing">
<value>51, 15</value>
@ -1036,7 +1036,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt1.Location" type="System.Drawing.Point, System.Drawing">
<value>552, 21</value>
<value>438, 21</value>
</data>
<data name="lbBatt1.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1072,7 +1072,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt2.Location" type="System.Drawing.Point, System.Drawing">
<value>552, 49</value>
<value>438, 49</value>
</data>
<data name="lbBatt2.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1108,7 +1108,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt3.Location" type="System.Drawing.Point, System.Drawing">
<value>552, 77</value>
<value>438, 77</value>
</data>
<data name="lbBatt3.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1144,7 +1144,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt4.Location" type="System.Drawing.Point, System.Drawing">
<value>552, 105</value>
<value>438, 105</value>
</data>
<data name="lbBatt4.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1174,7 +1174,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus2.Location" type="System.Drawing.Point, System.Drawing">
<value>386, 47</value>
<value>332, 47</value>
</data>
<data name="pBStatus2.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -1204,7 +1204,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus3.Location" type="System.Drawing.Point, System.Drawing">
<value>386, 75</value>
<value>332, 75</value>
</data>
<data name="pBStatus3.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -1234,7 +1234,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus4.Location" type="System.Drawing.Point, System.Drawing">
<value>386, 103</value>
<value>332, 103</value>
</data>
<data name="pBStatus4.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -1267,10 +1267,10 @@
<value>NoControl</value>
</data>
<data name="bnLight1.Location" type="System.Drawing.Point, System.Drawing">
<value>813, 18</value>
<value>806, 18</value>
</data>
<data name="bnLight1.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 22</value>
<value>87, 22</value>
</data>
<data name="bnLight1.TabIndex" type="System.Int32, mscorlib">
<value>50</value>
@ -1297,10 +1297,10 @@
<value>NoControl</value>
</data>
<data name="bnLight2.Location" type="System.Drawing.Point, System.Drawing">
<value>813, 46</value>
<value>806, 46</value>
</data>
<data name="bnLight2.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 22</value>
<value>87, 22</value>
</data>
<data name="bnLight2.TabIndex" type="System.Int32, mscorlib">
<value>51</value>
@ -1327,10 +1327,10 @@
<value>NoControl</value>
</data>
<data name="bnLight4.Location" type="System.Drawing.Point, System.Drawing">
<value>813, 102</value>
<value>806, 102</value>
</data>
<data name="bnLight4.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 22</value>
<value>87, 22</value>
</data>
<data name="bnLight4.TabIndex" type="System.Int32, mscorlib">
<value>52</value>
@ -1347,6 +1347,165 @@
<data name="&gt;&gt;bnLight4.ZOrder" xml:space="preserve">
<value>27</value>
</data>
<data name="lbLinkProfile.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="lbLinkProfile.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lbLinkProfile.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 9pt, style=Bold</value>
</data>
<data name="lbLinkProfile.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lbLinkProfile.Location" type="System.Drawing.Point, System.Drawing">
<value>527, 0</value>
</data>
<data name="lbLinkProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>98, 15</value>
</data>
<data name="lbLinkProfile.TabIndex" type="System.Int32, mscorlib">
<value>53</value>
</data>
<data name="lbLinkProfile.Text" xml:space="preserve">
<value>Link Profile/ID</value>
</data>
<data name="lbLinkProfile.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;lbLinkProfile.Name" xml:space="preserve">
<value>lbLinkProfile</value>
</data>
<data name="&gt;&gt;lbLinkProfile.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbLinkProfile.Parent" xml:space="preserve">
<value>tLPControllers</value>
</data>
<data name="&gt;&gt;lbLinkProfile.ZOrder" xml:space="preserve">
<value>28</value>
</data>
<data name="linkCB1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkCB1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="linkCB1.Location" type="System.Drawing.Point, System.Drawing">
<value>569, 22</value>
</data>
<data name="linkCB1.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
</data>
<data name="linkCB1.TabIndex" type="System.Int32, mscorlib">
<value>54</value>
</data>
<data name="&gt;&gt;linkCB1.Name" xml:space="preserve">
<value>linkCB1</value>
</data>
<data name="&gt;&gt;linkCB1.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkCB1.Parent" xml:space="preserve">
<value>tLPControllers</value>
</data>
<data name="&gt;&gt;linkCB1.ZOrder" xml:space="preserve">
<value>29</value>
</data>
<data name="linkCB2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkCB2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="linkCB2.Location" type="System.Drawing.Point, System.Drawing">
<value>569, 50</value>
</data>
<data name="linkCB2.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
</data>
<data name="linkCB2.TabIndex" type="System.Int32, mscorlib">
<value>55</value>
</data>
<data name="&gt;&gt;linkCB2.Name" xml:space="preserve">
<value>linkCB2</value>
</data>
<data name="&gt;&gt;linkCB2.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkCB2.Parent" xml:space="preserve">
<value>tLPControllers</value>
</data>
<data name="&gt;&gt;linkCB2.ZOrder" xml:space="preserve">
<value>30</value>
</data>
<data name="linkCB3.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkCB3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="linkCB3.Location" type="System.Drawing.Point, System.Drawing">
<value>569, 78</value>
</data>
<data name="linkCB3.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
</data>
<data name="linkCB3.TabIndex" type="System.Int32, mscorlib">
<value>56</value>
</data>
<data name="&gt;&gt;linkCB3.Name" xml:space="preserve">
<value>linkCB3</value>
</data>
<data name="&gt;&gt;linkCB3.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkCB3.Parent" xml:space="preserve">
<value>tLPControllers</value>
</data>
<data name="&gt;&gt;linkCB3.ZOrder" xml:space="preserve">
<value>31</value>
</data>
<data name="linkCB4.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkCB4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="linkCB4.Location" type="System.Drawing.Point, System.Drawing">
<value>569, 106</value>
</data>
<data name="linkCB4.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
</data>
<data name="linkCB4.TabIndex" type="System.Int32, mscorlib">
<value>57</value>
</data>
<data name="&gt;&gt;linkCB4.Name" xml:space="preserve">
<value>linkCB4</value>
</data>
<data name="&gt;&gt;linkCB4.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkCB4.Parent" xml:space="preserve">
<value>tLPControllers</value>
</data>
<data name="&gt;&gt;linkCB4.ZOrder" xml:space="preserve">
<value>32</value>
</data>
<data name="tLPControllers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
@ -1375,7 +1534,7 @@
<value>1</value>
</data>
<data name="tLPControllers.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="bnLight3" Row="3" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbPad1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbPad3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="cBController1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="cBController2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="cBController3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="cBController4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="lbID" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbStatus" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbBattery" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt3" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt4" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus3" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="bnLight1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="bnLight2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="bnLight4" Row="4" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,48.95498,Percent,26.82658,Percent,24.21844,AutoSize,0,AutoSize,0,Absolute,84" /&gt;&lt;Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="bnLight3" Row="3" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbPad1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC3" Row="3" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC4" Row="4" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="lbPad3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="cBController1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="cBController3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbID" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbStatus" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbBattery" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt3" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt4" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus3" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="bnLight1" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight2" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight4" Row="4" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="lbLinkProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,46.2856,Percent,16.83391,Percent,16.2001,Percent,20.6804,AutoSize,0,AutoSize,0,Absolute,92" /&gt;&lt;Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="lbNoControllers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -2970,6 +3129,9 @@
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>904, 415</value>
</data>
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>459, 229</value>
</data>
@ -3214,7 +3376,7 @@
<value>advColorDialog</value>
</data>
<data name="&gt;&gt;advColorDialog.Type" xml:space="preserve">
<value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.70.0, Culture=neutral, PublicKeyToken=null</value>
<value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.97.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>DS4Form</value>