예제 #1
0
        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;
        }
예제 #2
0
 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;
 }
예제 #3
0
        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);
        }
예제 #4
0
        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;
            }
        }
예제 #5
0
        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;
        }
예제 #6
0
 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;
 }