예제 #1
0
        private void bEdit_Click(object sender, EventArgs e)
        {
            if (cmbName.Items.Count == 0)
            {
                MessageBox.Show("No save locations to edit. Add a new save location.", "Edit save location", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            DataRow row          = ((DataRowView)cmbName.Items[cmbName.SelectedIndex]).Row;
            Int64   service_type = (Int64)row["service_type"];

            switch (service_type)
            {
            case 0:     //local
                FileSystem fs = new FileSystem(this, true, row);
                fs.ShowDialog();
                break;

            case 1:     //ftp
                FTPLocation ftploc = new FTPLocation(this, true, row);
                ftploc.ShowDialog();
                break;

            case 2:     //dropbox
                DropboxForm boxform = new DropboxForm(this, true, (firedumpdbDataSet.backup_locationsRow)row);
                boxform.Show();
                break;

            case 3:     //google drive
                break;

            default:     //error
                MessageBox.Show("Unknown location service type", "Edit save location", MessageBoxButtons.OK, MessageBoxIcon.Error);
                break;
            }
        }
예제 #2
0
        private void pictureBox5_Click(object sender, EventArgs e)
        {
            FTPLocation ftploc = new FTPLocation(this);

            ftploc.ShowDialog();
        }