/// <summary> /// Show Agent /// </summary> private void ShowAgent() { AgentServer Srv = new AgentServer(); if (Srv == null) { MessageBox.Show("ERROR: Agent Server couldn't be started!"); } IAgentEx SrvEx; // The following cast does the QueryInterface to fetch IAgentEx interface from the IAgent interface, directly supported by the object SrvEx = (IAgentEx)Srv; // First try to load the default character int dwCharID = 0, dwReqID = 0; try { // null is used where VT_EMPTY variant is expected by the COM object String strAgentCharacterFile = null; if (!strFileName.Equals(string.Empty)) { //Get the acs path strAgentCharacterFile = strPath + strFileName; } else { MessageBox.Show("Select Style"); return; } if (TxtSpeakInput.Text.Equals(string.Empty)) { TxtSpeakInput.Text = "Please enter text in textbox"; } //load the acs file SrvEx.Load(strAgentCharacterFile, out dwCharID, out dwReqID); } catch (Exception) { MessageBox.Show("Failed to load Agent character! Exception details:"); } SrvEx.GetCharacterEx(dwCharID, out CharacterEx); //show the agent CharacterEx.Show(0, out dwReqID); }
public void Show(bool Fast) { int nReqID; m_CharacterEx.Show(Conv.ToInt32(Fast), out nReqID); }