public AgentController(AxAgentObjects.AxAgent agentHost, 
			string character)
		{
			agentHost.Characters.Load(character, null);
			agentChar = agentHost.Characters[character];

			characterName = character;

			// You could put your own options in this menu, if desired.
			agentChar.AutoPopupMenu = false;

			// Set balloon style.
			agentChar.Balloon.Style = agentChar.Balloon.Style | BalloonOn;
			agentChar.Balloon.Style = agentChar.Balloon.Style | SizeToText;
			agentChar.Balloon.Style = agentChar.Balloon.Style | AutoHide;		
		}
Exemple #2
0
 /// <summary>
 /// activate timer for start tracking agent location
 /// </summary>
 private void axAgent1_DragStart(object sender, AxAgentObjects._AgentEvents_DragStartEvent e)
 {
     timer1.Enabled=true;
 }
Exemple #3
0
 /// <summary>
 /// deactivate timer and stop tracking
 /// </summary>
 private void axAgent1_DragComplete(object sender, AxAgentObjects._AgentEvents_DragCompleteEvent e)
 {
     timer1.Enabled=false;
 }
Exemple #4
0
 /// <summary>
 /// because agent1 dos not support context menu
 /// we show it in the main form in the clicked place
 /// </summary>
 private void axAgent1_ClickEvent(object sender, AxAgentObjects._AgentEvents_ClickEvent e)
 {
     if (e.button==2)
     {
         Point pnt=new Point(e.x-this.Left,e.y-this.Top);
         contextMenu1.Show(this,pnt);
     }
 }