27 lines
588 B
C#
27 lines
588 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Input;
|
|
|
|
namespace BodyshopPartner.Utils
|
|
{
|
|
public class OpenMainWindowCommand : ICommand
|
|
{
|
|
public void Execute(object parameter)
|
|
{
|
|
var m = App.Current.Windows.OfType<Views.Main>().FirstOrDefault();
|
|
m?.Show();
|
|
m?.Focus();
|
|
}
|
|
|
|
public bool CanExecute(object parameter)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public event EventHandler CanExecuteChanged;
|
|
}
|
|
}
|