Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Threading;
  7.  
  8. namespace gyakorlas1
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. //Zöld háttér
  15. Console.BackgroundColor = ConsoleColor.DarkGreen;
  16. Console.Clear();
  17. //Kirajzoljuk a keretet
  18. Console.ForegroundColor = ConsoleColor.Gray;
  19. Console.Write('╔');
  20. for (int i = 1; i < Console.WindowWidth; i++)
  21. {
  22. Console.SetCursorPosition(i, 0);
  23. Console.Write('═');
  24. }
  25. Console.SetCursorPosition(Console.WindowWidth-1, 0);
  26. Console.Write('╗');
  27. for (int i = 1; i < Console.WindowHeight; i++)
  28. {
  29. Console.SetCursorPosition(0, i);
  30. Console.Write('║');
  31. }
  32. Console.SetCursorPosition(0, Console.WindowHeight - 1);
  33. Console.Write('╚');
  34. for (int i = 1; i < Console.WindowWidth; i++)
  35. {
  36. Console.SetCursorPosition(i, Console.WindowHeight - 1);
  37. Console.Write('═');
  38. }
  39. for (int i = 1; i < Console.WindowHeight; i++)
  40. {
  41. Console.SetCursorPosition(Console.WindowWidth-1,i);
  42. Console.Write('║');
  43. }
  44. Console.SetCursorPosition(Console.WindowWidth - 1, Console.WindowHeight - 1);
  45. Console.Write('╝');
  46.  
  47.  
  48.  
  49.  
  50. Console.ReadKey();
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement