Пример #1
0
 protected void SpeakButton_Click(object sender, System.EventArgs e)
 {
     if (TextToSpeak.Text.Length == 0) // Don't speak a zero-length
     {
         return;                       // string.
     }
     //Make the character speak.
     Character.Speak(TextToSpeak.Text, null);
 }
Пример #2
0
        protected void SpeakButton_Click(object sender, EventArgs e)
        {
            if (TextToSpeak.Text.Length == 0)
            {
                return;
            }

            Character.Speak(TextToSpeak.Text, null);
        }
Пример #3
0
        protected void AxAgent_Command(object sender, AxAgentObjects._AgentEvents_CommandEvent e)
        {
            IAgentCtlUserInput ui;

            ui = (IAgentCtlUserInput)e.userInput;
            if (ui.Name == "Hello")
            {
                Character.Speak((object)"Hello. My name is Robby." +
                                " Pleased to meet you.", null);

                PromptLabel.Text = "Say goodbye to dismiss Robby.";
            }
            if (ui.Name == "Goodbye")
            {
                Character.Speak((object)"It was nice talking to" +
                                " you. Goodbye.", null);

                Character.Play("Wave");
                Character.Play("Hide");
            }
        }