diff --git a/Torch.Client.Tests/Torch.Client.Tests.csproj b/Torch.Client.Tests/Torch.Client.Tests.csproj index d73b8d4..f57c10c 100644 --- a/Torch.Client.Tests/Torch.Client.Tests.csproj +++ b/Torch.Client.Tests/Torch.Client.Tests.csproj @@ -90,6 +90,7 @@ + diff --git a/Torch.Server.Tests/Torch.Server.Tests.csproj b/Torch.Server.Tests/Torch.Server.Tests.csproj index 243e8ea..157bedf 100644 --- a/Torch.Server.Tests/Torch.Server.Tests.csproj +++ b/Torch.Server.Tests/Torch.Server.Tests.csproj @@ -94,6 +94,9 @@ + + + \ No newline at end of file diff --git a/Torch.Server/Themes/Dark Theme.xaml b/Torch.Server/Themes/Dark Theme.xaml new file mode 100644 index 0000000..ac373ee --- /dev/null +++ b/Torch.Server/Themes/Dark Theme.xaml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/Torch.Server/Themes/Light Theme.xaml b/Torch.Server/Themes/Light Theme.xaml new file mode 100644 index 0000000..3ebffd8 --- /dev/null +++ b/Torch.Server/Themes/Light Theme.xaml @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/Torch.Server/Themes/Metro/HowToApplyTheme.txt b/Torch.Server/Themes/Metro/HowToApplyTheme.txt new file mode 100644 index 0000000..680bba4 --- /dev/null +++ b/Torch.Server/Themes/Metro/HowToApplyTheme.txt @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..504c898 --- /dev/null +++ b/Torch.Server/Themes/Metro/Metro.MSControls.Core.Implicit.xaml @@ -0,0 +1,937 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Torch.Server/Themes/Metro/Styles.WPF.xaml b/Torch.Server/Themes/Metro/Styles.WPF.xaml new file mode 100644 index 0000000..988e787 --- /dev/null +++ b/Torch.Server/Themes/Metro/Styles.WPF.xaml @@ -0,0 +1,830 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 0000000..02babe0 --- /dev/null +++ b/Torch.Server/Themes/Metro/Theme.Colors.xaml @@ -0,0 +1,89 @@ + + + + + + + + + + + + #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 new file mode 100644 index 0000000..b8e9984 --- /dev/null +++ b/Torch.Server/Themes/MetroDark/HowToApplyTheme.txt @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..a049843 --- /dev/null +++ b/Torch.Server/Themes/MetroDark/MetroDark.MSControls.Core.Implicit.xaml @@ -0,0 +1,964 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Torch.Server/Themes/MetroDark/Styles.WPF.xaml b/Torch.Server/Themes/MetroDark/Styles.WPF.xaml new file mode 100644 index 0000000..d473b00 --- /dev/null +++ b/Torch.Server/Themes/MetroDark/Styles.WPF.xaml @@ -0,0 +1,827 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 0000000..a0840a9 --- /dev/null +++ b/Torch.Server/Themes/MetroDark/Theme.Colors.xaml @@ -0,0 +1,104 @@ + + + + + + + + + + + + #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 c2a1e1b..ea81211 100644 --- a/Torch.Server/Torch.Server.csproj +++ b/Torch.Server/Torch.Server.csproj @@ -123,6 +123,12 @@ + + ..\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 + @@ -205,6 +211,9 @@ + + ..\packages\Infragistics.Themes.MetroLight.Wpf.1.0.0\lib\net40\WPFToolkit.dll + @@ -221,6 +230,9 @@ + + ThemeControl.xaml + Component @@ -346,6 +358,58 @@ + + Designer + MSBuild:Compile + + + 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 + Designer MSBuild:Compile @@ -437,6 +501,12 @@ false + + + + + + diff --git a/Torch.Server/Views/ThemeControl.xaml b/Torch.Server/Views/ThemeControl.xaml new file mode 100644 index 0000000..b6b9f91 --- /dev/null +++ b/Torch.Server/Views/ThemeControl.xaml @@ -0,0 +1,26 @@ + + + + + + + + + + + diff --git a/Torch.Server/Views/ThemeControl.xaml.cs b/Torch.Server/Views/ThemeControl.xaml.cs new file mode 100644 index 0000000..4b978bb --- /dev/null +++ b/Torch.Server/Views/ThemeControl.xaml.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Media; +using System.Windows.Threading; +using Torch.API.Managers; +using Torch.Server.Annotations; +using Torch.Server.Managers; +using Torch.Server.ViewModels; + +namespace Torch.Server.Views +{ + /// + /// Interaction logic for ThemeControl.xaml + /// + public partial class ThemeControl : UserControl, INotifyPropertyChanged + { + public List Themes + { + get => _themes.Keys.ToList(); + } + + private Dictionary _themes = new Dictionary(); + + public event PropertyChangedEventHandler PropertyChanged; + + public ThemeControl() + { + InitializeComponent(); + this.DataContext = this; + + _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) }; + } + + public void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e) + { + ComboBox box = (ComboBox)sender; + var boxText = box.SelectedItem.ToString(); + + ChangeTheme(_themes[boxText].Source); + } + + public void ChangeTheme(Uri uri) + { + + Application.Current.Resources.MergedDictionaries.Clear(); + Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = uri }); + } + } +} diff --git a/Torch.Server/Views/TorchUI.xaml b/Torch.Server/Views/TorchUI.xaml index 309840f..a09d5e9 100644 --- a/Torch.Server/Views/TorchUI.xaml +++ b/Torch.Server/Views/TorchUI.xaml @@ -96,6 +96,9 @@ + + + \ No newline at end of file diff --git a/Torch.Server/packages.config b/Torch.Server/packages.config index 5221eb5..a5b0b90 100644 --- a/Torch.Server/packages.config +++ b/Torch.Server/packages.config @@ -1,5 +1,7 @@  + +