fixed crash when changing profiles via context menu

This commit is contained in:
jays2kings 2014-04-29 20:58:18 -04:00
parent 794cefe2e6
commit 335a411230

View File

@ -382,7 +382,7 @@ namespace ScpServer
private void lvDebug_ItemActivate(object sender, EventArgs e)
{
MessageBox.Show(((ListView)sender).FocusedItem.SubItems[1].Text,"Log");
MessageBox.Show(((ListView)sender).FocusedItem.SubItems[1].Text, "Log");
}
private void Profile_Changed(object sender, EventArgs e)
@ -445,6 +445,7 @@ namespace ScpServer
else
{
for (int i = 0; i < tS.DropDownItems.Count; i++)
if (!(shortcuts[tdevice].DropDownItems[i] is ToolStripSeparator))
((ToolStripMenuItem)tS.DropDownItems[i]).Checked = false;
((ToolStripMenuItem)e.ClickedItem).Checked = true;
cbs[tdevice].SelectedIndex = tS.DropDownItems.IndexOf(e.ClickedItem);
@ -475,7 +476,7 @@ namespace ScpServer
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
notifyIcon_Click(sender,e);
notifyIcon_Click(sender, e);
}
private void notifyIcon_Click(object sender, EventArgs e)
@ -515,4 +516,3 @@ namespace ScpServer
}
}
}