Ejemplo n.º 1
0
 private void ChangeActivWindow()
 {
     if (_leftWindow == _activWindow)
     {
         _activWindow    = (IWindowActions)_rightWindow;
         _inactiveWindow = (IWindowActions)_leftWindow;
     }
     else
     {
         _activWindow    = (IWindowActions)_leftWindow;
         _inactiveWindow = (IWindowActions)_rightWindow;
     }
 }
Ejemplo n.º 2
0
        public void Start()
        {
            _activWindow    = _leftWindow;
            _inactiveWindow = _rightWindow;

            while (true)
            {
                _inactiveWindow.HideWindow();
                _activWindow.ShowContents();

                var key = Console.ReadKey();

                switch (key.Key)
                {
                case ConsoleKey.Tab:
                    ChangeActivWindow();
                    break;

                case ConsoleKey.Enter:
                    _activWindow.InFolder();
                    break;

                case ConsoleKey.Backspace:
                    _activWindow.InFolder("..");
                    break;

                case ConsoleKey.UpArrow:
                    _activWindow.MuveUp();
                    break;

                case ConsoleKey.DownArrow:
                    _activWindow.MuveDown();
                    break;

                case ConsoleKey.F1:
                    _activWindow.Copy();
                    break;

                case ConsoleKey.F2:
                    _activWindow.Cut();
                    break;

                case ConsoleKey.F3:
                    _activWindow.Paste();
                    break;

                case ConsoleKey.F4:
                    _activWindow.ListOfDisks();
                    break;

                case ConsoleKey.F5:
                    _activWindow.Properties();
                    break;

                case ConsoleKey.F6:
                    _activWindow.Rename();
                    break;

                case ConsoleKey.F7:
                    _activWindow.CriateFolder();
                    break;

                default:
                    break;
                }
            }
        }