private void InitializeComponent() { this.SpeakButton = new Button(); this.TextToSpeak = new TextBox(); this.StatusLabel = new Label(); this.AxAgent = new AxAgentObjects.AxAgent(); this.ShowButton = new Button(); AxAgent.BeginInit(); SpeakButton.Location = new System.Drawing.Point(192, 48); SpeakButton.Size = new System.Drawing.Size(88, 24); SpeakButton.TabIndex = 3; SpeakButton.Enabled = false; SpeakButton.Text = "Speak"; SpeakButton.Click += new System.EventHandler(SpeakButton_Click); TextToSpeak.Location = new System.Drawing.Point(8, 48); TextToSpeak.Text = "Enter some text to be spoken."; TextToSpeak.Enabled = false; TextToSpeak.TabIndex = 4; TextToSpeak.Size = new System.Drawing.Size(176, 20); StatusLabel.Location = new System.Drawing.Point(8, 8); StatusLabel.Text = "Click the Show Genie button to display the Genie."; StatusLabel.Size = new System.Drawing.Size(176, 32); StatusLabel.TabIndex = 2; AxAgent.Size = new System.Drawing.Size(32, 32); AxAgent.TabIndex = 1; AxAgent.Location = new System.Drawing.Point(8, 8); ShowButton.Location = new System.Drawing.Point(192, 8); ShowButton.Size = new System.Drawing.Size(88, 24); ShowButton.TabIndex = 0; ShowButton.Text = "Show Genie"; ShowButton.Click += new System.EventHandler(ShowButton_Click); this.Text = "Agent HelloWorld"; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(288, 77); this.FormBorderStyle = FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.AcceptButton = ShowButton; this.Controls.Add(TextToSpeak); this.Controls.Add(SpeakButton); this.Controls.Add(StatusLabel); this.Controls.Add(AxAgent); this.Controls.Add(ShowButton); AxAgent.EndInit(); }
private void InitializeComponent() { this.PromptLabel = new Label(); this.StatusLabel = new Label(); this.AxAgent = new AxAgentObjects.AxAgent(); this.LoadButton = new Button(); AxAgent.BeginInit(); PromptLabel.Location = new System.Drawing.Point(8, 48); PromptLabel.Text = "Hold down the Scroll Lock Key to talk to Robby. Say Hello to him."; PromptLabel.Size = new System.Drawing.Size(272, 32); PromptLabel.TabIndex = 2; PromptLabel.Visible = false; StatusLabel.Location = new System.Drawing.Point(8, 8); StatusLabel.Text = "Robby is not loaded yet. Click the Load button to load Robby."; StatusLabel.Size = new System.Drawing.Size(184, 32); StatusLabel.TabIndex = 1; AxAgent.Size = new System.Drawing.Size(32, 32); AxAgent.TabIndex = 3; AxAgent.Location = new System.Drawing.Point(248, 48); AxAgent.Command += new AxAgentObjects._AgentEvents_CommandEventHandler(AxAgent_Command); LoadButton.Location = new System.Drawing.Point(200, 8); LoadButton.Size = new System.Drawing.Size(80, 24); LoadButton.TabIndex = 0; LoadButton.Text = "Load"; LoadButton.Click += new System.EventHandler(LoadButton_Click); this.Text = "Interactive HelloWorld"; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(288, 85); this.FormBorderStyle = FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.Controls.Add(AxAgent); this.Controls.Add(PromptLabel); this.Controls.Add(StatusLabel); this.Controls.Add(LoadButton); AxAgent.EndInit(); }
private void InitializeComponent() { this.AnimationList = new ListBox(); this.AxAgent = new AxAgentObjects.AxAgent(); this.StatusLabel = new Label(); this.AutoStopCheck = new CheckBox(); this.PlayButton = new Button(); this.TextToSpeak = new TextBox(); this.AutoHideCheck = new CheckBox(); this.TextToSpeakLabel = new Label(); this.PosXLabel = new Label(); this.PosYLabel = new Label(); this.AnimationLabel = new Label(); this.PosY = new TextBox(); this.BalloonCheck = new CheckBox(); this.PosX = new TextBox(); this.MoveButton = new Button(); this.LoadButton = new Button(); this.SpeakButton = new Button(); this.AutoPaceCheck = new CheckBox(); this.StopButton = new Button(); this.PositionLabel = new Label(); this.AutoSizeCheck = new CheckBox(); this.SoundsCheck = new CheckBox(); this.line1 = new Panel(); this.line2 = new Panel(); this.line3 = new Panel(); AxAgent.BeginInit(); line1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; line1.Location = new Point(8, 40); line1.Size = new Size(360, 1); line2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; line2.Location = new Point(8, 216); line2.Size = new Size(360, 1); line3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; line3.Location = new Point(8, 368); line3.Size = new Size(360, 1); AnimationList.Location = new Point(8, 64); AnimationList.Size = new Size(280, 95); AnimationList.TabIndex = 0; AnimationList.Sorted = true; AnimationList.DoubleClick += new EventHandler(AnimationList_DoubleClick); AnimationList.Click += new EventHandler(AnimationList_Click); AxAgent.Size = new Size(32, 32); AxAgent.TabIndex = 22; AxAgent.Location = new Point(296, 128); AxAgent.ActivateInput += new AxAgentObjects._AgentEvents_ActivateInputEventHandler(AxAgent_ActivateInput); AxAgent.ClickEvent += new AxAgentObjects._AgentEvents_ClickEventHandler(AxAgent_Event_Click); AxAgent.ListenStart += new AxAgentObjects._AgentEvents_ListenStartEventHandler(AxAgent_ListenStart); AxAgent.IdleStart += new AxAgentObjects._AgentEvents_IdleStartEventHandler(AxAgent_IdleStart); AxAgent.DefaultCharacterChange += new AxAgentObjects._AgentEvents_DefaultCharacterChangeEventHandler(AxAgent_DefaultCharacterChange); AxAgent.IdleComplete += new AxAgentObjects._AgentEvents_IdleCompleteEventHandler(AxAgent_IdleComplete); AxAgent.DblClick += new AxAgentObjects._AgentEvents_DblClickEventHandler(AxAgent_DblClick); AxAgent.Bookmark += new AxAgentObjects._AgentEvents_BookmarkEventHandler(AxAgent_Bookmark); AxAgent.Command += new AxAgentObjects._AgentEvents_CommandEventHandler(AxAgent_Command); AxAgent.BalloonHide += new AxAgentObjects._AgentEvents_BalloonHideEventHandler(AxAgent_BalloonHide); AxAgent.AgentPropertyChange += new EventHandler(AxAgent_AgentPropertyChange); AxAgent.SizeEvent += new AxAgentObjects._AgentEvents_SizeEventHandler(AxAgent_Event_Size); AxAgent.DragStart += new AxAgentObjects._AgentEvents_DragStartEventHandler(AxAgent_DragStart); AxAgent.MoveEvent += new AxAgentObjects._AgentEvents_MoveEventHandler(AxAgent_Event_Move); AxAgent.Shutdown += new EventHandler(AxAgent_Shutdown); AxAgent.ShowEvent += new AxAgentObjects._AgentEvents_ShowEventHandler(AxAgent_Event_Show); AxAgent.HelpComplete += new AxAgentObjects._AgentEvents_HelpCompleteEventHandler(AxAgent_HelpComplete); AxAgent.ActiveClientChange += new AxAgentObjects._AgentEvents_ActiveClientChangeEventHandler(AxAgent_ActiveClientChange); AxAgent.RequestComplete += new AxAgentObjects._AgentEvents_RequestCompleteEventHandler(AxAgent_RequestComplete); AxAgent.DragComplete += new AxAgentObjects._AgentEvents_DragCompleteEventHandler(AxAgent_DragComplete); AxAgent.HideEvent += new AxAgentObjects._AgentEvents_HideEventHandler(AxAgent_Event_Hide); AxAgent.RequestStart += new AxAgentObjects._AgentEvents_RequestStartEventHandler(AxAgent_RequestStart); AxAgent.BalloonShow += new AxAgentObjects._AgentEvents_BalloonShowEventHandler(AxAgent_BalloonShow); AxAgent.Restart += new EventHandler(AxAgent_Restart); AxAgent.ListenComplete += new AxAgentObjects._AgentEvents_ListenCompleteEventHandler(AxAgent_ListenComplete); AxAgent.DeactivateInput += new AxAgentObjects._AgentEvents_DeactivateInputEventHandler(AxAgent_DeactivateInput); StatusLabel.Location = new Point(8, 8); StatusLabel.Text = "No character loaded."; StatusLabel.Size = new Size(280, 24); StatusLabel.TabIndex = 1; AutoStopCheck.FlatStyle = FlatStyle.Flat; AutoStopCheck.Checked = true; AutoStopCheck.Enabled = false; AutoStopCheck.Location = new Point(8, 192); AutoStopCheck.Text = "Automatically stop before next action"; AutoStopCheck.Size = new Size(360, 16); AutoStopCheck.CheckState = CheckState.Checked; AutoStopCheck.TabIndex = 6; AutoStopCheck.Click += new EventHandler(AutoStopCheck_Click); PlayButton.FlatStyle = FlatStyle.Flat; PlayButton.Location = new Point(296, 64); PlayButton.Size = new Size(72, 24); PlayButton.TabIndex = 3; PlayButton.Enabled = false; PlayButton.Text = "Play"; PlayButton.Click += new EventHandler(PlayButton_Click); TextToSpeak.Location = new Point(8, 240); TextToSpeak.Text = "Enter some text to be spoken here."; TextToSpeak.Multiline = true; TextToSpeak.ScrollBars = ScrollBars.Vertical; TextToSpeak.TabIndex = 9; TextToSpeak.Enabled = false; TextToSpeak.Size = new Size(280, 72); TextToSpeak.TextChanged += new EventHandler(TextToSpeak_TextChanged); AutoHideCheck.FlatStyle = FlatStyle.Flat; AutoHideCheck.Location = new Point(24, 344); AutoHideCheck.Text = "Auto Hide"; AutoHideCheck.Size = new Size(80, 16); AutoHideCheck.TabIndex = 12; AutoHideCheck.Enabled = false; AutoHideCheck.Click += new EventHandler(AutoHideCheck_Click); TextToSpeakLabel.Location = new Point(8, 224); TextToSpeakLabel.Text = "Text to Speech:"; TextToSpeakLabel.Size = new Size(360, 16); TextToSpeakLabel.TabIndex = 8; PosXLabel.Location = new Point(104, 384); PosXLabel.Text = "X:"; PosXLabel.Size = new Size(24, 16); PosXLabel.TabIndex = 17; PosXLabel.TextAlign = ContentAlignment.MiddleRight; PosYLabel.Location = new Point(208, 384); PosYLabel.Text = "Y:"; PosYLabel.Size = new Size(24, 16); PosYLabel.TabIndex = 19; PosYLabel.TextAlign = ContentAlignment.MiddleRight; AnimationLabel.Location = new Point(8, 48); AnimationLabel.Text = "Animation:"; AnimationLabel.Size = new Size(360, 16); AnimationLabel.TabIndex = 7; PosY.Location = new Point(240, 384); PosY.TabIndex = 21; PosY.Enabled = false; PosY.Size = new Size(48, 20); PosY.TextChanged += new EventHandler(PosY_TextChanged); BalloonCheck.FlatStyle = FlatStyle.Flat; BalloonCheck.Location = new Point(8, 320); BalloonCheck.Text = "Show balloon"; BalloonCheck.Size = new Size(280, 16); BalloonCheck.TabIndex = 11; BalloonCheck.Enabled = false; BalloonCheck.Click += new EventHandler(BalloonCheck_Click); PosX.Location = new Point(136, 384); PosX.TabIndex = 20; PosX.Enabled = false; PosX.Size = new Size(48, 20); PosX.TextChanged += new EventHandler(PosX_TextChanged); MoveButton.FlatStyle = FlatStyle.Flat; MoveButton.Location = new Point(296, 384); MoveButton.Size = new Size(72, 24); MoveButton.TabIndex = 16; MoveButton.Text = "Move"; MoveButton.Enabled = false; MoveButton.Click += new EventHandler(MoveButton_Click); LoadButton.FlatStyle = FlatStyle.Flat; LoadButton.Location = new Point(296, 8); LoadButton.Size = new Size(72, 24); LoadButton.TabIndex = 2; LoadButton.Text = "&Load..."; LoadButton.Click += new EventHandler(LoadButton_Click); SpeakButton.FlatStyle = FlatStyle.Flat; SpeakButton.Location = new Point(296, 240); SpeakButton.Size = new Size(72, 24); SpeakButton.TabIndex = 10; SpeakButton.Text = "Speak"; SpeakButton.Enabled = false; SpeakButton.Click += new EventHandler(SpeakButton_Click); AutoPaceCheck.FlatStyle = FlatStyle.Flat; AutoPaceCheck.Location = new Point(104, 344); AutoPaceCheck.Text = "Auto Pace"; AutoPaceCheck.Size = new Size(80, 16); AutoPaceCheck.TabIndex = 13; AutoPaceCheck.Enabled = false; AutoPaceCheck.Click += new EventHandler(AutoPaceCheck_Click); StopButton.FlatStyle = FlatStyle.Flat; StopButton.Location = new Point(296, 96); StopButton.Size = new Size(72, 24); StopButton.TabIndex = 4; StopButton.Text = "Stop"; StopButton.Enabled = false; StopButton.Click += new EventHandler(StopButton_Click); PositionLabel.Location = new Point(8, 384); PositionLabel.Text = "Position:"; PositionLabel.Size = new Size(280, 16); PositionLabel.TabIndex = 15; AutoSizeCheck.FlatStyle = FlatStyle.Flat; AutoSizeCheck.Location = new Point(184, 344); AutoSizeCheck.Text = "Auto Size"; AutoSizeCheck.Size = new Size(80, 16); AutoSizeCheck.TabIndex = 14; AutoSizeCheck.Enabled = false; AutoSizeCheck.Click += new EventHandler(AutoSizeCheck_Click); SoundsCheck.FlatStyle = FlatStyle.Flat; SoundsCheck.Checked = true; SoundsCheck.Location = new Point(8, 168); SoundsCheck.Text = "Play sounds"; SoundsCheck.Size = new Size(360, 16); SoundsCheck.CheckState = CheckState.Checked; SoundsCheck.TabIndex = 5; SoundsCheck.Enabled = false; SoundsCheck.Click += new EventHandler(SoundsCheck_Click); this.Text = "Agent Demo"; this.AutoScaleBaseSize = new Size(5, 13); this.ClientSize = new Size(376, 416); this.FormBorderStyle = FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.AcceptButton = LoadButton; this.Closing += new System.ComponentModel.CancelEventHandler(AgentDemo_Closing); this.Controls.Add(AxAgent); this.Controls.Add(line1); this.Controls.Add(line2); this.Controls.Add(line3); this.Controls.Add(PosY); this.Controls.Add(PosYLabel); this.Controls.Add(PosX); this.Controls.Add(PosXLabel); this.Controls.Add(MoveButton); this.Controls.Add(PositionLabel); this.Controls.Add(AutoSizeCheck); this.Controls.Add(AutoPaceCheck); this.Controls.Add(AutoHideCheck); this.Controls.Add(BalloonCheck); this.Controls.Add(SpeakButton); this.Controls.Add(TextToSpeak); this.Controls.Add(TextToSpeakLabel); this.Controls.Add(AnimationLabel); this.Controls.Add(AutoStopCheck); this.Controls.Add(SoundsCheck); this.Controls.Add(StopButton); this.Controls.Add(PlayButton); this.Controls.Add(LoadButton); this.Controls.Add(StatusLabel); this.Controls.Add(AnimationList); AxAgent.EndInit(); }