Neuerstellung
This commit is contained in:
37
FSI.BT.Tools/Commands/RadialMenuCommand.cs
Normal file
37
FSI.BT.Tools/Commands/RadialMenuCommand.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using FSI.Lib.Wpf.ExtensionMethods;
|
||||
using System.Windows;
|
||||
|
||||
namespace FSI.BT.Tools.Commands
|
||||
{
|
||||
/// <summary>
|
||||
/// Shows the main window.
|
||||
/// </summary>
|
||||
public class RadialMenuCommand : CommandBase<RadialMenuCommand>
|
||||
{
|
||||
public override void Execute(object parameter)
|
||||
{
|
||||
if (Global.FrmRadialMenu.Visibility == Visibility.Collapsed)
|
||||
{
|
||||
Global.FrmRadialMenu.ShowCenteredToMouse();
|
||||
Global.FrmRadialMenu.ActivateCenteredToMouse();
|
||||
return;
|
||||
}
|
||||
|
||||
if (Global.FrmRadialMenu.Visibility == Visibility.Hidden)
|
||||
{
|
||||
Global.FrmRadialMenu.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.FrmRadialMenu.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
Global.FrmRadialMenu.ActivateCenteredToMouse();
|
||||
}
|
||||
|
||||
public override bool CanExecute(object parameter)
|
||||
{
|
||||
return Global.AdminRights || Global.UserRights;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user