Exemplo n.º 1
0
        public void getAudioProperties(XAudio audio)
        {
            AudioProperties property = AudioInFrameProps.Find(prop => prop.Frame == currentFrame && prop.Audio == audio);

            fadeinTextBox.Text  = property.FadeIn.ToString();
            fadeoutTextBox.Text = property.FadeOut.ToString();
            //queueCheckBox.IsChecked = property.Queue;
            loopCheckBox.IsChecked     = property.Loop;
            imagePropsPanel.Visibility = Visibility.Hidden;
        }
Exemplo n.º 2
0
        private void audio_Unchecked(object sender, RoutedEventArgs e)
        {
            XAudio selectedAudio = (sender as CheckBox).Tag as XAudio;

            if (waschecked)
            {
                if (removeorunselect)
                {
                    AudioInFrameProps.Remove(AudioInFrameProps.Find(i => i.Frame == currentFrame && i.Audio == selectedAudio));
                }
                waschecked = false;
            }
            else
            {
                AudioProperties audio = AudioInFrameProps.Last(i => previousFrames.Contains(i.Frame) && i.Audio == selectedAudio);
                if (removeorunselect)
                {
                    if (audio.Frame.MenuOptions == null)
                    {
                        audio.StopFrame = currentFrame;
                    }
                    else
                    {
                        audio.StopFrames.Add(currentFrame);
                    }
                }
            }

            if (selectedAudio.Type == "music ")
            {
                hideAudioLayer(music, panelMusic, labelMusic);
            }
            else if (selectedAudio.Type == "sound ")
            {
                hideAudioLayer(sound, panelSound, labelSound);
            }
            else
            {
                hideAudioLayer(voice, panelVoice, labelVoice);
            }

            audioPropsPanel.Visibility = Visibility.Hidden;
            show = false;
        }