예제 #1
0
        public void Start(Addition _addition, ref Path _path, out Result _result)
        {
            addition = _addition;
            addition.CheckAddition();
            path = _path;

            result.MessageAfterCommand = "Переход выполнен!";
            if (IsNewDirectory())
            {
                path    = cdNew.NewDirectory(path, addition);
                _result = result;
                _path   = path;
                return;
            }

            if (IsPreviousDirectory())
            {
                path    = cdParent.PreviousDirectory(path);
                _result = result;
                _path   = path;
                return;
            }

            if (IsNextDirectory())
            {
                path    = cdNext.NextDirectory(path, addition);
                _result = result;
                _path   = path;
                return;
            }

            _path = path;
            result.MessageAfterCommand = "Переход не выполнен (несуществующая директория)";
            _result = result;
        }