public void Initialize(Speech.SpeechSettings settings) { this.SpeakingRate = settings.SpeechRate; this.SpeakingVolume = settings.SpeechVolume; this.KeepDisplayOn = settings.KeepDisplayOnDuringSpeech; GrayLevelDarkMode = ColorConverter.ToGrayFromRGBA(settings.WorkingBackgroundColorDarkMode); GrayLevelLightMode = ColorConverter.ToGrayFromRGBA(settings.WorkingBackgroundColorLightMode); }
public void Apply(Speech.SpeechSettings settings) { settings.SpeechVoice = this.SelectedVoice.Name; settings.SpeechCulture = this.SelectedVoice.Culture; settings.SpeechRate = (int)this.SpeakingRate; settings.SpeechVolume = (int)this.SpeakingVolume; settings.KeepDisplayOnDuringSpeech = this.KeepDisplayOn; settings.WorkingBackgroundColorDarkMode = ColorConverter.ToRGBAIntFromGrayLevel((byte)this.GrayLevelDarkMode); settings.WorkingBackgroundColorLightMode = ColorConverter.ToRGBAIntFromGrayLevel((byte)this.GrayLevelLightMode); }