diff --git a/LarkatorGUI/MainWindow.xaml b/LarkatorGUI/MainWindow.xaml index b1e5602..5a412c3 100644 --- a/LarkatorGUI/MainWindow.xaml +++ b/LarkatorGUI/MainWindow.xaml @@ -316,7 +316,7 @@ Visibility="{Binding CreateSearchAvailable, Converter={StaticResource BoolToVisibilityConverter}}"/> - + diff --git a/LarkatorGUI/MainWindow.xaml.cs b/LarkatorGUI/MainWindow.xaml.cs index df56f3e..d975067 100644 --- a/LarkatorGUI/MainWindow.xaml.cs +++ b/LarkatorGUI/MainWindow.xaml.cs @@ -477,6 +477,8 @@ private void CreateSearch_Click(object sender, RoutedEventArgs e) speciesCombo.ItemsSource = arkReader.AllSpecies; groupsCombo.ItemsSource = ListSearches.Select(sc => sc.Group).Distinct().OrderBy(g => g).ToArray(); + int temp = Properties.Settings.Default.lastGroup; + groupsCombo.SelectedIndex = Properties.Settings.Default.lastGroup; } private void Dev_Calibration_Click(object sender, MouseButtonEventArgs e) @@ -529,6 +531,8 @@ private void SaveSearch_Click(object sender, RoutedEventArgs e) List NewSearchList; SearchCriteria tempSearch; if (String.IsNullOrWhiteSpace(NewSearch.Species)) return; + Properties.Settings.Default.lastGroup = groupsCombo.SelectedIndex; + Properties.Settings.Default.Save(); NewSearchList = new List(AllSpecies.Where(species => species.Contains(NewSearch.Species))); if (NewSearchList.Count == 0) // No matches { //Trigger default values so the user knows we tried to match diff --git a/LarkatorGUI/Properties/Settings.Designer.cs b/LarkatorGUI/Properties/Settings.Designer.cs index c4ea07e..5d4c6b1 100644 --- a/LarkatorGUI/Properties/Settings.Designer.cs +++ b/LarkatorGUI/Properties/Settings.Designer.cs @@ -320,5 +320,17 @@ public bool showOxygen { this["showOxygen"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("0")] + public int lastGroup { + get { + return ((int)(this["lastGroup"])); + } + set { + this["lastGroup"] = value; + } + } } } diff --git a/LarkatorGUI/Properties/Settings.settings b/LarkatorGUI/Properties/Settings.settings index a03ca65..48c94e1 100644 --- a/LarkatorGUI/Properties/Settings.settings +++ b/LarkatorGUI/Properties/Settings.settings @@ -71,5 +71,8 @@ False + + 0 + \ No newline at end of file diff --git a/LarkatorGUI/app.config b/LarkatorGUI/app.config index 6dd8a3f..068882a 100644 --- a/LarkatorGUI/app.config +++ b/LarkatorGUI/app.config @@ -76,6 +76,9 @@ False + + 0 + \ No newline at end of file