Exemple #1
0
        private void btnMakeDir_Click(object sender, System.EventArgs e)
        {
            if (!ftp1.Active)
            {
                return;
            }

            string s = NewDialog.ShowNewDialog("New Dir Name", "NewName");

            if (s != "")
            {
                ftp1.MakeDir(s);
                FillDirList();
            }
        }
Exemple #2
0
        private void btnRename_Click(object sender, System.EventArgs e)
        {
            if (!ftp1.Active)
            {
                return;
            }

            if ((lbList.SelectedIndex > -1) &&
                (lbList.Items[lbList.SelectedIndex].ToString() != "") &&
                (lbList.Items[lbList.SelectedIndex].ToString()[0] != '/'))
            {
                string s = NewDialog.ShowNewDialog("New File Name", lbList.Items[lbList.SelectedIndex].ToString());

                if ((s != "") && (s != lbList.Items[lbList.SelectedIndex].ToString()))
                {
                    ftp1.Rename(lbList.Items[lbList.SelectedIndex].ToString(), s);
                    FillDirList();
                }
            }
        }