Beispiel #1
0
        /// <summary>
        /// Обработка нажатия Enter
        /// </summary>
        private void PressEnter()
        {
            _selectedRoot    = _selectedDir[_itemDirIndex];
            _selectedDir     = FDWorker.GetDirectory(_selectedRoot);
            _selectedDirName = FDWorker.GetDirectoryNames(_selectedRoot);

            _itemDirIndex = 0;
            _indexController.StartIndex = 0;
            _indexController.EndIndex   = MAX_NUMBER_FILE_NAMES;

            if (_selectedRoot == "")
            {
                _selectedRoot = "Discks";
            }
            else
            {
                _selectedRoot = Directory.GetDirectoryRoot(_selectedRoot);
            }
        }
Beispiel #2
0
        public WindowClass( )
        {
            Console.BackgroundColor = ConsoleColor.DarkBlue;
            Console.Clear();
            Console.WindowHeight = WINDOW_HEIGHT;
            Console.SetBufferSize(Console.WindowWidth, WINDOW_HEIGHT);
            Console.SetWindowSize(Console.WindowWidth, WINDOW_HEIGHT);

            _settingWorker = new SettingWorkerJson();
            _appSetting    = _settingWorker.ReadJsonSetting();

            _selectedDir     = FDWorker.GetDirectory(_appSetting.LastPath);
            _selectedDirName = FDWorker.GetDirectoryNames(_appSetting.LastPath);
            _listInfo        = new List <string> {
                _txtInfo
            };

            _indexController            = new CountControllerInWin();
            _indexController.StartIndex = 0;
            _indexController.EndIndex   = MAX_NUMBER_FILE_NAMES;
        }
Beispiel #3
0
        /// <summary>
        /// Обновление окна
        /// </summary>
        private void UpdateDir()
        {
            _selectedRoot    = Directory.GetParent(_selectedDir[_itemDirIndex]).FullName;;
            _selectedDir     = FDWorker.GetDirectory(_selectedRoot);
            _selectedDirName = FDWorker.GetDirectoryNames(_selectedRoot);

            _itemDirIndex = 0;
            _indexController.StartIndex = 0;
            _indexController.EndIndex   = MAX_NUMBER_FILE_NAMES;

            if (_selectedRoot == "")
            {
                _selectedRoot = "Discks";
            }
            else
            {
                _selectedRoot = Directory.GetDirectoryRoot(_selectedRoot);
            }

            SetStrFieldsEmpty();
        }