示例#1
0
 /// <summary>
 /// Handles the file event of the download_click control.
 /// Download/paste this file...
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 void download_click_file(object sender, EventArgs e)
 {
     ToolStripMenuItem item = sender as ToolStripMenuItem;
     string filename = item.Text;
     try
     {
         // Do the actual paste - fetch file from cloud and download/paste it at the current location
         cloud.CloudPasteItem(FolderPath, filename);
     }
     catch (Exception)
     {
         CommonFunctionality.Instance.Authenticate(true); // try again by reauthenticating
         cloud.CloudPasteItem(FolderPath, filename);
     }
 }