public delegate void SpeechDelegate(string strGNo, string strNumber);
private void SpeechNumber(string strGNo, string strNumber)
{
try
{
if (this.InvokeRequired)
{
this.BeginInvoke(new SpeechDelegate(this.SpeechNumber), strGNo, strNumber);
}
else
{
SpeechVoiceSpeakFlags SpFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync;
SpVoice Voice = new SpVoice();
Voice.Voice = Voice.GetVoices().Item(0);
Voice.Rate = 0;
int i = Voice.Speak("请" + strNumber + "号" + strPatientName + "到" + strGNo + "号窗口", SpFlags);
}
}
catch (Exception ex)
{
LogCommon.WriteLog(ex.Source.ToString() + "-" + ex.TargetSite.Name + "-" + ex.Message);
throw ex;
}
}