Exemple #1
0
        public Main()
        {
            InitializeComponent();
            //AxAgentObjects.AxAgent axAgent1 = new AxAgentObjects.AxAgent();

            try
            {
                axAgent1.Characters.Load("Merlin", "C:\\Windows\\MSAgent\\chars\\merlin.acs");
                speaker = axAgent1.Characters["Merlin"];

                speaker.MoveTo(800, 600, null);
                speaker.Show(0);
                speaker.Play("announce");

                speaker.Speak(" سلام", null);
                speaker.MoveTo(100, 100, null);

                speaker.Speak(" هستم روبی من ", null);
                agent = axAgent1;
            }
            catch (FileNotFoundException)
            {
                MessageBox.Show("invalid");
            }
        }
Exemple #2
0
        public Main()
        {
            InitializeComponent();
            //AxAgentObjects.AxAgent axAgent1 = new AxAgentObjects.AxAgent();

            try
            {
                axAgent1.Characters.Load("Merlin", "C:\\Windows\\MSAgent\\chars\\merlin.acs");
                speaker = axAgent1.Characters["Merlin"];

                speaker.MoveTo(800, 600, null);
                speaker.Show(0);
                speaker.Play("announce");

                speaker.Speak(" سلام", null);
                speaker.MoveTo(100, 100, null);


                speaker.Speak(" هستم روبی من ", null);
                agent = axAgent1;
            }
            catch (FileNotFoundException)
            {
                MessageBox.Show("invalid");
            }
        }
Exemple #3
0
        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();
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.axAgent1 = new AxAgentObjects.AxAgent();
     this.speak    = new System.Windows.Forms.Button();
     this.talk     = new System.Windows.Forms.RichTextBox();
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).BeginInit();
     this.SuspendLayout();
     //
     // axAgent1
     //
     this.axAgent1.Enabled  = true;
     this.axAgent1.Location = new System.Drawing.Point(0, 232);
     this.axAgent1.Name     = "axAgent1";
     this.axAgent1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axAgent1.OcxState")));
     this.axAgent1.Size     = new System.Drawing.Size(32, 32);
     this.axAgent1.TabIndex = 0;
     //
     // speak
     //
     this.speak.Location = new System.Drawing.Point(192, 176);
     this.speak.Name     = "speak";
     this.speak.Size     = new System.Drawing.Size(168, 48);
     this.speak.TabIndex = 1;
     this.speak.Text     = "speak";
     this.speak.Click   += new System.EventHandler(this.speak_Click);
     //
     // talk
     //
     this.talk.Location = new System.Drawing.Point(24, 24);
     this.talk.Name     = "talk";
     this.talk.Size     = new System.Drawing.Size(328, 136);
     this.talk.TabIndex = 2;
     this.talk.Text     = "";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(376, 270);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.talk,
         this.speak,
         this.axAgent1
     });
     this.Name  = "Form1";
     this.Text  = "Form1";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).EndInit();
     this.ResumeLayout(false);
 }
        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();
        }
