private void View_Selected(object sender, EventArgs e)
        {
            var view = (ListView)sender;
            var info = view.SelectedItem.State;

            if (info is FileInfo file)
            {
                Process.Start(file.FullName);
            }
            else if (info is DirectoryInfo dir)
            {
                try
                {
                    var items = GetItems(dir.FullName);
                    view.Clean();
                    view.Items        = items;
                    currentFolder     = dir;
                    view.CurrentState = dir.FullName;
                }
                catch
                {
                    Lines.TableDraw(0, 26, 104, 1);
                    Console.SetCursorPosition(1, 25);
                    Console.WriteLine("CAN'T OPEN FILE");
                }
            }
        }
        public string UserVoid()
        {
            Lines.TableDraw(0, 26, 104, 1);
            Console.SetCursorPosition(1, 25);
            Console.WriteLine("Enter name:");
            Console.SetCursorPosition(12, 25);
            string userInput = Console.ReadLine();

            return(userInput);
        }
        public void Start()
        {
            Console.CursorVisible   = false;
            Console.BackgroundColor = ConsoleColor.DarkBlue;
            ListViewWithPath[] pathedListView = new ListViewWithPath[2];

            for (int i = 0; i < pathedListView.Length; i++)
            {
                pathedListView[i] = new ListViewWithPath(this, 1 + 52 * i, 2);
            }

            int currentIndex = 0;

            while (true)
            {
                var key = Console.ReadKey();

                if (key.Key == ConsoleKey.LeftArrow)
                {
                    currentIndex = 0;
                    pathedListView[0].Active();
                    pathedListView[1].DeActive();
                }
                else if (key.Key == ConsoleKey.RightArrow)
                {
                    currentIndex = 1;
                    pathedListView[0].DeActive();
                    pathedListView[1].Active();
                }

                pathedListView[currentIndex].Update(key);

                for (int i = 0; i < pathedListView.Length; i++)
                {
                    pathedListView[i].Render();
                }

                Lines.TableDraw(0, 24, 104, 1);
                Console.SetCursorPosition(1, 23);
                Console.WriteLine(" COPY-F1| CUT-F2|PASTE-F3| ROOT-F4| LIST OF DISCS-F5| PROPERTIES-F6| RENAME-F7| FIND-F8|NEW FOLDER-F9 ");
            }
        }
 public void DeActive()
 {
     view.Focused = false;
     Lines.TableDraw(52, 1, 52, 22, ConsoleColor.DarkYellow);
     Lines.TableDraw(0, 1, 52, 22, ConsoleColor.Green);
 }