private void AddPreRequestTask_Click(object sender, System.Windows.RoutedEventArgs e) { var dialog = new EditDeploymentTask(null, false) { Owner = Window.GetWindow(this) }; dialog.ShowDialog(); }
private void EditDeploymentTask_Click(object sender, System.Windows.RoutedEventArgs e) { var config = (sender as Button).DataContext as DeploymentTaskConfig; var isPostRequestTask = ItemViewModel.SelectedItem.PostRequestTasks?.Any(i => i.Id == config.Id) == true; var dialog = new EditDeploymentTask(config, isPostRequestTask) { Owner = Window.GetWindow(this) }; dialog.ShowDialog(); }