47 lines
812 B
C#
47 lines
812 B
C#
using System;
|
|
|
|
namespace _TUI
|
|
{
|
|
public class TUI
|
|
{
|
|
public TUI()
|
|
{
|
|
|
|
}
|
|
public string Generate()
|
|
{
|
|
string returnstring = "";
|
|
|
|
int w = Console.WindowWidth;
|
|
int h = Console.WindowHeight;
|
|
|
|
char[,] Terminal = new char[w,h];
|
|
|
|
#Console.WriteLine(w);
|
|
#Console.WriteLine(h);
|
|
#Console.WriteLine(Terminal.GetLength(0));
|
|
#Console.WriteLine(Terminal.GetLength(1));
|
|
|
|
for (int i=0; i<w-1; i++) {
|
|
for (int j=0; j<h-1; j++) {
|
|
Console.Write(i);
|
|
Console.Write(" ");
|
|
Console.WriteLine(j);
|
|
if(i == 0 || j == 0 || i == Terminal.GetLength(0) || j == Terminal.GetLength(1) )
|
|
{
|
|
Terminal[i,j] = '#';
|
|
}
|
|
}
|
|
}
|
|
|
|
for (int i=0; i<w-1; i++) {
|
|
for (int j=0; j<h-1; j++) {
|
|
returnstring += Terminal[w,h];
|
|
}
|
|
}
|
|
|
|
return returnstring;
|
|
}
|
|
}
|
|
}
|