, Visual C#


         

Properties


mySpeech = " - . ?";
myRobby.Speak(mySpeech, myObject);
}
}
( ) Properties axAgent4 Events Command. Form1.cs ( axAgent4_Command), ( ) .
47.18. , .
private void axAgent4_Command(object sender,
AxAgentObjects._AgentEvents_CommandEvent e)
{
// myCommand :
myCommand =
(AgentObjects.IAgentCtlUserInput)(e.userInput);
// "MoveToMouse"
// :
if (myCommand.Voice == "MoveToMouse")
{
myRobby.MoveTo(
Convert.ToInt16(Cursor.Position.X),
Convert.ToInt16(Cursor.Position.Y), 1000);
}
// "Genie"
// , :
if (myCommand.Voice == "Genie")
{
// :
myRobby.Hide(0);
// Form1
// "x,y" :
myGenie.MoveTo(
Convert.ToInt16(this.Location.X + 400),
Convert.ToInt16(this.Location.Y - 130), 1000);
// :
myGenie.Show(0);
// ,
// :
myAgentController = new AgentObjects.Agent();
myAgentController.Connected = true;
myAgentController.Characters.Load(
"genie", "genie.acs");
myGenie =
myAgentController.Characters.Character("genie");