private void onAddButtonClick(object sender, RoutedEventArgs e) { var dialog = new CompaniesEditor(); ModalDialog = dialog; dialog.Closed += onEditDialogClosed; dialog.Show(); }
private void onEditButtonClick(object sender, RoutedEventArgs e) { if (CompaniesListView.SelectedItem == null) { return; } var dialog = new CompaniesEditor((Company)CompaniesListView.SelectedItem); ModalDialog = dialog; dialog.Closed += onEditDialogClosed; dialog.Show(); }
private void onCompaniesListMouseDoubleClick(object sender, MouseButtonEventArgs e) { if (CompaniesListView.SelectedItem == null || e.ChangedButton != MouseButton.Left) { return; } var dialog = new CompaniesEditor((Company)CompaniesListView.SelectedItem); ModalDialog = dialog; dialog.Closed += onEditDialogClosed; dialog.Show(); }