Exemple #6
0
 /// <summary>
 /// 设计器支持所需的方法 - 不要
 /// 使用代码编辑器修改此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Frm_Main));
     this.listBox1 = new System.Windows.Forms.ListBox();
     this.axAgent1 = new AxAgentObjects.AxAgent();
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).BeginInit();
     this.SuspendLayout();
     //
     // listBox1
     //
     this.listBox1.FormattingEnabled = true;
     this.listBox1.ItemHeight = 12;
     this.listBox1.Location = new System.Drawing.Point(9, 10);
     this.listBox1.Name = "listBox1";
     this.listBox1.Size = new System.Drawing.Size(176, 172);
     this.listBox1.TabIndex = 1;
     this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
     //
     // axAgent1
     //
     this.axAgent1.Enabled = true;
     this.axAgent1.Location = new System.Drawing.Point(0, 0);
     this.axAgent1.Name = "axAgent1";
     this.axAgent1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axAgent1.OcxState")));
     this.axAgent1.Size = new System.Drawing.Size(75, 23);
     this.axAgent1.TabIndex = 2;
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.BackgroundImage = global::OfficeAgent.Properties.Resources._02;
     this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.ClientSize = new System.Drawing.Size(283, 188);
     this.Controls.Add(this.listBox1);
     this.Controls.Add(this.axAgent1);
     this.Name = "Form1";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text = "制作类似Office的提示精灵";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).EndInit();
     this.ResumeLayout(false);
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(EntryReader));
     this.agentHost      = new AxAgentObjects.AxAgent();
     this.btnUnload      = new System.Windows.Forms.Button();
     this.cmbCharacter   = new System.Windows.Forms.ComboBox();
     this.lblCharacter   = new System.Windows.Forms.Label();
     this.chkShowBalloon = new System.Windows.Forms.CheckBox();
     this.chkAutoSpeak   = new System.Windows.Forms.CheckBox();
     ((System.ComponentModel.ISupportInitialize)(this.agentHost)).BeginInit();
     this.SuspendLayout();
     //
     // agentHost
     //
     this.agentHost.Enabled     = true;
     this.agentHost.Location    = new System.Drawing.Point(8, 48);
     this.agentHost.Name        = "agentHost";
     this.agentHost.OcxState    = ((System.Windows.Forms.AxHost.State)(resources.GetObject("agentHost.OcxState")));
     this.agentHost.Size        = new System.Drawing.Size(32, 32);
     this.agentHost.TabIndex    = 0;
     this.agentHost.MoveEvent  += new AxAgentObjects._AgentEvents_MoveEventHandler(this.agentHost_MoveEvent);
     this.agentHost.ClickEvent += new AxAgentObjects._AgentEvents_ClickEventHandler(this.a_ClickEvent);
     this.agentHost.Command    += new AxAgentObjects._AgentEvents_CommandEventHandler(this.a_Command);
     this.agentHost.HideEvent  += new AxAgentObjects._AgentEvents_HideEventHandler(this.a_HideEvent);
     //
     // btnUnload
     //
     this.btnUnload.Location = new System.Drawing.Point(8, 80);
     this.btnUnload.Name     = "btnUnload";
     this.btnUnload.Size     = new System.Drawing.Size(88, 23);
     this.btnUnload.TabIndex = 1;
     this.btnUnload.Text     = "Unload";
     this.btnUnload.Click   += new System.EventHandler(this.btnUnload_Click);
     //
     // cmbCharacter
     //
     this.cmbCharacter.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmbCharacter.Location              = new System.Drawing.Point(96, 16);
     this.cmbCharacter.Name                  = "cmbCharacter";
     this.cmbCharacter.Size                  = new System.Drawing.Size(121, 21);
     this.cmbCharacter.TabIndex              = 2;
     this.cmbCharacter.SelectedIndexChanged += new System.EventHandler(this.cmbCharacter_SelectedIndexChanged);
     //
     // lblCharacter
     //
     this.lblCharacter.Location = new System.Drawing.Point(16, 18);
     this.lblCharacter.Name     = "lblCharacter";
     this.lblCharacter.Size     = new System.Drawing.Size(64, 23);
     this.lblCharacter.TabIndex = 3;
     this.lblCharacter.Text     = "Character:";
     //
     // chkShowBalloon
     //
     this.chkShowBalloon.Checked         = true;
     this.chkShowBalloon.CheckState      = System.Windows.Forms.CheckState.Checked;
     this.chkShowBalloon.Location        = new System.Drawing.Point(112, 48);
     this.chkShowBalloon.Name            = "chkShowBalloon";
     this.chkShowBalloon.TabIndex        = 4;
     this.chkShowBalloon.Text            = "Show Balloon";
     this.chkShowBalloon.CheckedChanged += new System.EventHandler(this.chkShowBalloon_CheckedChanged);
     //
     // chkAutoSpeak
     //
     this.chkAutoSpeak.Checked         = true;
     this.chkAutoSpeak.CheckState      = System.Windows.Forms.CheckState.Checked;
     this.chkAutoSpeak.Location        = new System.Drawing.Point(112, 80);
     this.chkAutoSpeak.Name            = "chkAutoSpeak";
     this.chkAutoSpeak.TabIndex        = 5;
     this.chkAutoSpeak.Text            = "Auto-speak";
     this.chkAutoSpeak.CheckedChanged += new System.EventHandler(this.chkAutoSpeak_CheckedChanged);
     //
     // EntryReader
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(226, 114);
     this.Controls.Add(this.chkAutoSpeak);
     this.Controls.Add(this.chkShowBalloon);
     this.Controls.Add(this.lblCharacter);
     this.Controls.Add(this.cmbCharacter);
     this.Controls.Add(this.btnUnload);
     this.Controls.Add(this.agentHost);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
     this.Name            = "EntryReader";
     this.ShowInTaskbar   = false;
     this.Text            = "Entry Reader Options";
     this.Closing        += new System.ComponentModel.CancelEventHandler(this.EntryReader_Closing);
     ((System.ComponentModel.ISupportInitialize)(this.agentHost)).EndInit();
     this.ResumeLayout(false);
 }
