Exemplo n.º 1
0
        private static void OnChatMessage(object sender, Events.ChatMessageEventArgs e)
        {
            var message = e.ClanName == null?
                          string.Format("<{0}>: {1}", e.Username, e.Message) :
                              string.Format("<[{0}]{1}>: {2}", e.ClanName, e.Username, e.Message);

            Console.WriteLine(message);
        }
Exemplo n.º 2
0
 private static void OnChatMessage(object sender, Events.ChatMessageEventArgs e)
 {
     if (e.ClanName == null)
     {
         Console.WriteLine("<[Lvl:{3}]{1}>: {2}", e.Username, e.Message, e.Packet.Level);
     }
     else
     {
         Console.Write("<[");
         Console.ForegroundColor = ConsoleColor.DarkMagenta;
         Console.Write(e.ClanName);
         Console.ResetColor();
         Console.Write("][Lvl:{0}]", e.Packet.Level);
         Console.WriteLine("{0}>: {1}", e.Username, e.Message);
     }
 }
Exemplo n.º 3
0
 protected internal virtual void OnChatMessage(ChatMessageEventArgs e)
 {
     if (ChatMessage != null)
         ChatMessage(this, e);
 }