Skip to content

Commit

Permalink
Bix bug when selecting culture and cancelling dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurits committed Apr 22, 2023
1 parent 1351add commit 12c797b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ErgoLux/FrmLanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ private void Accept_Click(object sender, EventArgs e)

private void Cancel_Click(object sender, EventArgs e)
{
if (Settings is not null)
StringResources.Culture = Settings.AppCulture;
else
StringResources.Culture = CultureInfo.InvariantCulture;

DialogResult = DialogResult.Cancel;
}

Expand Down
6 changes: 6 additions & 0 deletions ErgoLux/FrmSettings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using FTD2XX_NET;
using System.Globalization;
using System.Text.RegularExpressions;

namespace ErgoLux;

Expand Down Expand Up @@ -318,6 +319,11 @@ private void Reset_Click(object sender, EventArgs e)

private void Cancel_Click(object sender, EventArgs e)
{
if (Settings is not null)
StringResources.Culture = Settings.AppCulture;
else
StringResources.Culture = CultureInfo.InvariantCulture;

DialogResult = DialogResult.Cancel;
}

Expand Down

0 comments on commit 12c797b

Please sign in to comment.