/// <summary> /// Permet de visualiser un fichier dans dropbox /// </summary> private void OpenFileDropbox() { if (filesSelected.PreviewUrl == null) { driveBaseDropbox.Download(filesSelected.path, System.IO.Path.GetTempPath() + filesSelected.Nom); System.Diagnostics.Process.Start(System.IO.Path.GetTempPath() + filesSelected.Nom); } else { System.Diagnostics.Process.Start(filesSelected.PreviewUrl); } }
/// <summary> /// Download File /// </summary> /// <param name="paramater"></param> private void ActionDownload(object paramater) { if (filesSelected != null) { SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.FileName = filesSelected.Nom; if (saveFileDialog.ShowDialog() == true) { var DownloadFolderPath = saveFileDialog.FileName.Replace("\\", "/"); if (tabIndex == 0) { driveBaseGoogle.Download(filesSelected.path, DownloadFolderPath); } else { driveBaseGoogle.Download(filesSelected.path, DownloadFolderPath); } } } else { MessageBox.Show("Aucun fichier sélectionné"); } }