diff --git a/WordByWord/WordByWord/Colors.xaml b/WordByWord/WordByWord/Colors.xaml new file mode 100644 index 0000000..20c0c04 --- /dev/null +++ b/WordByWord/WordByWord/Colors.xaml @@ -0,0 +1,32 @@ + + + + + + + + + + + + Blue + Red + Green + + + + + + + + + + diff --git a/WordByWord/WordByWord/Services/WindowService.cs b/WordByWord/WordByWord/Services/WindowService.cs index 6aa20bf..4692774 100644 --- a/WordByWord/WordByWord/Services/WindowService.cs +++ b/WordByWord/WordByWord/Services/WindowService.cs @@ -14,6 +14,7 @@ public class WindowService : IWindowService private Reader _reader; private InputText _inputText; private Info _info; + private Colors _colors; public void ShowWindow(string window, ViewModel.ViewModel viewModel) { @@ -42,6 +43,10 @@ public void ShowWindow(string window, ViewModel.ViewModel viewModel) _info = new Info(); _info.ShowDialog(); break; + case "Colors": + _colors = new Colors(); + _colors.ShowDialog(); + break; } } @@ -68,6 +73,10 @@ public void CloseWindow(string window) _info?.Close(); _info = null; break; + case "Colors": + _colors?.Close(); + _colors = null; + break; } } } diff --git a/WordByWord/WordByWord/ViewModel/ViewModel.cs b/WordByWord/WordByWord/ViewModel/ViewModel.cs index 0ed34d0..0fb56c5 100644 --- a/WordByWord/WordByWord/ViewModel/ViewModel.cs +++ b/WordByWord/WordByWord/ViewModel/ViewModel.cs @@ -98,6 +98,7 @@ public ViewModel(IDialogCoordinator dialogService, IWindowService windowService, AddDocumentCommand = new RelayCommand(AddDocumentContext); OpenEditorCommand = new RelayCommand(OpenEditorWindow, () => SelectedDocument != null && !SelectedDocument.IsBusy); OpenInfoCommand = new RelayCommand(OpenInfoWindow); + OpenColorsCommand = new RelayCommand(OpenColorsWindow); ConfirmEditCommand = new RelayCommand(ConfirmEdit); ReadSelectedDocumentCommand = new RelayCommand(async () => { @@ -168,6 +169,8 @@ public ViewModel(IDialogCoordinator dialogService, IWindowService windowService, public RelayCommand OpenInfoCommand { get; } + public RelayCommand OpenColorsCommand { get; } + public RelayCommand AddDocumentCommand { get; } public RelayCommand PauseReadingCommand { get; } @@ -919,6 +922,11 @@ private void OpenInfoWindow() _windowService.ShowWindow("Info", this); } + private void OpenColorsWindow() + { + _windowService.ShowWindow("Colors", this); + } + private void AddDocumentContext() { _addDocumentContext.IsOpen = true; diff --git a/WordByWord/WordByWord/WordByWord.csproj b/WordByWord/WordByWord/WordByWord.csproj index 4149247..5773bf8 100644 --- a/WordByWord/WordByWord/WordByWord.csproj +++ b/WordByWord/WordByWord/WordByWord.csproj @@ -215,6 +215,9 @@ MSBuild:Compile Designer + + Colors.xaml + @@ -237,6 +240,10 @@ Reader.xaml + + Designer + MSBuild:Compile + MSBuild:Compile Designer