UI update, almost complete support of Taskbar, classes separation and organization

This commit is contained in:
2021-08-14 01:20:38 +02:00
parent 6b192fc978
commit 0ba7d20ad2
18 changed files with 790 additions and 221 deletions

View File

@ -1,17 +1,36 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows;
using Hardcodet.Wpf.TaskbarNotification;
namespace unison
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
private TaskbarIcon Systray;
private HotkeyHandler Hotkeys;
private SnapcastHandler Snapcast;
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
Hotkeys = new HotkeyHandler();
Current.Properties["hotkeys"] = Hotkeys;
Snapcast = new SnapcastHandler();
Current.Properties["snapcast"] = Snapcast;
Current.MainWindow = new MainWindow();
Systray = (TaskbarIcon)FindResource("SystrayTaskbar");
Current.Properties["notify"] = Systray;
}
protected override void OnExit(ExitEventArgs e)
{
Systray.Dispose();
Snapcast.Stop();
Hotkeys.RemoveHotKeys();
base.OnExit(e);
}
}
}