Example #1
0
        protected void OnMessageReceived(object sender, ChatMessageEventArgs args)
        {
            Console.ForegroundColor = ConsoleColor.DarkBlue;
            Console.WriteLine($@"{this.User} just received the message: {args.Autor} - 
{args.SentOn}:{args.Content}");
            Console.ForegroundColor = ConsoleColor.Black;
        }
Example #2
0
        protected void OnMessageReceived(object sender, ChatMessageEventArgs args)
        {
            Console.ForegroundColor = ConsoleColor.DarkMagenta;
            var msgToPrint = $@"<---[{args.Autor}] 
{args.SentOn}====={args.Content}";

            Console.WriteLine(msgToPrint);
            this.hystory.Add(msgToPrint);
            Console.ForegroundColor = ConsoleColor.Black;
        }
 protected void OnMessageRecieve(object sender, ChatMessageEventArgs args)
 {
     Console.WriteLine($"SK-> [{this.User}] | just recieved : [{args.Author}] : {args.Content}");
 }
Example #4
0
        public void PublishMessage(string username, string content)
        {
            var messageArgs = new ChatMessageEventArgs(content, username);

            this.MessageSend(this, messageArgs);
        }
Example #5
0
        public void PublishMessage(string username, string content)
        {
            var msgArgs = new ChatMessageEventArgs(content, username);

            this.ChatRoomEventHandler(this, msgArgs);
        }