Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void NewClient_IncomingMessageEvent(object sender, string[] recieveMessages)
- {
- if (sender is Client && recieveMessages.Length > 0)
- {
- Console.Beep(440, 500);
- int cursorBeginingTop = Console.CursorTop;
- int cursorBeginingLeft = Console.CursorLeft;
- for (int i = 0; i < recieveMessages.Length; i++)
- {
- Console.MoveBufferArea(0, cursorBeginingTop, Console.BufferWidth, 1, 0, cursorBeginingTop + 2);
- Console.SetCursorPosition(0, cursorBeginingTop);
- Console.BackgroundColor = ConsoleColor.White;
- Console.ForegroundColor = ConsoleColor.Black;
- Console.WriteLine(recieveMessages[i]);
- Console.ResetColor();
- Console.SetCursorPosition(cursorBeginingLeft, cursorBeginingTop + 2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment