From dff79abba2d2a56a92dd8fdf75673f5df323a13b Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 24 Sep 2021 15:56:51 +0200 Subject: [PATCH 01/10] Adding the functionality for Light/Dark theme --- RaceControl/RaceControl/Themes/DarkTheme.xaml | 14 ++++++++++++++ RaceControl/RaceControl/Themes/Generic.xaml | 4 ++++ RaceControl/RaceControl/Themes/LightTheme.xaml | 15 +++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 RaceControl/RaceControl/Themes/DarkTheme.xaml create mode 100644 RaceControl/RaceControl/Themes/Generic.xaml create mode 100644 RaceControl/RaceControl/Themes/LightTheme.xaml diff --git a/RaceControl/RaceControl/Themes/DarkTheme.xaml b/RaceControl/RaceControl/Themes/DarkTheme.xaml new file mode 100644 index 00000000..dc44ff14 --- /dev/null +++ b/RaceControl/RaceControl/Themes/DarkTheme.xaml @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/RaceControl/RaceControl/Themes/Generic.xaml b/RaceControl/RaceControl/Themes/Generic.xaml new file mode 100644 index 00000000..825650eb --- /dev/null +++ b/RaceControl/RaceControl/Themes/Generic.xaml @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/RaceControl/RaceControl/Themes/LightTheme.xaml b/RaceControl/RaceControl/Themes/LightTheme.xaml new file mode 100644 index 00000000..e47b6abb --- /dev/null +++ b/RaceControl/RaceControl/Themes/LightTheme.xaml @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file From a9bd42d0d59fdc2434f98452d9a084517fd0a2d4 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 24 Sep 2021 16:07:29 +0200 Subject: [PATCH 02/10] Removed unused SignalR dependencies from this branch --- .../Controls/BusyIndicator.xaml | 3 +- .../RaceControl.Core/Settings/ISettings.cs | 2 + .../RaceControl.Core/Settings/Settings.cs | 7 +++ RaceControl/RaceControl/App.xaml | 17 +++++- .../ViewModels/MainWindowViewModel.cs | 3 ++ RaceControl/RaceControl/Views/MainWindow.xaml | 54 +++++++++++++------ .../RaceControl.Services.csproj | 2 +- 7 files changed, 67 insertions(+), 21 deletions(-) diff --git a/RaceControl/RaceControl.Core/Controls/BusyIndicator.xaml b/RaceControl/RaceControl.Core/Controls/BusyIndicator.xaml index 54b918d9..8138c614 100644 --- a/RaceControl/RaceControl.Core/Controls/BusyIndicator.xaml +++ b/RaceControl/RaceControl.Core/Controls/BusyIndicator.xaml @@ -3,8 +3,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" HorizontalAlignment="Stretch" - VerticalAlignment="Stretch" - Background="#60DDDDDD"> + VerticalAlignment="Stretch"> SetProperty(ref _enableMpvAutoSync, value); } + public bool UseDarkTheme + { + get => _useDarkTheme; + set => SetProperty(ref _useDarkTheme, value); + } + public string AdditionalMpvParameters { get => _additionalMpvParameters; diff --git a/RaceControl/RaceControl/App.xaml b/RaceControl/RaceControl/App.xaml index 95e3a155..76046d5d 100644 --- a/RaceControl/RaceControl/App.xaml +++ b/RaceControl/RaceControl/App.xaml @@ -3,4 +3,19 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:prism="http://prismlibrary.com/" - DispatcherUnhandledException="PrismApplication_DispatcherUnhandledException" /> \ No newline at end of file + DispatcherUnhandledException="PrismApplication_DispatcherUnhandledException"> + + + + + + + + + + + + + \ No newline at end of file diff --git a/RaceControl/RaceControl/ViewModels/MainWindowViewModel.cs b/RaceControl/RaceControl/ViewModels/MainWindowViewModel.cs index 2d242036..a2d867e9 100644 --- a/RaceControl/RaceControl/ViewModels/MainWindowViewModel.cs +++ b/RaceControl/RaceControl/ViewModels/MainWindowViewModel.cs @@ -745,6 +745,9 @@ private async Task InitializeAsync() LoadSeasons(); LoadSeries(); await LoadVodGenresAsync(); + + // Test + //await F1Timing.Run(); } private void LoadSeasons() diff --git a/RaceControl/RaceControl/Views/MainWindow.xaml b/RaceControl/RaceControl/Views/MainWindow.xaml index 1f0764d3..b13cba41 100644 --- a/RaceControl/RaceControl/Views/MainWindow.xaml +++ b/RaceControl/RaceControl/Views/MainWindow.xaml @@ -11,6 +11,7 @@ xmlns:sys="clr-namespace:System;assembly=mscorlib" Width="1200" Height="900" + Background="#212121" prism:ViewModelLocator.AutoWireViewModel="True" Loaded="MainWindowLoaded" WindowStartupLocation="CenterScreen"> @@ -19,28 +20,24 @@ - + @@ -80,11 +77,12 @@ - + @@ -147,6 +145,7 @@ @@ -217,7 +216,7 @@ @@ -255,7 +254,7 @@ - + @@ -339,6 +338,7 @@ + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + - + - + - + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +