* Added auto-expand sections on open setting

* Changed all sections to be expanded unless the new setting is disabled
* Tidied up some casting in ItemFilterScriptViewModel by using pattern matching
This commit is contained in:
Ben Wallis
2018-11-28 22:28:21 +00:00
parent 6838cb12a8
commit ba6d50cf45
10 changed files with 162 additions and 163 deletions

View File

@@ -10,8 +10,9 @@ namespace Filtration.ViewModels
RelayCommand SetItemFilterScriptDirectoryCommand { get; }
string DefaultFilterDirectory { get; }
bool ExtraLineBetweenBlocks { get; set; }
bool BlocksExpandedOnOpen { get; set; }
bool DownloadPrereleaseUpdates { get; set; }
bool ExtraLineBetweenBlocks { get; set; }
}
internal class SettingsPageViewModel : ViewModelBase, ISettingsPageViewModel
@@ -28,10 +29,10 @@ namespace Filtration.ViewModels
public string DefaultFilterDirectory => Settings.Default.DefaultFilterDirectory;
public bool ExtraLineBetweenBlocks
public bool BlocksExpandedOnOpen
{
get => Settings.Default.ExtraLineBetweenBlocks;
set => Settings.Default.ExtraLineBetweenBlocks = value;
get => Settings.Default.BlocksExpandedOnOpen;
set => Settings.Default.BlocksExpandedOnOpen = value;
}
public bool DownloadPrereleaseUpdates
@@ -40,6 +41,12 @@ namespace Filtration.ViewModels
set => Settings.Default.DownloadPrereleaseUpdates = value;
}
public bool ExtraLineBetweenBlocks
{
get => Settings.Default.ExtraLineBetweenBlocks;
set => Settings.Default.ExtraLineBetweenBlocks = value;
}
private void OnSetItemFilterScriptDirectoryCommand()
{
_itemFilterScriptDirectoryService.SetItemFilterScriptDirectory();