public static void SetFile(BlockFile blockFile) { blockFile.RenderFile(); }
static async Task Main(string[] args) { Console.CursorVisible = false; Console.SetBufferSize(Console.WindowWidth, Console.WindowHeight); //BlockFile blockFile = new BlockFile(0, Console.WindowWidth - 1, 0, (Console.WindowHeight / 2 + Console.WindowHeight / 3) - 2); //blockFile.DrawWindow(); blockFile1 = new BlockFile(0, Console.WindowWidth / 2 - 1, 0, (Console.WindowHeight / 2 + Console.WindowHeight / 3) - 2, true); blockFile1.DrawWindow(); blockFile2 = new BlockFile((Console.WindowWidth) - Console.WindowWidth / 2, Console.WindowWidth - 1, 0, (Console.WindowHeight / 2 + Console.WindowHeight / 3) - 2, false); blockFile2.DrawWindow(); //BlockInfo blockInfo = new BlockInfo(0, Console.WindowWidth - 1, (Console.WindowHeight / 2 + Console.WindowHeight / 3) - 1, Console.WindowHeight - 2); //blockInfo.DrawWindow(); new Thread(() => SetFile(blockFile1)).Start(); new Thread(() => SetFile(blockFile2)).Start(); //thread1.Start(); //await Task.Run(() => SetFile(blockFile1)); //await Task.Run(() => SetFile(blockFile2)); //Thread thread = new Thread(new ParameterizedThreadStart(SetFile)); //thread.Start(blockFile); //IntPtr handle = GetConsoleWindow(); //EnableScrollBar(handle, 3, 3); //int size = 0; //while (true) //{ // if (Console.WindowHeight != size) // { // Console.Clear(); // //Console.BufferHeight = Console.WindowHeight; // Console.CursorVisible = false; // new BlockWindow(); // //new BlockWindow(1); // //new BlockWindow(2); // size = Console.WindowHeight; // } // //} // //Console.SetCursorPosition(0, 0); // //var path = Environment.OSVersion.Platform == PlatformID.Unix ? @"/home/sasha" : @"C:\Users\Sasha\Downloads\"; // //var manager = new FilesManager(path); // //Console.BufferHeight = manager.ListItems.Count + 1; // //ShowList(manager.ListItems, manager.Selected); // //while (true) // //{ // // Console.CursorVisible = false; // // switch (Console.ReadKey().Key) // // { // // case ConsoleKey.DownArrow: // // manager.Next(); // // break; // // case ConsoleKey.UpArrow: // // manager.Previous(); // // break; // // default: // // break; // // } // // ShowList(manager.ListItems, manager.Selected); // //} // //Console.ReadLine(); //} Console.ReadKey(); }