DiscordChatExporter/DiscordChatExporter.Gui/App.xaml.cs

45 lines
1.2 KiB
C#
Raw Normal View History

2019-11-13 12:19:36 -05:00
using System;
using System.Reflection;
2020-10-05 10:10:00 -04:00
using DiscordChatExporter.Gui.Internal;
using MaterialDesignThemes.Wpf;
2019-11-13 12:19:36 -05:00
namespace DiscordChatExporter.Gui
{
public partial class App
2019-04-12 06:48:13 -04:00
{
2019-11-13 12:19:36 -05:00
private static readonly Assembly Assembly = typeof(App).Assembly;
public static string Name => Assembly.GetName().Name!;
public static Version Version => Assembly.GetName().Version!;
public static string VersionString => Version.ToString(3);
}
2020-10-05 10:10:00 -04:00
public partial class App
{
private static Theme LightTheme { get; } = Theme.Create(
new MaterialDesignLightTheme(),
MediaColor.FromHex("#343838"),
MediaColor.FromHex("#F9A825")
);
private static Theme DarkTheme { get; } = Theme.Create(
new MaterialDesignDarkTheme(),
MediaColor.FromHex("#E8E8E8"),
MediaColor.FromHex("#F9A825")
);
public static void SetLightTheme()
{
var paletteHelper = new PaletteHelper();
paletteHelper.SetTheme(LightTheme);
}
public static void SetDarkTheme()
{
var paletteHelper = new PaletteHelper();
paletteHelper.SetTheme(DarkTheme);
}
}
}