Added change of profile to log

This commit is contained in:
jays2kings 2014-05-07 00:46:36 -04:00
parent a6881b23b5
commit 629390b12e
2 changed files with 9 additions and 8 deletions

View File

@ -87,13 +87,13 @@ namespace DS4Control
ind++;
if (System.IO.File.Exists(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + @"\Profiles\" + filename))
{
LogDebug("Controller: " + device.MacAddress + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\"");
Log.LogToTray("Controller: " + device.MacAddress + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\"");
LogDebug("Controller " + ind + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\"");
Log.LogToTray("Controller " + ind + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\"");
}
else
{
LogDebug("Controller: " + device.MacAddress + " is using a profile not found");
Log.LogToTray("Controller: " + device.MacAddress + " is using a profile not found");
LogDebug("Controller " + ind + " is using a profile not found");
Log.LogToTray("Controller " + ind + " is using a profile not found");
}
if (ind >= 4) // out of Xinput devices!
break;
@ -181,13 +181,13 @@ namespace DS4Control
string filename = profileA[profileA.Length - 1];
if (System.IO.File.Exists(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + @"\Profiles\" + filename))
{
LogDebug("Controller: " + device.MacAddress + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\"");
Log.LogToTray("Controller: " + device.MacAddress + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\"");
LogDebug("Controller " + (Index+1) + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\"");
Log.LogToTray("Controller " + (Index + 1) + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\"");
}
else
{
LogDebug("Controller: " + device.MacAddress + " is using a profile not found");
Log.LogToTray("Controller: " + device.MacAddress + " is using a profile not found");
LogDebug("Controller " + (Index + 1) + " is using a profile not found");
Log.LogToTray("Controller " + (Index + 1) + " is using a profile not found");
}
break;

View File

@ -423,6 +423,7 @@ namespace ScpServer
if (!(shortcuts[tdevice].DropDownItems[i] is ToolStripSeparator))
((ToolStripMenuItem)shortcuts[tdevice].DropDownItems[i]).Checked = false;
((ToolStripMenuItem)shortcuts[tdevice].DropDownItems[cb.SelectedIndex]).Checked = true;
LogDebug(DateTime.Now, "Controller " + (tdevice + 1) + " is now using Profile \"" + cb.Text + "\"");
shortcuts[tdevice].Text = "Edit Profile for Controller " + (tdevice + 1);
Global.setAProfile(tdevice, cb.Items[cb.SelectedIndex].ToString());
Global.Save();