From 06ea22b6ce1a419bd574b155bcfda24bce301c68 Mon Sep 17 00:00:00 2001 From: jamckee Date: Fri, 10 May 2019 17:13:03 -0600 Subject: [PATCH] Removed adjustcolumns function and switched to binding, corrected formatting in app.config, fixed label for food and oxygen --- LarkatorGUI/MainWindow.xaml | 14 +++++++------- LarkatorGUI/MainWindow.xaml.cs | 17 ----------------- LarkatorGUI/app.config | 12 ++++++------ 3 files changed, 13 insertions(+), 30 deletions(-) diff --git a/LarkatorGUI/MainWindow.xaml b/LarkatorGUI/MainWindow.xaml index ab97d7b..4e455ed 100644 --- a/LarkatorGUI/MainWindow.xaml +++ b/LarkatorGUI/MainWindow.xaml @@ -379,13 +379,13 @@ - - - - - - - + + + + + + + diff --git a/LarkatorGUI/MainWindow.xaml.cs b/LarkatorGUI/MainWindow.xaml.cs index 1ad898d..94324f1 100644 --- a/LarkatorGUI/MainWindow.xaml.cs +++ b/LarkatorGUI/MainWindow.xaml.cs @@ -200,7 +200,6 @@ public MainWindow() }, DispatcherPriority.Loaded); LoadSavedSearches(); - adjustSearchColumns(); SetupFileWatcher(); var cmdThrowExceptionAndExit = new RoutedCommand(); @@ -775,8 +774,6 @@ private void UpdateSearchResults(IList searches) ResultTotalCount = ShowTames ? sourceDinos.Sum(species => species.Value.Count()) : total; ResultMatchingCount = ListResults.Count; - adjustSearchColumns(); - } ((CollectionViewSource)Resources["OrderedResults"]).View.Refresh(); @@ -784,19 +781,6 @@ private void UpdateSearchResults(IList searches) TriggerNameSearch(true); } - private void AdjustSearchColumns() - { - resultsList.Columns[3].Visibility = Properties.Settings.Default.ShowHealth ? Visibility.Visible : Visibility.Collapsed; - resultsList.Columns[4].Visibility = Properties.Settings.Default.ShowStam ? Visibility.Visible : Visibility.Collapsed; - resultsList.Columns[5].Visibility = Properties.Settings.Default.ShowOxygen ? Visibility.Visible : Visibility.Collapsed; - resultsList.Columns[6].Visibility = Properties.Settings.Default.ShowFood ? Visibility.Visible : Visibility.Collapsed; - resultsList.Columns[7].Visibility = Properties.Settings.Default.ShowWeight ? Visibility.Visible : Visibility.Collapsed; - resultsList.Columns[8].Visibility = Properties.Settings.Default.ShowMelee ? Visibility.Visible : Visibility.Collapsed; - resultsList.Columns[9].Visibility = Properties.Settings.Default.ShowSpeed ? Visibility.Visible : Visibility.Collapsed; - - - } - private async Task PerformConversion() { string arkDirName = Path.GetFileNameWithoutExtension(Properties.Settings.Default.SaveFile); @@ -920,7 +904,6 @@ private void OnSettingsChanged() UpdateCurrentSearch(); ForceFontSizeUpdate(); - adjustSearchColumns(); reloadTimer.Interval = TimeSpan.FromMilliseconds(Properties.Settings.Default.ConvertDelay); } diff --git a/LarkatorGUI/app.config b/LarkatorGUI/app.config index c3890f1..e0484b6 100644 --- a/LarkatorGUI/app.config +++ b/LarkatorGUI/app.config @@ -61,12 +61,12 @@ True - - False - - - False - + + False + + + False + True