Ejemplo n.º 1
0
 protected override Completion ExecuteImpl(ExecutionEnvironment enviroment)
 {
     if (!string.IsNullOrEmpty(Name))
     {
         SpeachBase.GetSpeech(enviroment).SelectVoice(Name);
     }
     return(Completion.Void);
 }
Ejemplo n.º 2
0
        public Completion Assign(ExecutionEnvironment environment, object value)
        {
            if (!TypeConverters.IsNumber(value))
            {
                return(Completion.Exception(Properties.Language.NotNumber, this));
            }
            int v = (int)value;

            if (v < -10 || v > 10)
            {
                return(Completion.Exception(Properties.Language.RateOutOfRange, this));
            }
            SpeachBase.GetSpeech(environment).Rate = v;
            return(new Completion(v));
        }
Ejemplo n.º 3
0
        protected override Completion ExecuteImpl(ExecutionEnvironment enviroment)
        {
            if (Text == null)
            {
                return(Completion.Void);
            }
            var c = Text.Execute(enviroment);

            if (!c.IsValue)
            {
                return(c);
            }
            string t = c.ReturnValue + "";

            SpeachBase.GetSpeech(enviroment).Speak(t);
            return(Completion.Void);
        }
Ejemplo n.º 4
0
 protected override Completion ExecuteImpl(ExecutionEnvironment enviroment)
 {
     return(new Completion(SpeachBase.GetSpeech(enviroment).Rate));
 }