Exemple #8
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmMain));
     this.axAgent1 = new AxAgentObjects.AxAgent();
     this.MicVolume = new System.Windows.Forms.ProgressBar();
     this.contextMenu1 = new System.Windows.Forms.ContextMenu();
     this.menuItem3 = new System.Windows.Forms.MenuItem();
     this.menuItem5 = new System.Windows.Forms.MenuItem();
     this.menuItem4 = new System.Windows.Forms.MenuItem();
     this.menuItem6 = new System.Windows.Forms.MenuItem();
     this.menuItem7 = new System.Windows.Forms.MenuItem();
     this.menuItem12 = new System.Windows.Forms.MenuItem();
     this.menuItem10 = new System.Windows.Forms.MenuItem();
     this.menuItem9 = new System.Windows.Forms.MenuItem();
     this.menuItem8 = new System.Windows.Forms.MenuItem();
     this.menuItem13 = new System.Windows.Forms.MenuItem();
     this.menuItem1 = new System.Windows.Forms.MenuItem();
     this.menuItem2 = new System.Windows.Forms.MenuItem();
     this.pictureBox1 = new System.Windows.Forms.PictureBox();
     this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
     this.timer1 = new System.Windows.Forms.Timer(this.components);
     this.timer2 = new System.Windows.Forms.Timer(this.components);
     this.label1 = new System.Windows.Forms.Label();
     this.label2 = new System.Windows.Forms.Label();
     this.menuItem11 = new System.Windows.Forms.MenuItem();
     this.menuItem14 = new System.Windows.Forms.MenuItem();
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).BeginInit();
     this.SuspendLayout();
     //
     // axAgent1
     //
     this.axAgent1.Enabled = true;
     this.axAgent1.Location = new System.Drawing.Point(48, 40);
     this.axAgent1.Name = "axAgent1";
     this.axAgent1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axAgent1.OcxState")));
     this.axAgent1.Size = new System.Drawing.Size(32, 32);
     this.axAgent1.TabIndex = 0;
     this.axAgent1.TabStop = false;
     this.axAgent1.Visible = false;
     this.axAgent1.ClickEvent += new AxAgentObjects._AgentEvents_ClickEventHandler(this.axAgent1_ClickEvent);
     this.axAgent1.DragComplete += new AxAgentObjects._AgentEvents_DragCompleteEventHandler(this.axAgent1_DragComplete);
     this.axAgent1.DragStart += new AxAgentObjects._AgentEvents_DragStartEventHandler(this.axAgent1_DragStart);
     //
     // MicVolume
     //
     this.MicVolume.ContextMenu = this.contextMenu1;
     this.MicVolume.Location = new System.Drawing.Point(8, 136);
     this.MicVolume.Name = "MicVolume";
     this.MicVolume.Size = new System.Drawing.Size(112, 16);
     this.MicVolume.TabIndex = 3;
     //
     // contextMenu1
     //
     this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                                  this.menuItem3,
                                                                                  this.menuItem11,
                                                                                  this.menuItem14,
                                                                                  this.menuItem5,
                                                                                  this.menuItem4,
                                                                                  this.menuItem6,
                                                                                  this.menuItem7,
                                                                                  this.menuItem12,
                                                                                  this.menuItem10,
                                                                                  this.menuItem9,
                                                                                  this.menuItem8,
                                                                                  this.menuItem13,
                                                                                  this.menuItem1,
                                                                                  this.menuItem2});
     //
     // menuItem3
     //
     this.menuItem3.Index = 0;
     this.menuItem3.Text = "Stop listen";
     this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
     //
     // menuItem5
     //
     this.menuItem5.Index = 3;
     this.menuItem5.Text = "-";
     //
     // menuItem4
     //
     this.menuItem4.Index = 4;
     this.menuItem4.Text = "Add favorites";
     this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
     //
     // menuItem6
     //
     this.menuItem6.Index = 5;
     this.menuItem6.Text = "Change character";
     this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
     //
     // menuItem7
     //
     this.menuItem7.Index = 6;
     this.menuItem7.Text = "Change accuracy limit";
     this.menuItem7.Click += new System.EventHandler(this.menuItem7_Click);
     //
     // menuItem12
     //
     this.menuItem12.Index = 7;
     this.menuItem12.Text = "-";
     //
     // menuItem10
     //
     this.menuItem10.Index = 8;
     this.menuItem10.Text = "Change user profile";
     this.menuItem10.Click += new System.EventHandler(this.menuItem10_Click);
     //
     // menuItem9
     //
     this.menuItem9.Index = 9;
     this.menuItem9.Text = "Mic training wizard...";
     this.menuItem9.Click += new System.EventHandler(this.menuItem9_Click);
     //
     // menuItem8
     //
     this.menuItem8.Index = 10;
     this.menuItem8.Text = "User training wizard...";
     this.menuItem8.Click += new System.EventHandler(this.menuItem8_Click);
     //
     // menuItem13
     //
     this.menuItem13.Index = 11;
     this.menuItem13.Text = "Profile proporties wizard...";
     this.menuItem13.Click += new System.EventHandler(this.menuItem13_Click);
     //
     // menuItem1
     //
     this.menuItem1.Index = 12;
     this.menuItem1.Text = "-";
     //
     // menuItem2
     //
     this.menuItem2.Index = 13;
     this.menuItem2.Text = "Exit";
     this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
     //
     // pictureBox1
     //
     this.pictureBox1.BackColor = System.Drawing.Color.Navy;
     this.pictureBox1.ContextMenu = this.contextMenu1;
     this.pictureBox1.Location = new System.Drawing.Point(0, 128);
     this.pictureBox1.Name = "pictureBox1";
     this.pictureBox1.Size = new System.Drawing.Size(128, 64);
     this.pictureBox1.TabIndex = 4;
     this.pictureBox1.TabStop = false;
     //
     // openFileDialog1
     //
     this.openFileDialog1.Filter = "Agent *.acs|*.acs";
     //
     // timer1
     //
     this.timer1.Interval = 10;
     this.timer1.Tick += new System.EventHandler(this.timer1_Tick_1);
     //
     // timer2
     //
     this.timer2.Interval = 500;
     this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
     //
     // label1
     //
     this.label1.BackColor = System.Drawing.Color.Navy;
     this.label1.ContextMenu = this.contextMenu1;
     this.label1.ForeColor = System.Drawing.SystemColors.HighlightText;
     this.label1.Location = new System.Drawing.Point(8, 158);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(112, 16);
     this.label1.TabIndex = 7;
     this.label1.Text = "label1";
     //
     // label2
     //
     this.label2.BackColor = System.Drawing.Color.Navy;
     this.label2.ContextMenu = this.contextMenu1;
     this.label2.ForeColor = System.Drawing.SystemColors.HighlightText;
     this.label2.Location = new System.Drawing.Point(8, 173);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(112, 16);
     this.label2.TabIndex = 8;
     this.label2.Text = "Accuracy 0%";
     //
     // menuItem11
     //
     this.menuItem11.Index = 1;
     this.menuItem11.Text = "-";
     //
     // menuItem14
     //
     this.menuItem14.Checked = true;
     this.menuItem14.Index = 2;
     this.menuItem14.Text = "Use agent";
     this.menuItem14.Click += new System.EventHandler(this.menuItem14_Click);
     //
     // frmMain
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(192)), ((System.Byte)(255)));
     this.ClientSize = new System.Drawing.Size(128, 192);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                   this.label2,
                                                                   this.label1,
                                                                   this.MicVolume,
                                                                   this.axAgent1,
                                                                   this.pictureBox1});
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name = "frmMain";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text = "Speech Recognition";
     this.TopMost = true;
     this.TransparencyKey = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(192)), ((System.Byte)(255)));
     this.Load += new System.EventHandler(this.frmMain_Load);
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).EndInit();
     this.ResumeLayout(false);
 }
Exemple #9
0
        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();
        }
