private void btnSaveDialogManualUpload_Click(object sender, EventArgs e) { using (DropboxDialogBase dlg = new SaveDropboxDialog()) { if (dlg.ShowDialog(this) == DialogResult.OK) { txtUploadTarget.Text = dlg.SelectedFile; MessageBox.Show(this, "File selected as upload target", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); // The file can be uploaded using the UploadFileToCurrentFolder function //dlg.UploadFileToCurrentFolder(myLocalFilePath); } } }
private void btnSaveDialogAutoUpload_Click(object sender, EventArgs e) { if (File.Exists(txtUploadFile.Text)) { using (DropboxDialogBase dlg = new SaveDropboxDialog()) { dlg.UploadFile = txtUploadFile.Text; if (dlg.ShowDialog(this) == DialogResult.OK) { MessageBox.Show(this, "File uploaded", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); } } } else { MessageBox.Show(this, "File '" + txtUploadFile.Text + "' doesn't exist", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); } }