UI update, almost complete support of Taskbar, classes separation and organization
This commit is contained in:
39
App.xaml.cs
39
App.xaml.cs
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user