private void RemoveCondition(RuleCondition condition) { var index = EditingRule.Conditions.IndexOf(condition); if (EditingRule.Conditions.Count > 1) { EditingRule.Conditions.RemoveAt(index); } }
private void AddCondition(RuleCondition condition) { var index = EditingRule.Conditions.IndexOf(condition); EditingRule.Conditions.Insert(index + 1, new RuleCondition()); }