private void fadeOutUnitBox_SelectedIndexChanged(object sender, EventArgs e) { int oldValue = TimeConversion.GetTimeInMillis((int)fadeOutUpDown.Value, m_FadeOutUnit); fadeOutUpDown.Value = TimeConversion.GetTimeInUnit(oldValue, fadeOutUnitBox); m_FadeOutUnit = (TimeUnit)fadeOutUnitBox.SelectedIndex; }
private void fadeOutUnitBox_SelectedIndexChanged(object sender, EventArgs e) { if (m_Element == null) { return; } listen = false; fadeOutUpDown.Value = TimeConversion.GetTimeInUnit(m_Element.Effects.FadeOutTime, fadeOutUnitBox); listen = true; }
public void UpdateAction() { bool random = randomButton.Checked; int fixValue = volumeBar.Value; int minRandomValue = (int)minRandomUpDown.Value; int maxRandomValue = (int)maxRandomUpDown.Value; int fadeIn = TimeConversion.GetTimeInMillis(fadeInUpDown, fadeInUnitBox); int fadeOut = TimeConversion.GetTimeInMillis(fadeOutUpDown, fadeOutUnitBox); bool crossFading = crossFadingBox.Checked; Action.SetData(random, fixValue, minRandomValue, maxRandomValue, fadeIn, fadeOut, crossFading); }
private void Update(int id, Actions.ElementChanges.ChangeType changeType) { if (listen && changeType == Actions.ElementChanges.ChangeType.Changed) { listen = false; fixedVolumeButton.Checked = !m_Element.Effects.HasRandomVolume; randomButton.Checked = m_Element.Effects.HasRandomVolume; volumeBar.Value = m_Element.Effects.Volume; minRandomUpDown.Value = m_Element.Effects.MinRandomVolume; maxRandomUpDown.Value = m_Element.Effects.MaxRandomVolume; fadeInUpDown.Value = TimeConversion.GetTimeInUnit(m_Element.Effects.FadeInTime, fadeInUnitBox); fadeOutUpDown.Value = TimeConversion.GetTimeInUnit(m_Element.Effects.FadeOutTime, fadeOutUnitBox); crossFadingBox.Enabled = m_Element.Effects.FadeOutTime > 0; crossFadingBox.Checked = m_Element.Effects.CrossFading; listen = true; } }
private void Commit() { if (m_Element == null) { return; } listen = false; Actions.Action action = Actions.Actions.Instance.LastAction; if (action != null && action is Actions.ElementVolumeEffectsChangeAction) { Actions.ElementVolumeEffectsChangeAction eeca = action as Actions.ElementVolumeEffectsChangeAction; if (eeca.Elements[0] == m_Element) { eeca.SetData( randomButton.Checked, volumeBar.Value, (int)minRandomUpDown.Value, (int)maxRandomUpDown.Value, TimeConversion.GetTimeInMillis(fadeInUpDown, fadeInUnitBox), TimeConversion.GetTimeInMillis(fadeOutUpDown, fadeOutUnitBox), crossFadingBox.Checked); eeca.Do(m_Project); listen = true; return; } } List <Ares.Data.IEffectsElement> elements = new List <Ares.Data.IEffectsElement>(); elements.Add(m_Element); Actions.Actions.Instance.AddNew(new Actions.ElementVolumeEffectsChangeAction(elements, randomButton.Checked, volumeBar.Value, (int)minRandomUpDown.Value, (int)maxRandomUpDown.Value, TimeConversion.GetTimeInMillis(fadeInUpDown, fadeInUnitBox), TimeConversion.GetTimeInMillis(fadeOutUpDown, fadeOutUnitBox), crossFadingBox.Checked) , m_Project); listen = true; }
private void allFadeOutButton_Click(object sender, EventArgs e) { if (m_Element == null || m_Container == null) { return; } listen = false; Actions.Actions.Instance.AddNew(new Actions.AllFileElementsFadingChangeAction(m_Container, TimeConversion.GetTimeInMillis(fadeOutUpDown, fadeOutUnitBox), false), m_Project); listen = true; }