Exemplo n.º 1
0
        private void btnMkdir_Click(object sender, EventArgs e)
        {
            string newdir = Microsoft.VisualBasic.Interaction.InputBox("新目录下 " + lblCurrentDirectory.Text + ":", "创建目录", "");

            if (newdir != "")
            {
                if (!newdir.Contains("."))
                {
                    string newdirfull = (_CurrentPath == "") ? newdir : _CurrentPath + "/" + newdir;
                    Cursor.Current = Cursors.WaitCursor;
                    _ESP.CreateDir(newdirfull);
                    Cursor.Current = Cursors.Default;
                    RefreshFileList();
                }
                else
                {
                    MessageBox.Show("文件名已经存在。");
                }
            }
        }
Exemplo n.º 2
0
        private void btnMkdir_Click(object sender, EventArgs e)
        {
            string newdir = Microsoft.VisualBasic.Interaction.InputBox("New directory under " + lblCurrentDirectory.Text + ":", "Create Directory", "");

            if (newdir != "")
            {
                if (!newdir.Contains("."))
                {
                    string newdirfull = (_CurrentPath == "") ? newdir : _CurrentPath + "/" + newdir;
                    CloseComm();
                    Cursor.Current = Cursors.WaitCursor;
                    _ESP.CreateDir(newdirfull);
                    Cursor.Current = Cursors.Default;
                    RefreshFileList();
                }
                else
                {
                    MessageBox.Show("Cannot create new directory with a period in the name.");
                }
            }
        }