CloudDriveItem.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Google.Apis.Auth.OAuth2;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace PDF_Master.Model.CloudDrive
  8. {
  9. //云盘信息
  10. public enum CloudType
  11. {
  12. Box,
  13. DropBox,
  14. GoogleDrive,
  15. OneDrive
  16. }
  17. public class CloudBoxItem
  18. {
  19. public CloudType CloudDiskType { get; set; }
  20. public List<UserCredential> UserCredentials { get; set; }
  21. public string UsersInfoPath { get; set; }
  22. public int Id { get; set; }
  23. public string DriveName { get; private set; }
  24. public CloudBoxItem(CloudType cloudDiskType)
  25. {
  26. CloudDiskType = cloudDiskType;
  27. GetName(CloudDiskType);
  28. }
  29. private void GetName(CloudType cloudDiskType)
  30. {
  31. switch (cloudDiskType)
  32. {
  33. case CloudType.Box:
  34. DriveName = "Box";
  35. break;
  36. case CloudType.DropBox:
  37. DriveName = "DropBox";
  38. break;
  39. case CloudType.GoogleDrive:
  40. DriveName = "Google Drive";
  41. break;
  42. case CloudType.OneDrive:
  43. DriveName = "OneDrive";
  44. break;
  45. }
  46. }
  47. }
  48. }