RestMatCutWin restMatCutWindow;//定义一个窗体的全局变量
private void RestMatCutWinExecute()
{
if (restMatCutWindow==null) { restMatCutWindow = new RestMatCutWin(); restMatCutWindow.Owner = Application.Current.MainWindow; restMatCutWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; restMatCutWindow.Closed += new EventHandler(restMatCutExecuteClose); restMatCutWindow.Show(); }
}
private void restMatCutExecuteClose(object sender, EventArgs e) { restMatCutWindow = null; }
public ICommand RestMatCutWin { get { return new QueryCommand(RestMatCutWinExecute, IaBool); } }