Skip to content

Commit

Permalink
Solution for Config Loading
Browse files Browse the repository at this point in the history
Would previously result in CheckBoxes being enabled/disabled incorrectly.
  • Loading branch information
Knuxfan24 committed Nov 22, 2021
1 parent 1ecec64 commit 3aa8d03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions MarathonRandomiser/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public MainWindow()
{
InitializeComponent();
GenerateDirectories();

SetDefaults();

// Force culture info 'en-GB' to prevent errors with values altered by language-specific differences.
Expand Down Expand Up @@ -1578,7 +1579,10 @@ private void LoadConfig(string location)

// If it's a check box, check it or uncheck it depending on the key value.
if (checkbox != null)
{
checkbox.IsChecked = bool.Parse(split[1]);
Dependency_CheckBox_Changed(checkbox, null);
}

// If it's a numericupdown, set its value depending on the key's.
if (numeric != null)
Expand Down
3 changes: 0 additions & 3 deletions MarathonRandomiser/Randomisers/AnimationRandomiser.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using Marathon.Formats.Package;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MarathonRandomiser
Expand Down

0 comments on commit 3aa8d03

Please sign in to comment.