/// <summary> /// Removes the currently selected condition on the currently selected tabPage. /// </summary> public void RemoveCondition() { if (SelectedTabControlIndex == 0 && SelectedStartCondition != null) { StartConditions.Remove(SelectedStartCondition); } else if (SelectedTabControlIndex == 1 && SelectedCancelCondition != null) { CancelConditions.Remove(SelectedCancelCondition); } else if (SelectedTabControlIndex == 2 && SelectedSubmitCondition != null) { SubmitConditions.Remove(SelectedSubmitCondition); } NotifyOfPropertyChange(() => CanRemoveCondition); NotifyOfPropertyChange(() => CanGenerate); }
/// <summary> /// Adds a new condition to the selected tabPage. /// </summary> public void AddCondition() { if (SelectedTabControlIndex == 0) { StartConditions.Add(new Condition()); } else if (SelectedTabControlIndex == 1) { CancelConditions.Add(new Condition()); } else { SubmitConditions.Add(new Condition()); } NotifyOfPropertyChange(() => CanRemoveCondition); NotifyOfPropertyChange(() => CanGenerate); }