protected void ShowResultLogForm(object sender, ExecutedRoutedEventArgs e) { if (_form != null && _form.IsVisible) { _form.Close(); _form = null; } else { _form = new ResultLogForm(new ResultLogView(MainViewModel.ResultLog)); _form.Owner = Window.GetWindow(this); _form.Closing += _form_Closing; _form.Show(); } }
protected void _form_Closing(object sender, System.ComponentModel.CancelEventArgs e) { _form = null; }