Exemple #1
0
        private void tsmiDelete_Click(object sender, EventArgs e)
        {
            if (lvDropboxFiles.SelectedItems.Count > 0)
            {
                DropboxContentInfo content = lvDropboxFiles.SelectedItems[0].Tag as DropboxContentInfo;

                if (content != null)
                {
                    if (MessageBox.Show("Are you sure you want to delete '" + Path.GetFileName(content.Path) + "' from your Dropbox?", "Dropbox - Delete file?",
                                        MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        dropbox.Delete(content.Path);
                        RefreshDirectory();
                    }
                }
            }
        }
Exemple #2
0
        private void tsmiDelete_Click(object sender, EventArgs e)
        {
            if (lvDropboxFiles.SelectedItems.Count > 0)
            {
                DropboxContentInfo content = lvDropboxFiles.SelectedItems[0].Tag as DropboxContentInfo;

                if (content != null)
                {
                    if (MessageBox.Show(string.Format(Resources.DropboxFilesForm_tsmiDelete_Click_Are_you_sure_you_want_to_delete___0___from_your_Dropbox_, Path.GetFileName(content.Path)),
                                        "Dropbox - " + Resources.DropboxFilesForm_tsmiDelete_Click_Delete_file_, MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        dropbox.Delete(content.Path);
                        RefreshDirectory();
                    }
                }
            }
        }