using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Microsoft.Ink;
namespace tabletStrator
{
///
/// Summary description for TtsForm.
///
public class TtsForm : System.Windows.Forms.Form
{
private Microsoft.Ink.InkEdit inkEdit1;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public TtsForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.inkEdit1 = new Microsoft.Ink.InkEdit();
this.SuspendLayout();
//
// inkEdit1
//
this.inkEdit1.Cursor = System.Windows.Forms.Cursors.Default;
this.inkEdit1.InkMode = Microsoft.Ink.InkMode.Ink;
this.inkEdit1.Location = new System.Drawing.Point(32, 24);
this.inkEdit1.Name = "inkEdit1";
this.inkEdit1.RecoTimeout = 1000;
this.inkEdit1.Size = new System.Drawing.Size(528, 328);
this.inkEdit1.TabIndex = 0;
this.inkEdit1.Text = "";
this.inkEdit1.UseMouseForInput = true;
this.inkEdit1.Recognition += new Microsoft.Ink.InkEditRecognitionEventHandler(this.inkEdit1_Recognition);
//
// TtsForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(600, 382);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.inkEdit1});
this.Name = "TtsForm";
this.Text = "Ink-To-Speech";
this.Load += new System.EventHandler(this.TtsForm_Load);
this.ResumeLayout(false);
}
#endregion
private void TtsForm_Load(object sender, System.EventArgs e)
{
}
private void inkEdit1_Recognition(object sender, Microsoft.Ink.InkEditRecognitionEventArgs e)
{
RecognitionResult rr = e.RecognitionResult;
string msg = rr.TopString;
SpeechLib.SpeechVoiceSpeakFlags SpFlags = SpeechLib.SpeechVoiceSpeakFlags.SVSFDefault;
SpeechLib.SpVoice Voice = new SpeechLib.SpVoice();
Voice.Speak(msg, SpFlags);
inkEdit1.AppendText("\r\n");
}
}
}