Exemplo n.º 1
0
        private void OnListboxVoiceChooserSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //Set this to null so the same text can be re-synthesized
            textToSynth = null;
            SetVoice();

            if (isSuppressVoiceChangedEvent)
            {
                isSuppressVoiceChangedEvent = false;
            }
            else
            {
                VoiceChanged?.Invoke(synthesizer.Voice.Id, e);
            }
        }
Exemplo n.º 2
0
        private void InitEvents()
        {
            Closing += delegate
            {
                ViewClosing?.Invoke();
            };

            numericInterval.ValueChanged += delegate
            {
                IntervalChanged?.Invoke((uint)numericInterval.Value);
            };

            checkRepeat.CheckedChanged += delegate
            {
                RepeatChanged?.Invoke(checkRepeat.Checked);
            };

            checkRandom.CheckedChanged += delegate
            {
                RandomChanged?.Invoke(checkRandom.Checked);
            };

            trackSpeed.ValueChanged += delegate
            {
                SpeedChanged?.Invoke(trackSpeed.Value);
                UpdateLabelSpeed();
            };

            trackVolume.ValueChanged += delegate
            {
                VolumeChanged?.Invoke(trackVolume.Value);
                UpdateLabelVolume();
            };

            comboVoice.SelectedValueChanged += delegate
            {
                VoiceChanged?.Invoke(comboVoice.SelectedItem?.ToString());
            };

            trackTimbre.ValueChanged += delegate
            {
                TimbreChanged?.Invoke(trackTimbre.Value);
                UpdateLabelTimbre();
            };
        }