HomeCloudContentViewModel.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using PDF_Office.Model.CloudDrive;
  2. using PDF_Office.ViewModels.HomePanel.CloudDrive;
  3. using Prism.Commands;
  4. using Prism.Mvvm;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace PDF_Office.ViewModels.HomePanel
  11. {
  12. public class HomeCloudContentViewModel:BindableBase
  13. {
  14. public GoogleDriveManager googleDriveManager;
  15. public DelegateCommand<CloudDriveItem> OpenCloudDriveCommand { get; set; }
  16. public HomeCloudContentViewModel()
  17. {
  18. googleDriveManager = new GoogleDriveManager();
  19. OpenCloudDriveCommand = new DelegateCommand<CloudDriveItem>(OpenCloudDrive_Click);
  20. }
  21. public void OpenCloudDrive_Click(CloudDriveItem cloudDiskItem)
  22. {
  23. if (cloudDiskItem != null)
  24. {
  25. switch (cloudDiskItem.CloudDiskType)
  26. {
  27. case CloudType.Box:
  28. break;
  29. case CloudType.DropBox:
  30. break;
  31. case CloudType.GoogleDrive:
  32. // isSccuess = await googleDriveViewModel.LoginUser();
  33. break;
  34. case CloudType.OneDrive:
  35. break;
  36. default:
  37. break;
  38. }
  39. }
  40. }
  41. }
  42. }