Ejemplo n.º 1
0
 internal void SetEnabledFlag(bool value, bool switchContext)
 {
     try
     {
         if (_enabled != value)
         {
             _enabled = value;
             if (!_enabled)
             {
                 if (_voice.Equals(_voiceSynthesizer.CurrentVoice(switchContext).VoiceInfo))
                 {
                     _voiceSynthesizer.Voice = null;
                 }
             }
             else
             {
                 _voiceSynthesizer.Voice = null;
             }
         }
     }
     catch (InvalidOperationException)
     {
         _voiceSynthesizer.Voice = null;
     }
 }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            TTSVoice tTSVoice = obj as TTSVoice;

            if (tTSVoice != null)
            {
                return(_voiceId.Equals(tTSVoice.VoiceInfo));
            }
            return(false);
        }