using GalaSoft.MvvmLight.Command; using SlnMesnac.WPF.Views; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Input; namespace SlnMesnac.WPF.ViewModel { public class ExecuteViewModel { /// /// 换班命令 /// public ICommand HandoverCommand { get; private set; } public ExecuteViewModel() { HandoverCommand = new RelayCommand(Handover); } /// /// 换班弹窗 /// private void Handover() { var handOverWin = new HandOverWin(); handOverWin.WindowStartupLocation = WindowStartupLocation.CenterScreen; // 让窗体出现在屏幕中央 handOverWin.ShowDialog();//窗体出现后禁止后面的用户控件 //其他操作 } } }