Exemple #10
0
 /// <summary>
 /// This method is required for Windows Forms designer support.
 /// Do not change the method contents inside the source code editor. The Forms designer might
 /// not be able to load this method if it was changed manually.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
     this.inputBox               = new System.Windows.Forms.RichTextBox();
     this.menu_autoSpeak         = new System.Windows.Forms.MenuItem();
     this.outputBox              = new System.Windows.Forms.RichTextBox();
     this.sendButton             = new System.Windows.Forms.Button();
     this.saveFileDialog1        = new System.Windows.Forms.SaveFileDialog();
     this.agentSpeakingChecker   = new System.Windows.Forms.Timer(this.components);
     this.menuItem2              = new System.Windows.Forms.MenuItem();
     this.menuItem3              = new System.Windows.Forms.MenuItem();
     this.menuSettingsContribute = new System.Windows.Forms.MenuItem();
     this.menuHelpUpdate         = new System.Windows.Forms.MenuItem();
     this.openFileDialog1        = new System.Windows.Forms.OpenFileDialog();
     this.menuFileSaveAs         = new System.Windows.Forms.MenuItem();
     this.menuListen             = new System.Windows.Forms.MenuItem();
     this.panel4            = new System.Windows.Forms.Panel();
     this.menuFileClose     = new System.Windows.Forms.MenuItem();
     this.idleControl       = new System.Windows.Forms.Timer(this.components);
     this.menuFileOpen      = new System.Windows.Forms.MenuItem();
     this.menuToolAgent     = new System.Windows.Forms.MenuItem();
     this.panelBottom       = new System.Windows.Forms.Panel();
     this.menuHelp          = new System.Windows.Forms.MenuItem();
     this.menuNew           = new System.Windows.Forms.MenuItem();
     this.axAgent1          = new AxAgentObjects.AxAgent();
     this.panel1            = new System.Windows.Forms.Panel();
     this.panel2            = new System.Windows.Forms.Panel();
     this.panel3            = new System.Windows.Forms.Panel();
     this.mainMenu1         = new System.Windows.Forms.MainMenu();
     this.statusBar         = new System.Windows.Forms.StatusBar();
     this.menuItem4         = new System.Windows.Forms.MenuItem();
     this.menuFileSave      = new System.Windows.Forms.MenuItem();
     this.menuToolsEdit     = new System.Windows.Forms.MenuItem();
     this.menuItem1         = new System.Windows.Forms.MenuItem();
     this.menuHelpAbout     = new System.Windows.Forms.MenuItem();
     this.menuToolsCount    = new System.Windows.Forms.MenuItem();
     this.menuVoiceTraining = new System.Windows.Forms.MenuItem();
     this.panel4.SuspendLayout();
     this.panelBottom.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).BeginInit();
     this.panel1.SuspendLayout();
     this.panel3.SuspendLayout();
     this.SuspendLayout();
     //
     // inputBox
     //
     this.inputBox.Dock      = System.Windows.Forms.DockStyle.Fill;
     this.inputBox.Location  = new System.Drawing.Point(0, 0);
     this.inputBox.Name      = "inputBox";
     this.inputBox.Size      = new System.Drawing.Size(365, 76);
     this.inputBox.TabIndex  = 1;
     this.inputBox.Text      = "";
     this.inputBox.KeyDown  += new System.Windows.Forms.KeyEventHandler(this.InputBoxKeyDown);
     this.inputBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.InputBoxKeyPress);
     //
     // menu_autoSpeak
     //
     this.menu_autoSpeak.Index      = 2;
     this.menu_autoSpeak.RadioCheck = true;
     this.menu_autoSpeak.Text       = "Auto Speaking";
     this.menu_autoSpeak.Click     += new System.EventHandler(this.Menu_autoSpeakClick);
     //
     // outputBox
     //
     this.outputBox.BackColor = System.Drawing.Color.White;
     this.outputBox.Dock      = System.Windows.Forms.DockStyle.Fill;
     this.outputBox.Font      = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.World);
     this.outputBox.Location  = new System.Drawing.Point(0, 0);
     this.outputBox.Name      = "outputBox";
     this.outputBox.Size      = new System.Drawing.Size(445, 171);
     this.outputBox.TabIndex  = 9;
     this.outputBox.Text      = "";
     //
     // sendButton
     //
     this.sendButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.sendButton.Location  = new System.Drawing.Point(5, 0);
     this.sendButton.Name      = "sendButton";
     this.sendButton.Size      = new System.Drawing.Size(64, 74);
     this.sendButton.TabIndex  = 2;
     this.sendButton.Text      = "&Send";
     this.sendButton.Click    += new System.EventHandler(this.SendButtonClick);
     //
     // agentSpeakingChecker
     //
     this.agentSpeakingChecker.Interval = 50;
     this.agentSpeakingChecker.Tick    += new System.EventHandler(this.AgentSpeakingCheckerTick);
     //
     // menuItem2
     //
     this.menuItem2.Index = 1;
     this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuToolsCount,
         this.menuToolsEdit,
         this.menuToolAgent
     });
     this.menuItem2.Text = "Tools";
     //
     // menuItem3
     //
     this.menuItem3.Index = 2;
     this.menuItem3.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuListen,
         this.menuVoiceTraining,
         this.menu_autoSpeak,
         this.menuSettingsContribute
     });
     this.menuItem3.Text = "Settings";
     //
     // menuSettingsContribute
     //
     this.menuSettingsContribute.Index  = 3;
     this.menuSettingsContribute.Text   = "Sync Mind ...";
     this.menuSettingsContribute.Click += new System.EventHandler(this.MenuSettingsContributeClick);
     //
     // menuHelpUpdate
     //
     this.menuHelpUpdate.Index  = 2;
     this.menuHelpUpdate.Text   = "Update";
     this.menuHelpUpdate.Click += new System.EventHandler(this.MenuHelpUpdateClick);
     //
     // menuFileSaveAs
     //
     this.menuFileSaveAs.Index  = 3;
     this.menuFileSaveAs.Text   = "Save as...";
     this.menuFileSaveAs.Click += new System.EventHandler(this.MenuFileSaveAsClick);
     //
     // menuListen
     //
     this.menuListen.Index  = 0;
     this.menuListen.Text   = "Listen!";
     this.menuListen.Click += new System.EventHandler(this.MenuListenClick);
     //
     // panel4
     //
     this.panel4.Controls.Add(this.inputBox);
     this.panel4.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.panel4.Location = new System.Drawing.Point(8, 0);
     this.panel4.Name     = "panel4";
     this.panel4.Size     = new System.Drawing.Size(365, 76);
     this.panel4.TabIndex = 4;
     //
     // menuFileClose
     //
     this.menuFileClose.Index  = 4;
     this.menuFileClose.Text   = "Close";
     this.menuFileClose.Click += new System.EventHandler(this.MenuFileCloseClick);
     //
     // idleControl
     //
     this.idleControl.Interval = 50000;
     this.idleControl.Tick    += new System.EventHandler(this.IdleControlTick);
     //
     // menuFileOpen
     //
     this.menuFileOpen.Index  = 1;
     this.menuFileOpen.Text   = "Open";
     this.menuFileOpen.Click += new System.EventHandler(this.MenuFileOpenClick);
     //
     // menuToolAgent
     //
     this.menuToolAgent.Index  = 2;
     this.menuToolAgent.Text   = "Load Agent";
     this.menuToolAgent.Click += new System.EventHandler(this.MenuToolAgentClick);
     //
     // panelBottom
     //
     this.panelBottom.Controls.Add(this.panel4);
     this.panelBottom.Controls.Add(this.panel3);
     this.panelBottom.Controls.Add(this.panel2);
     this.panelBottom.Controls.Add(this.statusBar);
     this.panelBottom.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.panelBottom.Location = new System.Drawing.Point(0, 171);
     this.panelBottom.Name     = "panelBottom";
     this.panelBottom.Size     = new System.Drawing.Size(445, 97);
     this.panelBottom.TabIndex = 5;
     //
     // menuHelp
     //
     this.menuHelp.Index  = 0;
     this.menuHelp.Text   = "Help";
     this.menuHelp.Click += new System.EventHandler(this.MenuHelpClick);
     //
     // menuNew
     //
     this.menuNew.Index  = 0;
     this.menuNew.Text   = "New";
     this.menuNew.Click += new System.EventHandler(this.MenuNewClick);
     //
     // axAgent1
     //
     this.axAgent1.ContainingControl = this;
     this.axAgent1.Enabled           = true;
     this.axAgent1.Location          = new System.Drawing.Point(32, 97);
     this.axAgent1.Name     = "axAgent1";
     this.axAgent1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axAgent1.OcxState")));
     this.axAgent1.Size     = new System.Drawing.Size(32, 32);
     this.axAgent1.TabIndex = 0;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.axAgent1);
     this.panel1.Location = new System.Drawing.Point(448, 22);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(104, 141);
     this.panel1.TabIndex = 2;
     //
     // panel2
     //
     this.panel2.Dock     = System.Windows.Forms.DockStyle.Left;
     this.panel2.Location = new System.Drawing.Point(0, 0);
     this.panel2.Name     = "panel2";
     this.panel2.Size     = new System.Drawing.Size(8, 76);
     this.panel2.TabIndex = 2;
     //
     // panel3
     //
     this.panel3.Controls.Add(this.sendButton);
     this.panel3.Dock     = System.Windows.Forms.DockStyle.Right;
     this.panel3.Location = new System.Drawing.Point(373, 0);
     this.panel3.Name     = "panel3";
     this.panel3.Size     = new System.Drawing.Size(72, 76);
     this.panel3.TabIndex = 3;
     //
     // mainMenu1
     //
     this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItem1,
         this.menuItem2,
         this.menuItem3,
         this.menuItem4
     });
     //
     // statusBar
     //
     this.statusBar.Location = new System.Drawing.Point(0, 76);
     this.statusBar.Name     = "statusBar";
     this.statusBar.Size     = new System.Drawing.Size(445, 21);
     this.statusBar.TabIndex = 0;
     //
     // menuItem4
     //
     this.menuItem4.Index = 3;
     this.menuItem4.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuHelp,
         this.menuHelpUpdate,
         this.menuHelpAbout
     });
     this.menuItem4.Text = "?";
     //
     // menuFileSave
     //
     this.menuFileSave.Index  = 2;
     this.menuFileSave.Text   = "Save";
     this.menuFileSave.Click += new System.EventHandler(this.MenuFileSaveClick);
     //
     // menuToolsEdit
     //
     this.menuToolsEdit.Index  = 1;
     this.menuToolsEdit.Text   = "Edit memory";
     this.menuToolsEdit.Click += new System.EventHandler(this.MenuToolsEditClick);
     //
     // menuItem1
     //
     this.menuItem1.Index = 0;
     this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuNew,
         this.menuFileOpen,
         this.menuFileSave,
         this.menuFileSaveAs,
         this.menuFileClose
     });
     this.menuItem1.Text = "File";
     //
     // menuHelpAbout
     //
     this.menuHelpAbout.Index  = 1;
     this.menuHelpAbout.Text   = "About";
     this.menuHelpAbout.Click += new System.EventHandler(this.MenuHelpAboutClick);
     //
     // menuToolsCount
     //
     this.menuToolsCount.Index  = 0;
     this.menuToolsCount.Text   = "Count memory";
     this.menuToolsCount.Click += new System.EventHandler(this.MenuToolsCountClick);
     //
     // menuVoiceTraining
     //
     this.menuVoiceTraining.Index  = 1;
     this.menuVoiceTraining.Text   = "Voice training ...";
     this.menuVoiceTraining.Click += new System.EventHandler(this.MenuVoiceTrainingClick);
     //
     // MainForm
     //
     this.AccessibleName    = " ";
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(445, 268);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.outputBox);
     this.Controls.Add(this.panelBottom);
     this.Icon     = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Menu     = this.mainMenu1;
     this.Name     = "MainForm";
     this.Text     = "preLude @ #";
     this.Closing += new System.ComponentModel.CancelEventHandler(this.MainFormClosing);
     this.panel4.ResumeLayout(false);
     this.panelBottom.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).EndInit();
     this.panel1.ResumeLayout(false);
     this.panel3.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Exemple #11
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.axAgent1 = new AxAgentObjects.AxAgent();
     this.speak = new System.Windows.Forms.Button();
     this.talk = new System.Windows.Forms.RichTextBox();
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).BeginInit();
     this.SuspendLayout();
     //
     // axAgent1
     //
     this.axAgent1.Enabled = true;
     this.axAgent1.Location = new System.Drawing.Point(0, 232);
     this.axAgent1.Name = "axAgent1";
     this.axAgent1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axAgent1.OcxState")));
     this.axAgent1.Size = new System.Drawing.Size(32, 32);
     this.axAgent1.TabIndex = 0;
     //
     // speak
     //
     this.speak.Location = new System.Drawing.Point(192, 176);
     this.speak.Name = "speak";
     this.speak.Size = new System.Drawing.Size(168, 48);
     this.speak.TabIndex = 1;
     this.speak.Text = "speak";
     this.speak.Click += new System.EventHandler(this.speak_Click);
     //
     // talk
     //
     this.talk.Location = new System.Drawing.Point(24, 24);
     this.talk.Name = "talk";
     this.talk.Size = new System.Drawing.Size(328, 136);
     this.talk.TabIndex = 2;
     this.talk.Text = "";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(376, 270);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                   this.talk,
                                                                   this.speak,
                                                                   this.axAgent1});
     this.Name = "Form1";
     this.Text = "Form1";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).EndInit();
     this.ResumeLayout(false);
 }
