private async Task RefreshFilesAsync()
        {
            AbortCurrentCall();

            try
            {
                var currentFolderId = _mainModel.CurrentFolderId;

                await _mainModel.CheckToken(_cancellationTokenSource.Token);

                _systemTrayService.SetProgressIndicator("Refreshing the file list...");

                Files.Clear();
                PictureFiles.Clear();

                string pageToken = null;

                while (true)
                {
                    var filesListResponse = await _googleDriveService.FilesList(_mainModel.CurrentAccount.AuthToken, new GoogleDriveFilesListRequest()
                    {
                        Query = "trashed=false and '{0}' in parents".FormatWith(currentFolderId),
                        Fields = GoogleDriveFilesListFields,
                        PageToken = pageToken
                    }, _cancellationTokenSource.Token);

                    if (filesListResponse.Items != null)
                    {
                        foreach (var item in filesListResponse.Items)
                        {
                            var googleFileViewModel = new GoogleFileViewModel(item);

                            Files.Add(googleFileViewModel);

                            if (item != null && !string.IsNullOrEmpty(item.ThumbnailLink))
                            {
                                PictureFiles.Add(googleFileViewModel);
                            }
                        }
                    }

                    pageToken = filesListResponse.NextPageToken;

                    if (string.IsNullOrEmpty(pageToken))
                    {
                        _systemTrayService.HideProgressIndicator();

                        return;
                    }
                }
            }
            catch (TaskCanceledException)
            {
                _systemTrayService.HideProgressIndicator();
            }
            catch (Exception)
            {
                _systemTrayService.HideProgressIndicator();

                _messageBoxService.Show("Unable to update the file list!", "Error");
            }
        }
        private async Task<bool> DeleteFileAsync(GoogleFileViewModel fileViewModel)
        {
            try
            {
                await _mainModel.CheckToken(_cancellationTokenSource.Token);

                _systemTrayService.SetProgressIndicator(string.Format("Deleting: {0}...", fileViewModel.Title));

                await _googleDriveService.FilesDelete(_mainModel.CurrentAccount.AuthToken, fileViewModel.Id, _cancellationTokenSource.Token);

                lock (Files)
                {
                    if (Files.Contains(fileViewModel))
                    {
                        Files.Remove(fileViewModel);
                    }
                }

                return true;
            }
            catch
            {
                _systemTrayService.HideProgressIndicator();

                _messageBoxService.Show(string.Format("Unable to delete '{0}'!", fileViewModel.Title), "Error");
            }

            return false;
        }
        private async void DeleteFile(GoogleFileViewModel fileViewModel)
        {
            AbortCurrentCall();

            await DeleteFileAsync(fileViewModel);

            _systemTrayService.HideProgressIndicator();
        }
        private void RenameFile(GoogleFileViewModel fileViewModel)
        {
            _mainModel.SelectedFile = fileViewModel.FileModel;

            _navigationService.NavigateTo("/View/RenameFilePage.xaml");
        }
        private void UploadFile()
        {
            AbortCurrentCall();

            _photoChooserService.Show(true, result =>
            {
                if (result.TaskResult != Microsoft.Phone.Tasks.TaskResult.OK)
                    return;

                DispatcherHelper.RunAsync(async () =>
                {
                    try
                    {
                        await _mainModel.CheckToken(_cancellationTokenSource.Token);

                        _systemTrayService.SetProgressIndicator("Uploading the file...");

                        var fileModel = await _googleDriveService.FilesInsert(_mainModel.CurrentAccount.AuthToken, new GoogleDriveFilesInsertRequest()
                        {
                            Filename = System.IO.Path.GetFileName(result.OriginalFileName),
                            FileContent = result.ChosenPhoto.ToArray(),
                            FolderId = _mainModel.CurrentFolderId,
                            Fields = GoogleDriveFileFields
                        }, _cancellationTokenSource.Token);

                        var googleFileViewModel = new GoogleFileViewModel(fileModel);

                        Files.Add(googleFileViewModel);

                        if (!string.IsNullOrEmpty(googleFileViewModel.ThumbnailLink))
                        {
                            PictureFiles.Add(googleFileViewModel);
                        }

                        _systemTrayService.HideProgressIndicator();
                    }
                    catch (TaskCanceledException)
                    {
                        _systemTrayService.HideProgressIndicator();
                    }
                    catch (Exception)
                    {
                        _systemTrayService.HideProgressIndicator();

                        _messageBoxService.Show("Unable to upload the file!", "Error");
                    }
                });
            });
        }
        private async void ChangeStaredStatus(GoogleFileViewModel fileViewModel)
        {
            if (IsBusy)
            {
                return;
            }

            AbortCurrentCall();

            try
            {
                await _mainModel.CheckToken(_cancellationTokenSource.Token);

                _systemTrayService.SetProgressIndicator("Changing file star state...");

                var currentStaredtatus = fileViewModel.FileModel.Labels.Starred;

                var fileModel = await _googleDriveService.FilesUpdate(_mainModel.CurrentAccount.AuthToken, fileViewModel.Id, new GoogleDriveFilesUpdateRequest()
                {
                    File = new GoogleDriveFile()
                    {
                        Labels = new GoogleDriveLabels()
                        {
                            Starred = !currentStaredtatus.GetValueOrDefault()
                        }
                    },
                    Fields = GoogleDriveFileFields
                }, _cancellationTokenSource.Token);

                fileViewModel.FileModel = fileModel;

                _systemTrayService.HideProgressIndicator();
            }
            catch (TaskCanceledException)
            {
                _systemTrayService.HideProgressIndicator();
            }
            catch (Exception)
            {
                _systemTrayService.HideProgressIndicator();

                _messageBoxService.Show("Unable to change the file star state!", "Error");
            }
        }
        private void OpenFile(GoogleFileViewModel fileViewModel)
        {
            if (fileViewModel.IsFolder)
            {
                _mainModel.Push(fileViewModel.FileModel);

                RaisePropertyChanged(() => CurrentPath);

                RefreshFiles();
            }
            else
            {
                _mainModel.SelectedFile = fileViewModel.FileModel;

                _navigationService.NavigateTo("/View/ViewFilePage.xaml");
            }
        }