使用MSAgent代替传统的MessageBox提示来增用客户端用户体验
以往的应用程序我们大多都是使用MessageBox来给用户以反馈,不免显得有点呆板,使用MSAgent来改善客户端的用户体验:
传统的提示方法:
使用MSAgent的提示方法:
代码:
axAgent2.Characters.Load("Role",Application.StartupPath+"\\Assistant\\"+"earl.acs");
axAgent2.Characters["Role"].Show(null);
axAgent2.Characters["Role"].Activate(null);
axAgent2.Characters["Role"].SoundEffectsOn=true;
axAgent2.Characters["Role"].Top=200;
axAgent2.Characters["Role"].Left=300;
axAgent2.Characters["Role"].Balloon.FontSize = 11;
axAgent2.Characters["Role"].Balloon.Style = 0x4160001;
axAgent2.Characters["Role"].Speak("正在查询,请稍候",null);
axAgent2.Characters["Role"].Listen(true);
axAgent2.Characters["Role"].Show(null);
axAgent2.Characters["Role"].Activate(null);
axAgent2.Characters["Role"].SoundEffectsOn=true;
axAgent2.Characters["Role"].Top=200;
axAgent2.Characters["Role"].Left=300;
axAgent2.Characters["Role"].Balloon.FontSize = 11;
axAgent2.Characters["Role"].Balloon.Style = 0x4160001;
axAgent2.Characters["Role"].Speak("正在查询,请稍候",null);
axAgent2.Characters["Role"].Listen(true);
下载示例应用程序:https://files.cnblogs.com/lcybest/MSAgentSample.rar