Exemple #1
0
 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);
 }
Exemple #2
0
 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;
     }
 }