26 lines
761 B
C#
26 lines
761 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using UAF.WPF.Commands;
|
|
|
|
namespace ConfigurePlus.Commands
|
|
{
|
|
public class RestoreCommand : BaseCommand
|
|
{
|
|
public override bool CanExecute(object parameter)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override void Execute(object parameter)
|
|
{
|
|
if (App.Current.MainWindow == null)
|
|
throw new ArgumentNullException("App.Current.MainWindow", "Can't restore the main window, it was probably already destroyed. ");
|
|
|
|
App.Current.MainWindow.Show();
|
|
App.Current.MainWindow.WindowState = System.Windows.WindowState.Normal;
|
|
App.Current.MainWindow.ApplyTemplate();
|
|
}
|
|
}
|
|
}
|