public void RemoveTask(Microsoft.Build.BuildEngine.BuildTask buildTask) { }
public void RemoveTask(Microsoft.Build.BuildEngine.BuildTask taskElement) { }
private void AddTask(object sender, RoutedEventArgs e) { GroupElement groupElement = Targets.SelectedItem as GroupElement; if (groupElement != null) { TargetElement selElm = groupElement.ElementBase as TargetElement; if (selElm != null) { if (!selElm.IsImported) { AddTaskDialog dialog = new AddTaskDialog(); bool? dialogResult = dialog.ShowDialog(); if (!dialogResult.HasValue) { return; } if (dialogResult.Value) { try { Microsoft.Build.BuildEngine.BuildTask elm = selElm.TargetObject.AddNewTask(dialog.TaskName); elm.Condition = dialog.Condition; if (dialog.TaskParam.Length > 0) { string[] pList = dialog.TaskParam.Split(','); foreach (string param in pList) { string[] pPart = param.Split('='); if (pPart.Length == 2) { elm.SetParameterValue(pPart[0], pPart[1]); } } } } catch (System.Xml.XmlException ex) { ErrorDialog errorMessage = new ErrorDialog(ex.Message); errorMessage.ShowDialog(); } catch (ArgumentException ex) { ErrorDialog errorMessage = new ErrorDialog(ex.Message); errorMessage.ShowDialog(); } groupElement.Refresh(); } } } else { AddTaskBtn.IsEnabled = false; } } }