mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-25 08:01:49 +01:00
Merge branch 'rafsanjani-confirm-on-close' into jay
This commit is contained in:
commit
169281d823
@ -2157,6 +2157,7 @@ namespace DS4Windows
|
||||
linkSetup.LinkColor = Color.Blue;
|
||||
}
|
||||
|
||||
bool tempBool = false;
|
||||
protected void ScpForm_Closing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (opt.Visible)
|
||||
@ -2166,7 +2167,30 @@ namespace DS4Windows
|
||||
return;
|
||||
}
|
||||
|
||||
if (cBCloseMini.Checked && !contextclose)
|
||||
bool closeMini = tempBool = cBCloseMini.Checked;
|
||||
DS4Device d = null;
|
||||
tempBool = true;
|
||||
//in case user accidentally clicks on the close button whilst "Close Minimizes" checkbox is unchecked
|
||||
if (!closeMini && !contextclose)
|
||||
{
|
||||
for (int i = 0, PadsLen = Pads.Length; tempBool && i < PadsLen; i++)
|
||||
{
|
||||
d = Program.rootHub.DS4Controllers[i];
|
||||
tempBool = (d != null) ? false : tempBool;
|
||||
}
|
||||
|
||||
bool nocontrollers = tempBool;
|
||||
if (!nocontrollers)
|
||||
{
|
||||
if (MessageBox.Show(Properties.Resources.CloseConfirm, Properties.Resources.Confirm,
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
||||
{
|
||||
e.Cancel = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (closeMini && !contextclose)
|
||||
{
|
||||
this.WindowState = FormWindowState.Minimized;
|
||||
e.Cancel = true;
|
||||
|
1241
DS4Windows/DS4Forms/KBM360.en.resx
Normal file
1241
DS4Windows/DS4Forms/KBM360.en.resx
Normal file
File diff suppressed because it is too large
Load Diff
18
DS4Windows/Properties/Resources.Designer.cs
generated
18
DS4Windows/Properties/Resources.Designer.cs
generated
@ -274,6 +274,15 @@ namespace DS4Windows.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This will disconnect all your connected controllers. Proceed?.
|
||||
/// </summary>
|
||||
internal static string CloseConfirm {
|
||||
get {
|
||||
return ResourceManager.GetString("CloseConfirm", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Close DS4Windows?.
|
||||
/// </summary>
|
||||
@ -310,6 +319,15 @@ namespace DS4Windows.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Confirm....
|
||||
/// </summary>
|
||||
internal static string Confirm {
|
||||
get {
|
||||
return ResourceManager.GetString("Confirm", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Connecting....
|
||||
/// </summary>
|
||||
|
@ -787,4 +787,10 @@
|
||||
<data name="GyroTriggerBehavior" xml:space="preserve">
|
||||
<value>Check to have gyro active while trigger is active. Uncheck to disable gyro while trigger is active.</value>
|
||||
</data>
|
||||
<data name="CloseConfirm" xml:space="preserve">
|
||||
<value>This will disconnect all your connected controllers. Proceed?</value>
|
||||
</data>
|
||||
<data name="Confirm" xml:space="preserve">
|
||||
<value>Confirm...</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user