diff --git a/Torch.Server/Themes/Dark Theme.xaml b/Torch.Server/Themes/Dark Theme.xaml index ac373ee..770271f 100644 --- a/Torch.Server/Themes/Dark Theme.xaml +++ b/Torch.Server/Themes/Dark Theme.xaml @@ -3,7 +3,7 @@ xmlns:local="clr-namespace:Torch.Server.Themes"> - - + + \ No newline at end of file diff --git a/Torch.Server/Themes/Metro/HowToApplyTheme.txt b/Torch.Server/Themes/Metro/HowToApplyTheme.txt deleted file mode 100644 index 680bba4..0000000 --- a/Torch.Server/Themes/Metro/HowToApplyTheme.txt +++ /dev/null @@ -1,10 +0,0 @@ -To apply the Infragistics WPF Metro Light theme to your WPF application, paste the following code into your App.xaml - - - - - - - - - \ No newline at end of file diff --git a/Torch.Server/Themes/Metro/Metro.MSControls.Core.Implicit.xaml b/Torch.Server/Themes/Metro/Metro.MSControls.Core.Implicit.xaml deleted file mode 100644 index 504c898..0000000 --- a/Torch.Server/Themes/Metro/Metro.MSControls.Core.Implicit.xaml +++ /dev/null @@ -1,937 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Torch.Server/Themes/Metro/Styles.WPF.xaml b/Torch.Server/Themes/Metro/Styles.WPF.xaml deleted file mode 100644 index 988e787..0000000 --- a/Torch.Server/Themes/Metro/Styles.WPF.xaml +++ /dev/null @@ -1,830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Visible - - - - - - - - - - - Visible - - - - - - - - - - - - - - Visible - - - - - - - - - - - Visible - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Torch.Server/Themes/Metro/Theme.Colors.xaml b/Torch.Server/Themes/Metro/Theme.Colors.xaml deleted file mode 100644 index 02babe0..0000000 --- a/Torch.Server/Themes/Metro/Theme.Colors.xaml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - #FF282828 - #FF3F3F3F - #FF565656 - #FF858585 - #FFB9B9B9 - #FFD7D7D7 - #FFE7E7E7 - #FFF4F4F4 - #FFF9F9F9 - #FFFFFFFF - - - #E5FFFFFF - #BFFFFFFF - #99FFFFFF - #72FFFFFF - #4CFFFFFF - #00FFFFFF - - - #72000000 - #4C000000 - #26000000 - #00000000 - #66E2E2E2 - - - #FF0086AF - #FF00AADE - #FF80D5EF - #FFB2E1EF - #2600AADE - - - #FFD0284C - #FFF55E7F - #FFFFCAD5 - - - #FF006481 - #FF8A9B0F - #FF3E4700 - #FFF14D0F - #FF8D2E00 - #FF81106B - #FF410135 - #FFFCA910 - #FF8D4902 - #FF037A54 - #FF003F2A - #FF154D85 - #FF02284D - #FF543511 - #FF211303 - #FF89806D - #FF393225 - #FF58458B - #FF211347 - #7FB9B9B9 - #33565656 - #7F3F3F3F - #FF686868 - #8000AADE - #CC3F3F3F - - - - #FF0092BE - #FF00AADE - #FF2BB9E5 - #FF55C8EB - #FF80D7F2 - - \ No newline at end of file diff --git a/Torch.Server/Themes/MetroDark/HowToApplyTheme.txt b/Torch.Server/Themes/MetroDark/HowToApplyTheme.txt deleted file mode 100644 index b8e9984..0000000 --- a/Torch.Server/Themes/MetroDark/HowToApplyTheme.txt +++ /dev/null @@ -1,10 +0,0 @@ -To apply the Infragistics WPF MetroDark theme to your WPF application, paste the following code into your App.xaml - - - - - - - - - \ No newline at end of file diff --git a/Torch.Server/Themes/MetroDark/MetroDark.MSControls.Core.Implicit.xaml b/Torch.Server/Themes/MetroDark/MetroDark.MSControls.Core.Implicit.xaml deleted file mode 100644 index a049843..0000000 --- a/Torch.Server/Themes/MetroDark/MetroDark.MSControls.Core.Implicit.xaml +++ /dev/null @@ -1,964 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Torch.Server/Themes/MetroDark/Styles.WPF.xaml b/Torch.Server/Themes/MetroDark/Styles.WPF.xaml deleted file mode 100644 index d473b00..0000000 --- a/Torch.Server/Themes/MetroDark/Styles.WPF.xaml +++ /dev/null @@ -1,827 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Visible - - - - - - - - - - - Visible - - - - - - - - - - - - - - Visible - - - - - - - - - - - Visible - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Torch.Server/Themes/MetroDark/Theme.Colors.xaml b/Torch.Server/Themes/MetroDark/Theme.Colors.xaml deleted file mode 100644 index a0840a9..0000000 --- a/Torch.Server/Themes/MetroDark/Theme.Colors.xaml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - #FF282828 - #FFFFFFFF - #FFBABABA - #FF858585 - #FF747474 - #FF565656 - #FF454545 - #FF333333 - #FF292929 - #FF181818 - - - #E5FFFFFF - - #BFFFFFFF - - #99FFFFFF - - #72FFFFFF - - #4CFFFFFF - - #26FFFFFF - - #00FFFFFF - - - - #E5000000 - - #BF000000 - - #99000000 - - #72000000 - - #4C000000 - - #26000000 - - #00000000 - - #66E2E2E2 - - - #FF0086AF - #FF00AADE - #FF80D5EF - #FFB2E1EF - #2600AADE - - - #FFD0284C - #FFF55E7F - #FFFFCAD5 - - - #FF006481 - #FF8A9B0F - #FF3E4700 - #FFF14D0F - #FF8D2E00 - #FF81106B - #FF410135 - #FFFCA910 - #FF8D4902 - #FF037A54 - #FF003F2A - #FF154D85 - #FF02284D - #FF543511 - #FF211303 - #FF89806D - #FF393225 - #FF58458B - #FF211347 - #7FB9B9B9 - #33565656 - #7F3F3F3F - #FF686868 - #8000AADE - #CC3F3F3F - - - - #FF0092BE - #FF00AADE - #FF2BB9E5 - #FF55C8EB - #FF80D7F2 - - - \ No newline at end of file diff --git a/Torch.Server/Torch.Server.csproj b/Torch.Server/Torch.Server.csproj index ea81211..299c934 100644 --- a/Torch.Server/Torch.Server.csproj +++ b/Torch.Server/Torch.Server.csproj @@ -59,6 +59,9 @@ torchicon.ico + + ..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll + False ..\GameBinaries\HavokWrapper.dll @@ -81,6 +84,7 @@ ..\packages\NLog.4.4.12\lib\net45\NLog.dll True + False ..\GameBinaries\Sandbox.Common.dll @@ -123,13 +127,10 @@ - - ..\packages\Infragistics.Themes.MetroLight.Wpf.1.0.0\lib\net40\System.Windows.Controls.Input.Toolkit.dll - - - ..\packages\Infragistics.Themes.MetroLight.Wpf.1.0.0\lib\net40\System.Windows.Controls.Layout.Toolkit.dll - + + ..\packages\ControlzEx.3.0.2.4\lib\net45\System.Windows.Interactivity.dll + @@ -211,9 +212,6 @@ - - ..\packages\Infragistics.Themes.MetroLight.Wpf.1.0.0\lib\net40\WPFToolkit.dll - @@ -366,46 +364,6 @@ Designer MSBuild:Compile - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - Designer MSBuild:Compile @@ -501,12 +459,6 @@ false - - - - - - diff --git a/Torch.Server/Views/ThemeControl.xaml b/Torch.Server/Views/ThemeControl.xaml index b6b9f91..caa1d99 100644 --- a/Torch.Server/Views/ThemeControl.xaml +++ b/Torch.Server/Views/ThemeControl.xaml @@ -8,8 +8,7 @@ xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:validationRules="clr-namespace:Torch.Server.Views.ValidationRules" xmlns:views="clr-namespace:Torch.Views;assembly=Torch" - mc:Ignorable="d" - Background="White"> + mc:Ignorable="d"> diff --git a/Torch.Server/Views/ThemeControl.xaml.cs b/Torch.Server/Views/ThemeControl.xaml.cs index 4b978bb..acbd050 100644 --- a/Torch.Server/Views/ThemeControl.xaml.cs +++ b/Torch.Server/Views/ThemeControl.xaml.cs @@ -20,6 +20,8 @@ namespace Torch.Server.Views /// public partial class ThemeControl : UserControl, INotifyPropertyChanged { + public TorchUI uiSource; + public List Themes { get => _themes.Keys.ToList(); @@ -36,6 +38,10 @@ namespace Torch.Server.Views _themes["Dark theme"] = new ResourceDictionary() { Source = new Uri(@"/Themes/Dark Theme.xaml", UriKind.Relative) }; _themes["Light theme"] = new ResourceDictionary() { Source = new Uri(@"/Themes/Light Theme.xaml", UriKind.Relative) }; + if (null == System.Windows.Application.Current) + { + new System.Windows.Application(); + } } public void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e) @@ -48,9 +54,8 @@ namespace Torch.Server.Views public void ChangeTheme(Uri uri) { - - Application.Current.Resources.MergedDictionaries.Clear(); - Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = uri }); + uiSource.Resources.MergedDictionaries.Clear(); + uiSource.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = uri }); } } } diff --git a/Torch.Server/Views/TorchUI.xaml b/Torch.Server/Views/TorchUI.xaml index a09d5e9..bad4c3e 100644 --- a/Torch.Server/Views/TorchUI.xaml +++ b/Torch.Server/Views/TorchUI.xaml @@ -96,8 +96,8 @@ - - + + diff --git a/Torch.Server/Views/TorchUI.xaml.cs b/Torch.Server/Views/TorchUI.xaml.cs index 0017178..d1215db 100644 --- a/Torch.Server/Views/TorchUI.xaml.cs +++ b/Torch.Server/Views/TorchUI.xaml.cs @@ -48,6 +48,9 @@ namespace Torch.Server Chat.BindServer(server); PlayerList.BindServer(server); Plugins.BindServer(server); + + Themes.uiSource = this; + LoadConfig((TorchConfig)server.Config); } diff --git a/Torch.Server/packages.config b/Torch.Server/packages.config index a5b0b90..9b38b3e 100644 --- a/Torch.Server/packages.config +++ b/Torch.Server/packages.config @@ -1,7 +1,6 @@  - - +