public byte[] GetGame(string game) { var foundGame = _service.ListFiles().Where(a => a.FileName == game).OrderByDescending(a => a.LastModified).FirstOrDefault(); var gameBytes = _service.DownloadFile(foundGame); return(gameBytes); }
private void OnChooseFilesGoogleDriveConfirmMsg(ChooseFilesGoogleDriveConfirmMsg msg) { Mouse.OverrideCursor = Cursors.Wait; _googledriveDownloadPathList = new Dictionary <string, string>(); _currentDownloadCount = 0; _googledriveSaveLargeFile = msg.SaveLargeFile; foreach (string fileId in msg.FileIds) { string path = Path.Combine(Path.GetTempPath(), fileId + ".jpg"); _googledriveDownloadPathList.Add(fileId, path); } foreach (var keyValuePair in _googledriveDownloadPathList) { _googleDriveService.DownloadFile(keyValuePair.Key, keyValuePair.Value); } Mouse.OverrideCursor = null; }