Пример #1
0
        private void OpenFileFrm_Load(object sender, EventArgs e)
        {
            string pwdResult =
                MFHelper.NormalizeString(
                    MFCommand.ExecuteCommand(
                        Program.Options.Commands.CurrentDirectory, ""));

            selectedFiles_.Clear();

            RefreshContent(pwdResult);
        }
Пример #2
0
        private bool IsDirectory(string p)
        {
            string fileName = p;

            if (!fileName.StartsWith("/"))
            {
                fileName = currentDirectory_ + "/" + fileName;
            }

            string content =
                MFCommand.ExecuteCommand(Program.Options.Commands.StatFiletype,
                                         fileName);

            return(content.Equals("directory"));
        }
Пример #3
0
        private void RefreshContent(string directory)
        {
            Cursor oldCursor = this.Cursor;

            this.Cursor = Cursors.WaitCursor;

            currentDirectory_ = directory;
            UpdateCurrentDirectory();

            string content =
                MFCommand.ExecuteCommand(Program.Options.Commands.ListFiles,
                                         currentDirectory_);

            ParseContent(content);

            this.Cursor = oldCursor;
        }