Esempio n. 1
0
 // Event Handler
 public static void EventHandler(Event e)
 {
     if (bot.InvokeRequired)
        bot.Invoke(new EventInvoke(EventHandler), new object[] { e });
     else
         bot.EventHandler(e);
 }
Esempio n. 2
0
        //  Updates the UI
        public void updatePlayerLocationUI()
        {
            Object mObj = getPlayerObject();

            // Update the UI on our location
            Event e1 = new Event(EventType.EVENT_SELF_MOVED, Time.GetTime(), mObj.coord);
            BoogieCore.Event(e1);

            //Event e2 = new Event(EventType.EVENT_LOCATION_UPDATE, Time.GetTime(), location);
            //BoogieCore.Event(e2);
        }
Esempio n. 3
0
 public void EventHandler(Event e)
 {
     switch (e.eventType)
     {
         case EventType.EVENT_REALMLIST:
             ShowRealmList((Realm[])e.eventArgs[0]);
             break;
         case EventType.EVENT_CHAR_LIST:
             ShowCharList((Character[])e.eventArgs[0]);
             break;
         case EventType.EVENT_CHAT:
             ChatQueue queue = (ChatQueue)e.eventArgs[0];
             _win_chat.Display_Chat((string)e.eventArgs[1], queue.Message, (ChatMsg)queue.Type, queue.Channel);
             break;
         case EventType.EVENT_CHANNEL_JOINED:
             _win_chat.AddChannel((string)e.eventArgs[0]);
             break;
         case EventType.EVENT_CHANNEL_LEFT:
             _win_chat.DelChannel((string)e.eventArgs[0]);
             break;
         case EventType.EVENT_SELF_MOVED:
             _win_move.UpdatePosition((Coordinate)e.eventArgs[0]);
             break;
         case EventType.EVENT_LOCATION_UPDATE:
             locationStatusLabel.Text = (String)e.eventArgs[0];
             break;
         default:
             break;
     }
 }