private void buttonAdd_Click(object sender, RoutedEventArgs e) { AddEditProjectWindow projectWindow = new AddEditProjectWindow { Owner = Window.GetWindow(this) }; projectWindow.Closed += (sndr, eventArgs) => _vm.Reset(); projectWindow.SetOperationType(OperationType.Add); projectWindow.ShowDialog(); }
internal void buttonAdd_Click(object sender, RoutedEventArgs e) { AddEditProjectWindow projectWindow = new AddEditProjectWindow { Owner = Window.GetWindow(this) }; projectWindow.Closed += (sndr, eventArgs) => _vm.Reset(); projectWindow.SetOperationType(OperationType.Add); projectWindow.ShowDialog(); }
private void buttonView_Click(object sender, RoutedEventArgs e) { Project project = _vm.SelectedGridItem; if (project != null) { AddEditProjectWindow projectWindow = new AddEditProjectWindow(project) { Owner = Window.GetWindow(this) }; projectWindow.Closed += (sndr, eventArgs) => _vm.Reset(); projectWindow.SetOperationType(OperationType.Update); projectWindow.ShowDialog(); } else MessageBox.Show("No project is selected."); }
private void buttonView_Click(object sender, RoutedEventArgs e) { Project project = _vm.SelectedGridItem; if (project != null) { AddEditProjectWindow projectWindow = new AddEditProjectWindow(project) { Owner = Window.GetWindow(this) }; projectWindow.Closed += (sndr, eventArgs) => _vm.Reset(); projectWindow.SetOperationType(OperationType.Update); projectWindow.ShowDialog(); } else { MessageBox.Show("No project is selected."); } }