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/Colors.xaml.cs b/WordByWord/WordByWord/Colors.xaml.cs
new file mode 100644
index 0000000..78c2a90
--- /dev/null
+++ b/WordByWord/WordByWord/Colors.xaml.cs
@@ -0,0 +1,30 @@
+using MahApps.Metro;
+using MahApps.Metro.Controls;
+using System;
+using System.Drawing;
+using System.Reflection;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace WordByWord
+{
+ ///
+ /// Interaction logic for Colors.xaml
+ ///
+ public partial class Colors : MetroWindow
+ {
+ public Colors()
+ {
+ InitializeComponent();
+ }
+
+ private void ColorsComboBox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
+ {
+ Tuple theme = ThemeManager.DetectAppStyle(Application.Current);
+ string selectedColor = (ColorsComboBox.SelectedItem as ComboBoxItem).Content.ToString();
+
+ if (Application.Current != null)
+ ThemeManager.ChangeAppStyle(Application.Current, ThemeManager.GetAccent(selectedColor), theme.Item1);
+ }
+ }
+}
diff --git a/WordByWord/WordByWord/Library.xaml b/WordByWord/WordByWord/Library.xaml
index 1c6a2c7..d4a6721 100644
--- a/WordByWord/WordByWord/Library.xaml
+++ b/WordByWord/WordByWord/Library.xaml
@@ -77,11 +77,11 @@
-
@@ -105,4 +105,14 @@
+
+
+
+
+
+
+
+
+
+
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