private void Commit() { if (m_Element == null) { return; } listen = false; Actions.Action action = Actions.Actions.Instance.LastAction; if (action != null && action is Actions.DelayableElementChangeAction) { Actions.DelayableElementChangeAction deca = action as Actions.DelayableElementChangeAction; if (deca.Element == m_Element) { deca.SetData( TimeConversion.GetTimeInMillis(fixedDelayUpDown, fixedUnitBox), TimeConversion.GetTimeInMillis(maxDelayUpDown, randomUnitBox)); deca.Do(m_Project); listen = true; return; } } Actions.Actions.Instance.AddNew(new Actions.DelayableElementChangeAction(m_Element, TimeConversion.GetTimeInMillis(fixedDelayUpDown, fixedUnitBox), TimeConversion.GetTimeInMillis(maxDelayUpDown, randomUnitBox)), m_Project); listen = true; }
private void Commit() { if (m_Element == null) { return; } listen = false; int repeatCount = loopButton.Checked ? -1 : (int)repeatCountUpDown.Value; Actions.Action action = Actions.Actions.Instance.LastAction; if (action != null && action is Actions.RepeatableElementChangeAction) { Actions.RepeatableElementChangeAction reca = action as Actions.RepeatableElementChangeAction; if (reca.Element == m_Element) { reca.SetData(repeatCount, TimeConversion.GetTimeInMillis(fixedDelayUpDown, fixedUnitBox), TimeConversion.GetTimeInMillis(maxDelayUpDown, randomUnitBox)); reca.Do(m_Project); listen = true; return; } } Actions.Actions.Instance.AddNew(new Actions.RepeatableElementChangeAction(m_Element, repeatCount, TimeConversion.GetTimeInMillis(fixedDelayUpDown, fixedUnitBox), TimeConversion.GetTimeInMillis(maxDelayUpDown, randomUnitBox)), m_Project); listen = true; }