Neuerstellung
This commit is contained in:
51
FSI.BT.Tools/App.xaml.cs
Normal file
51
FSI.BT.Tools/App.xaml.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using Hardcodet.Wpf.TaskbarNotification;
|
||||
using NHotkey;
|
||||
using NHotkey.Wpf;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using FSI.Lib.Wpf.ExtensionMethods;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
|
||||
namespace FSI.BT.Tools
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : System.Windows.Application
|
||||
{
|
||||
private static readonly KeyGesture RadialMenu = new(Key.OemBackslash, ModifierKeys.Control);
|
||||
private static readonly KeyGesture TimeStamp = new(Key.C, ModifierKeys.Control | ModifierKeys.Alt);
|
||||
|
||||
public void InitApplication(object sender, StartupEventArgs e)
|
||||
{
|
||||
Global.TaskbarIcon = (TaskbarIcon)FindResource("FSINotifyIcon");
|
||||
|
||||
Global.AdminRights = Admin.CheckAdminRight();
|
||||
|
||||
HotkeyManager.Current.AddOrReplace("RadialMenu", RadialMenu, ShowRadialMenu);
|
||||
|
||||
HotkeyManager.Current.AddOrReplace("TimeStampToClipboard", TimeStamp, TimeStampToClipboard);
|
||||
|
||||
Global.FrmRadialMenu = new();
|
||||
}
|
||||
|
||||
private void ShowRadialMenu(object sender, HotkeyEventArgs e)
|
||||
{
|
||||
var cmd = new Commands.RadialMenuCommand();
|
||||
cmd.Execute(null);
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void TimeStampToClipboard(object sender, HotkeyEventArgs e)
|
||||
{
|
||||
var cmd = new Commands.TimeStampToClipboardCommand();
|
||||
cmd.Execute(null);
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user