mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 19:14:20 +01:00
Minor tweaks
This commit is contained in:
parent
28004dfb22
commit
5618bdb270
@ -1659,9 +1659,12 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
if (cb.SelectedIndex < cb.Items.Count - 1)
|
if (cb.SelectedIndex < cb.Items.Count - 1)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < shortcuts[tdevice].DropDownItems.Count; i++)
|
for (int i = 0, arlen = shortcuts[tdevice].DropDownItems.Count; i < arlen; i++)
|
||||||
|
{
|
||||||
if (!(shortcuts[tdevice].DropDownItems[i] is ToolStripSeparator))
|
if (!(shortcuts[tdevice].DropDownItems[i] is ToolStripSeparator))
|
||||||
((ToolStripMenuItem)shortcuts[tdevice].DropDownItems[i]).Checked = false;
|
((ToolStripMenuItem)shortcuts[tdevice].DropDownItems[i]).Checked = false;
|
||||||
|
}
|
||||||
|
|
||||||
((ToolStripMenuItem)shortcuts[tdevice].DropDownItems[cb.SelectedIndex]).Checked = true;
|
((ToolStripMenuItem)shortcuts[tdevice].DropDownItems[cb.SelectedIndex]).Checked = true;
|
||||||
LogDebug(DateTime.Now, Properties.Resources.UsingProfile.Replace("*number*", (tdevice + 1).ToString()).Replace("*Profile name*", cb.Text), false);
|
LogDebug(DateTime.Now, Properties.Resources.UsingProfile.Replace("*number*", (tdevice + 1).ToString()).Replace("*Profile name*", cb.Text), false);
|
||||||
shortcuts[tdevice].Text = Properties.Resources.ContextEdit.Replace("*number*", (tdevice + 1).ToString());
|
shortcuts[tdevice].Text = Properties.Resources.ContextEdit.Replace("*number*", (tdevice + 1).ToString());
|
||||||
@ -1675,6 +1678,7 @@ namespace DS4Windows
|
|||||||
}
|
}
|
||||||
else if (cb.SelectedIndex == cb.Items.Count - 1 && cb.Items.Count > 1) //if +New Profile selected
|
else if (cb.SelectedIndex == cb.Items.Count - 1 && cb.Items.Count > 1) //if +New Profile selected
|
||||||
ShowOptions(tdevice, "");
|
ShowOptions(tdevice, "");
|
||||||
|
|
||||||
if (cb.Text == "(" + Properties.Resources.NoProfileLoaded + ")")
|
if (cb.Text == "(" + Properties.Resources.NoProfileLoaded + ")")
|
||||||
ebns[tdevice].Text = Properties.Resources.New;
|
ebns[tdevice].Text = Properties.Resources.New;
|
||||||
else
|
else
|
||||||
|
@ -19,7 +19,6 @@ namespace DS4Windows
|
|||||||
// whole system, including other users. But the application can not be brought
|
// whole system, including other users. But the application can not be brought
|
||||||
// into view, of course.
|
// into view, of course.
|
||||||
private static string SingleAppComEventName = "{a52b5b20-d9ee-4f32-8518-307fa14aa0c6}";
|
private static string SingleAppComEventName = "{a52b5b20-d9ee-4f32-8518-307fa14aa0c6}";
|
||||||
//static Mutex mutex = new Mutex(true, "{FI329DM2-DS4W-J2K2-HYES-92H21B3WJARG}");
|
|
||||||
private static BackgroundWorker singleAppComThread = null;
|
private static BackgroundWorker singleAppComThread = null;
|
||||||
private static EventWaitHandle threadComEvent = null;
|
private static EventWaitHandle threadComEvent = null;
|
||||||
private static bool exitComThread = false;
|
private static bool exitComThread = false;
|
||||||
@ -117,8 +116,6 @@ namespace DS4Windows
|
|||||||
static private void CreateInterAppComThread()
|
static private void CreateInterAppComThread()
|
||||||
{
|
{
|
||||||
singleAppComThread = new BackgroundWorker();
|
singleAppComThread = new BackgroundWorker();
|
||||||
//singleAppComThread.WorkerReportsProgress = false;
|
|
||||||
//singleAppComThread.WorkerSupportsCancellation = true;
|
|
||||||
singleAppComThread.DoWork += new DoWorkEventHandler(singleAppComThread_DoWork);
|
singleAppComThread.DoWork += new DoWorkEventHandler(singleAppComThread_DoWork);
|
||||||
singleAppComThread.RunWorkerAsync();
|
singleAppComThread.RunWorkerAsync();
|
||||||
}
|
}
|
||||||
@ -141,7 +138,7 @@ namespace DS4Windows
|
|||||||
if (!exitComThread && Application.OpenForms.Count > 0)
|
if (!exitComThread && Application.OpenForms.Count > 0)
|
||||||
{
|
{
|
||||||
Form mainForm = Application.OpenForms[0];
|
Form mainForm = Application.OpenForms[0];
|
||||||
mainForm.Invoke(new SetFormVisableDelegate(ThreadFormVisable), mainForm);
|
mainForm?.Invoke(new SetFormVisableDelegate(ThreadFormVisable), mainForm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user