public void ReplaceRule(int index, HandleRule replacement) { BeforeReplace?.Invoke(this, replacement); var removingItem = rulesStorage[index]; rulesStorage.Insert(index, replacement); rulesStorage.Remove(item: removingItem); }
public void SetRule(HandleRule rule) { handleRule = rule; NoteOnRule noteOnRule = handleRule as NoteOnRule; if (noteOnRule != null) { editNote.Text = noteOnRule.Note.ToString(); } }
public virtual void CopyHeadInformationFrom(HandleRule source) { StopProcessing = source.StopProcessing; if (source.Action != null) { var a = (HandleRuleAction)source.Action.Clone(); Action = a; } SValues = source.SValues; this.RuleName = source.RuleName; }
public void ReplaceRule(HandleRule oldRule, HandleRule newRule) { BeforeReplace?.Invoke(this, newRule); int index = rulesStorage.IndexOf(oldRule); if (index < 0) { index = rulesStorage.Count; } rulesStorage.Insert(index, newRule); rulesStorage.Remove(oldRule); }
public void SetRule(HandleRule rule) { handleRule = rule; editControlNumber.Text = handleRule.GetValue("ControlNumber").ToString(); }
public int GetIndexByRule(HandleRule rule) { return(rulesStorage.IndexOf(rule)); }
public void RemoveRule(HandleRule rule) { BeforeDeleteRule?.Invoke(this, rule); rulesStorage.Remove(rule); }
public void AddRule(HandleRule rule) { rulesStorage.Add(rule); AfterAddRule?.Invoke(this, rule); }
public void SetRule(HandleRule rule) { handleRule = rule; }