public RepeatableElementChangeAction(IRepeatableElement element, int repeatCount, int fixedDelay, int maxDelay) { m_Element = element; m_OldRepeatCount = element.RepeatCount; m_OldFixed = element.FixedIntermediateDelay; m_OldMax = element.MaximumRandomIntermediateDelay; m_NewRepeatCount = repeatCount; m_NewFixed = TimeSpan.FromMilliseconds(fixedDelay); m_NewMax = TimeSpan.FromMilliseconds(maxDelay); }
public void SetElement(IRepeatableElement element, Ares.Data.IProject project) { if (m_Element != null) { Actions.ElementChanges.Instance.RemoveListener(m_Element.Id, Update); } m_Element = element; m_Project = project; if (m_Element != null) { Update(element.Id, Actions.ElementChanges.ChangeType.Changed); Actions.ElementChanges.Instance.AddListener(element.Id, Update); } else { loopButton.Checked = false; noLoopButton.Checked = true; repeatCountUpDown.Value = 1; fixedDelayUpDown.Value = 0; maxDelayUpDown.Value = 0; } }