diff --git a/EliteBGS/MainWindow.xaml b/EliteBGS/MainWindow.xaml index e053428..ca2623c 100644 --- a/EliteBGS/MainWindow.xaml +++ b/EliteBGS/MainWindow.xaml @@ -207,12 +207,15 @@ + + + diff --git a/EliteBGS/MainWindow.xaml.cs b/EliteBGS/MainWindow.xaml.cs index 2559b86..12902f4 100644 --- a/EliteBGS/MainWindow.xaml.cs +++ b/EliteBGS/MainWindow.xaml.cs @@ -171,6 +171,7 @@ public partial class MainWindow : MetroWindow { TransactionParserOptions options = new(); options.IgnoreInfluenceSupport = Config.Global.IgnoreInfluenceSupport; + options.IgnoreMarketBuy = Config.Global.IgnoreMarketBuy; List transactions = parser.Parse(entries, options); @@ -277,7 +278,7 @@ public partial class MainWindow : MetroWindow { } } - private void entries_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) { + private void entries_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Delete) { RemoveCurrentObjective(); } @@ -296,7 +297,7 @@ public partial class MainWindow : MetroWindow { } private Objective GetObjectiveFromControl(object sender) { - System.Windows.Controls.Control control = sender as System.Windows.Controls.Control; + Control control = sender as Control; if (control == null || control.DataContext == null) { return null; } @@ -361,7 +362,7 @@ public partial class MainWindow : MetroWindow { try { Config.SaveGlobal(); } catch (Exception error) { - System.Windows.MessageBox.Show("There was an error saving your settings: " + error.Message); + MessageBox.Show("There was an error saving your settings: " + error.Message); } } @@ -369,7 +370,7 @@ public partial class MainWindow : MetroWindow { } private TransactionType GetTransaction(object sender) where TransactionType : Transaction { - System.Windows.Controls.Control button = sender as System.Windows.Controls.Control; + Control button = sender as Control; if (button == null || button.DataContext == null) { return null; } @@ -530,4 +531,8 @@ public partial class MainWindow : MetroWindow { private void NoInfluenceSupport_Toggled(object sender, RoutedEventArgs e) { Config.Global.IgnoreInfluenceSupport = this.NoInfluenceSupport.IsOn; } + + private void NoMarketBuy_Toggled(object sender, RoutedEventArgs e) { + Config.Global.IgnoreMarketBuy = this.NoMarketBuy.IsOn; + } } diff --git a/EliteBGS/Util/AppConfig.cs b/EliteBGS/Util/AppConfig.cs index c1261d3..80dd9a7 100644 --- a/EliteBGS/Util/AppConfig.cs +++ b/EliteBGS/Util/AppConfig.cs @@ -53,6 +53,11 @@ namespace EliteBGS.Util { /// public bool IgnoreInfluenceSupport { get; set; } = false; + /// + /// Whether we ignore market buy entries during parsing. + /// + public bool IgnoreMarketBuy { get; set; } = false; + [JsonIgnore] public string FullTheme { get { return Theme + "." + Colour; }