Example #1
0
        private void cmnFtpRename_Click(object sender, EventArgs e)
        {
            if (this.lvFtpFiles.SelectedItems.Count != 1)
            {
                return;
            }

            FileDirectoryInfo fdi = this.lvFtpFiles.SelectedItems[0].Tag as FileDirectoryInfo;

            if (fdi == null)
            {
                return;
            }

            NameForm nameForm = new NameForm(fdi.Name);

            if (nameForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (fdi.Name == nameForm.FileName)
                {
                    return;
                }
                this.FtpRename(fdi.Name, nameForm.FileName, fdi.Type == "Файл");
            }
        }
Example #2
0
        private void cmnFtpMakeDirectory_Click(object sender, EventArgs e)
        {
            NameForm nameForm = new NameForm();

            if (nameForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.FtpOperations(nameForm.FileName, WebRequestMethods.Ftp.MakeDirectory);
            }
        }
Example #3
0
        private void cmnFtpRename_Click(object sender, EventArgs e)
        {
            if (this.lvFtpFiles.SelectedItems.Count != 1) { return; }

            FileDirectoryInfo fdi = this.lvFtpFiles.SelectedItems[0].Tag as FileDirectoryInfo;

            if (fdi == null) { return; }

            NameForm nameForm = new NameForm(fdi.Name);
            if (nameForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (fdi.Name == nameForm.FileName) { return; }
                this.FtpRename(fdi.Name, nameForm.FileName, fdi.Type == "Файл");
            }
        }
Example #4
0
 private void cmnFtpMakeDirectory_Click(object sender, EventArgs e)
 {
     NameForm nameForm = new NameForm();
     if (nameForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         this.FtpOperations(nameForm.FileName, WebRequestMethods.Ftp.MakeDirectory);
     }
 }