Exemple #12
0
 /// <summary>
 /// This method is required for Windows Forms designer support.
 /// Do not change the method contents inside the source code editor. The Forms designer might
 /// not be able to load this method if it was changed manually.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
     this.inputBox = new System.Windows.Forms.RichTextBox();
     this.menu_autoSpeak = new System.Windows.Forms.MenuItem();
     this.outputBox = new System.Windows.Forms.RichTextBox();
     this.sendButton = new System.Windows.Forms.Button();
     this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
     this.agentSpeakingChecker = new System.Windows.Forms.Timer(this.components);
     this.menuItem2 = new System.Windows.Forms.MenuItem();
     this.menuToolsCount = new System.Windows.Forms.MenuItem();
     this.menuToolsEdit = new System.Windows.Forms.MenuItem();
     this.menuToolAgent = new System.Windows.Forms.MenuItem();
     this.menuItem3 = new System.Windows.Forms.MenuItem();
     this.menuListen = new System.Windows.Forms.MenuItem();
     this.menuVoiceTraining = new System.Windows.Forms.MenuItem();
     this.menuSettingsContribute = new System.Windows.Forms.MenuItem();
     this.menuHelpUpdate = new System.Windows.Forms.MenuItem();
     this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
     this.menuFileSaveAs = new System.Windows.Forms.MenuItem();
     this.panel4 = new System.Windows.Forms.Panel();
     this.menuFileClose = new System.Windows.Forms.MenuItem();
     this.idleControl = new System.Windows.Forms.Timer(this.components);
     this.menuFileOpen = new System.Windows.Forms.MenuItem();
     this.panelBottom = new System.Windows.Forms.Panel();
     this.panel3 = new System.Windows.Forms.Panel();
     this.panel2 = new System.Windows.Forms.Panel();
     this.statusBar = new System.Windows.Forms.StatusBar();
     this.menuHelp = new System.Windows.Forms.MenuItem();
     this.menuNew = new System.Windows.Forms.MenuItem();
     this.axAgent1 = new AxAgentObjects.AxAgent();
     this.panel1 = new System.Windows.Forms.Panel();
     this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
     this.menuItem1 = new System.Windows.Forms.MenuItem();
     this.menuFileSave = new System.Windows.Forms.MenuItem();
     this.menuItem4 = new System.Windows.Forms.MenuItem();
     this.menuHelpAbout = new System.Windows.Forms.MenuItem();
     this.panel4.SuspendLayout();
     this.panelBottom.SuspendLayout();
     this.panel3.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).BeginInit();
     this.panel1.SuspendLayout();
     this.SuspendLayout();
     //
     // inputBox
     //
     this.inputBox.Dock = System.Windows.Forms.DockStyle.Fill;
     this.inputBox.Location = new System.Drawing.Point(0, 0);
     this.inputBox.Name = "inputBox";
     this.inputBox.Size = new System.Drawing.Size(365, 76);
     this.inputBox.TabIndex = 1;
     this.inputBox.Text = "";
     this.inputBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.InputBoxKeyDown);
     this.inputBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.InputBoxKeyPress);
     //
     // menu_autoSpeak
     //
     this.menu_autoSpeak.Index = 2;
     this.menu_autoSpeak.RadioCheck = true;
     this.menu_autoSpeak.Text = "Auto Speaking";
     this.menu_autoSpeak.Click += new System.EventHandler(this.Menu_autoSpeakClick);
     //
     // outputBox
     //
     this.outputBox.BackColor = System.Drawing.Color.White;
     this.outputBox.Dock = System.Windows.Forms.DockStyle.Fill;
     this.outputBox.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.World);
     this.outputBox.Location = new System.Drawing.Point(0, 0);
     this.outputBox.Name = "outputBox";
     this.outputBox.Size = new System.Drawing.Size(445, 171);
     this.outputBox.TabIndex = 9;
     this.outputBox.Text = "";
     //
     // sendButton
     //
     this.sendButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.sendButton.Location = new System.Drawing.Point(5, 0);
     this.sendButton.Name = "sendButton";
     this.sendButton.Size = new System.Drawing.Size(64, 74);
     this.sendButton.TabIndex = 2;
     this.sendButton.Text = "&Send";
     this.sendButton.Click += new System.EventHandler(this.SendButtonClick);
     //
     // agentSpeakingChecker
     //
     this.agentSpeakingChecker.Interval = 50;
     this.agentSpeakingChecker.Tick += new System.EventHandler(this.AgentSpeakingCheckerTick);
     //
     // menuItem2
     //
     this.menuItem2.Index = 1;
     this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     this.menuToolsCount,
     this.menuToolsEdit,
     this.menuToolAgent});
     this.menuItem2.Text = "Tools";
     //
     // menuToolsCount
     //
     this.menuToolsCount.Index = 0;
     this.menuToolsCount.Text = "Count memory";
     this.menuToolsCount.Click += new System.EventHandler(this.MenuToolsCountClick);
     //
     // menuToolsEdit
     //
     this.menuToolsEdit.Index = 1;
     this.menuToolsEdit.Text = "Edit memory";
     this.menuToolsEdit.Click += new System.EventHandler(this.MenuToolsEditClick);
     //
     // menuToolAgent
     //
     this.menuToolAgent.Index = 2;
     this.menuToolAgent.Text = "Load Agent";
     this.menuToolAgent.Click += new System.EventHandler(this.MenuToolAgentClick);
     //
     // menuItem3
     //
     this.menuItem3.Index = 2;
     this.menuItem3.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     this.menuListen,
     this.menuVoiceTraining,
     this.menu_autoSpeak,
     this.menuSettingsContribute});
     this.menuItem3.Text = "Settings";
     //
     // menuListen
     //
     this.menuListen.Index = 0;
     this.menuListen.Text = "Listen!";
     this.menuListen.Click += new System.EventHandler(this.MenuListenClick);
     //
     // menuVoiceTraining
     //
     this.menuVoiceTraining.Index = 1;
     this.menuVoiceTraining.Text = "Voice training ...";
     this.menuVoiceTraining.Click += new System.EventHandler(this.MenuVoiceTrainingClick);
     //
     // menuSettingsContribute
     //
     this.menuSettingsContribute.Index = 3;
     this.menuSettingsContribute.Text = "Sync Mind ...";
     this.menuSettingsContribute.Click += new System.EventHandler(this.MenuSettingsContributeClick);
     //
     // menuHelpUpdate
     //
     this.menuHelpUpdate.Index = 1;
     this.menuHelpUpdate.Text = "Update";
     this.menuHelpUpdate.Click += new System.EventHandler(this.MenuHelpUpdateClick);
     //
     // menuFileSaveAs
     //
     this.menuFileSaveAs.Index = 3;
     this.menuFileSaveAs.Text = "Save as...";
     this.menuFileSaveAs.Click += new System.EventHandler(this.MenuFileSaveAsClick);
     //
     // panel4
     //
     this.panel4.Controls.Add(this.inputBox);
     this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
     this.panel4.Location = new System.Drawing.Point(8, 0);
     this.panel4.Name = "panel4";
     this.panel4.Size = new System.Drawing.Size(365, 76);
     this.panel4.TabIndex = 4;
     //
     // menuFileClose
     //
     this.menuFileClose.Index = 4;
     this.menuFileClose.Text = "Close";
     this.menuFileClose.Click += new System.EventHandler(this.MenuFileCloseClick);
     //
     // idleControl
     //
     this.idleControl.Interval = 50000;
     this.idleControl.Tick += new System.EventHandler(this.IdleControlTick);
     //
     // menuFileOpen
     //
     this.menuFileOpen.Index = 1;
     this.menuFileOpen.Text = "Open";
     this.menuFileOpen.Click += new System.EventHandler(this.MenuFileOpenClick);
     //
     // panelBottom
     //
     this.panelBottom.Controls.Add(this.panel4);
     this.panelBottom.Controls.Add(this.panel3);
     this.panelBottom.Controls.Add(this.panel2);
     this.panelBottom.Controls.Add(this.statusBar);
     this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.panelBottom.Location = new System.Drawing.Point(0, 171);
     this.panelBottom.Name = "panelBottom";
     this.panelBottom.Size = new System.Drawing.Size(445, 97);
     this.panelBottom.TabIndex = 5;
     //
     // panel3
     //
     this.panel3.Controls.Add(this.sendButton);
     this.panel3.Dock = System.Windows.Forms.DockStyle.Right;
     this.panel3.Location = new System.Drawing.Point(373, 0);
     this.panel3.Name = "panel3";
     this.panel3.Size = new System.Drawing.Size(72, 76);
     this.panel3.TabIndex = 3;
     //
     // panel2
     //
     this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
     this.panel2.Location = new System.Drawing.Point(0, 0);
     this.panel2.Name = "panel2";
     this.panel2.Size = new System.Drawing.Size(8, 76);
     this.panel2.TabIndex = 2;
     //
     // statusBar
     //
     this.statusBar.Location = new System.Drawing.Point(0, 76);
     this.statusBar.Name = "statusBar";
     this.statusBar.Size = new System.Drawing.Size(445, 21);
     this.statusBar.TabIndex = 0;
     //
     // menuHelp
     //
     this.menuHelp.Index = 0;
     this.menuHelp.Text = "Help";
     this.menuHelp.Click += new System.EventHandler(this.MenuHelpClick);
     //
     // menuNew
     //
     this.menuNew.Index = 0;
     this.menuNew.Text = "New";
     this.menuNew.Click += new System.EventHandler(this.MenuNewClick);
     //
     // axAgent1
     //
     this.axAgent1.Enabled = true;
     this.axAgent1.Location = new System.Drawing.Point(32, 97);
     this.axAgent1.Name = "axAgent1";
     this.axAgent1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axAgent1.OcxState")));
     this.axAgent1.Size = new System.Drawing.Size(32, 32);
     this.axAgent1.TabIndex = 0;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.axAgent1);
     this.panel1.Location = new System.Drawing.Point(448, 22);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(104, 141);
     this.panel1.TabIndex = 2;
     //
     // mainMenu1
     //
     this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     this.menuItem1,
     this.menuItem2,
     this.menuItem3,
     this.menuItem4});
     //
     // menuItem1
     //
     this.menuItem1.Index = 0;
     this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     this.menuNew,
     this.menuFileOpen,
     this.menuFileSave,
     this.menuFileSaveAs,
     this.menuFileClose});
     this.menuItem1.Text = "File";
     //
     // menuFileSave
     //
     this.menuFileSave.Index = 2;
     this.menuFileSave.Text = "Save";
     this.menuFileSave.Click += new System.EventHandler(this.MenuFileSaveClick);
     //
     // menuItem4
     //
     this.menuItem4.Index = 3;
     this.menuItem4.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     this.menuHelp,
     this.menuHelpUpdate,
     this.menuHelpAbout});
     this.menuItem4.Text = "?";
     //
     // menuHelpAbout
     //
     this.menuHelpAbout.Index = 2;
     this.menuHelpAbout.Text = "About";
     this.menuHelpAbout.Click += new System.EventHandler(this.MenuHelpAboutClick);
     //
     // MainForm
     //
     this.AccessibleName = " ";
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(445, 268);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.outputBox);
     this.Controls.Add(this.panelBottom);
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Menu = this.mainMenu1;
     this.Name = "MainForm";
     this.Text = "preLude @ #";
     this.Closing += new System.ComponentModel.CancelEventHandler(this.MainFormClosing);
     this.panel4.ResumeLayout(false);
     this.panelBottom.ResumeLayout(false);
     this.panel3.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.axAgent1)).EndInit();
     this.panel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmMain));
     this.btnTest       = new System.Windows.Forms.Button();
     this.btnQuit       = new System.Windows.Forms.Button();
     this.TestAgent     = new AxAgentObjects.AxAgent();
     this.ApplicationTT = new System.Windows.Forms.ToolTip(this.components);
     ((System.ComponentModel.ISupportInitialize)(this.TestAgent)).BeginInit();
     this.SuspendLayout();
     //
     // btnTest
     //
     this.btnTest.AccessibleDescription = "This button starts the test function of the application.";
     this.btnTest.AccessibleName        = "Application Test";
     this.btnTest.AccessibleRole        = System.Windows.Forms.AccessibleRole.PushButton;
     this.btnTest.Location = new System.Drawing.Point(208, 8);
     this.btnTest.Name     = "btnTest";
     this.btnTest.TabIndex = 3;
     this.btnTest.Text     = "&Test";
     this.ApplicationTT.SetToolTip(this.btnTest, "This button starts the test function of the application.");
     this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
     //
     // btnQuit
     //
     this.btnQuit.AccessibleDescription = "This button exits the application.";
     this.btnQuit.AccessibleName        = "Application Quit";
     this.btnQuit.AccessibleRole        = System.Windows.Forms.AccessibleRole.PushButton;
     this.btnQuit.DialogResult          = System.Windows.Forms.DialogResult.Cancel;
     this.btnQuit.Location = new System.Drawing.Point(208, 40);
     this.btnQuit.Name     = "btnQuit";
     this.btnQuit.TabIndex = 4;
     this.btnQuit.Text     = "&Quit";
     this.ApplicationTT.SetToolTip(this.btnQuit, "This button exits the application.");
     this.btnQuit.Click += new System.EventHandler(this.btnQuit_Click);
     //
     // TestAgent
     //
     this.TestAgent.AccessibleDescription = "This is the Microsoft Agent control for this application.";
     this.TestAgent.AccessibleName        = "Test Microsoft Agent";
     this.TestAgent.Enabled  = true;
     this.TestAgent.Location = new System.Drawing.Point(248, 224);
     this.TestAgent.Name     = "TestAgent";
     this.TestAgent.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("TestAgent.OcxState")));
     this.TestAgent.Size     = new System.Drawing.Size(32, 32);
     this.TestAgent.TabIndex = 5;
     this.ApplicationTT.SetToolTip(this.TestAgent, "This is the Microsoft Agent control for this application.");
     //
     // ApplicationTT
     //
     this.ApplicationTT.AutomaticDelay = 300;
     this.ApplicationTT.AutoPopDelay   = 7000;
     this.ApplicationTT.InitialDelay   = 300;
     this.ApplicationTT.ReshowDelay    = 60;
     //
     // frmMain
     //
     this.AccessibleDescription = "This application demonstrates the techniques needed to use Microsoft Agent.";
     this.AccessibleName        = "Microsoft Agent Example";
     this.AccessibleRole        = System.Windows.Forms.AccessibleRole.Dialog;
     this.AutoScaleBaseSize     = new System.Drawing.Size(5, 13);
     this.ClientSize            = new System.Drawing.Size(292, 266);
     this.Controls.Add(this.TestAgent);
     this.Controls.Add(this.btnTest);
     this.Controls.Add(this.btnQuit);
     this.Name = "frmMain";
     this.Text = "Microsoft Agent Example";
     this.ApplicationTT.SetToolTip(this, "This application demonstrates the techniques needed to use Microsoft Agent.");
     ((System.ComponentModel.ISupportInitialize)(this.TestAgent)).EndInit();
     this.ResumeLayout(false);
 }