private void AddTarget(object sender, RoutedEventArgs e) { AddTargetDialog dialog = new AddTargetDialog(m_Project); bool? result = dialog.ShowDialog(); if (result.HasValue) { if (result.Value) { m_Project.AddTarget(dialog.TargetName, dialog.Condition, dialog.DependsOn); } } }