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; }
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}"); }
public void PublishMessage(string username, string content) { var messageArgs = new ChatMessageEventArgs(content, username); this.MessageSend(this, messageArgs); }
public void PublishMessage(string username, string content) { var msgArgs = new ChatMessageEventArgs(content, username); this.ChatRoomEventHandler(this, msgArgs); }