CloudFilesContentViewModel.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. using PDF_Office.Model.CloudDrive;
  2. using PDF_Office.ViewModels.HomePanel.CloudDrive.CloudDriveType;
  3. using Prism.Commands;
  4. using Prism.Mvvm;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Collections.ObjectModel;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace PDF_Office.ViewModels.HomePanel.CloudDrive
  12. {
  13. //各云盘事件
  14. public class CloudFilesContentViewModel : BindableBase
  15. {
  16. public GoogleDriveManager GoogleDrive => GoogleDriveManager.GoogleDrive;
  17. public DropbBoxManager DropbBox => DropbBoxManager.DropbBox;
  18. public DelegateCommand OpenCloudDriveCommand { get; set; }
  19. public DelegateCommand CheckDriveUsersCommand { get; set; }
  20. //向外触发
  21. // public event EventHandler<bool> isFoundUserHandler;
  22. public CloudFilesContentViewModel()
  23. {
  24. // Manager = new GoogleDriveManager();
  25. // GoogleDrive = new GoogleDriveManager();
  26. OpenCloudDriveCommand = new DelegateCommand(OpenCloudDrive_Click);
  27. OpenCloudDriveCommand = new DelegateCommand(CheckDriveUsers);
  28. // CheckDriveUsersCommand = new DelegateCommand(CheckDriveUsers);
  29. }
  30. #region 云盘公用接口
  31. public async void CheckDriveUsers()
  32. {
  33. // var result = await GetHistoryUser();
  34. // isFoundUserHandler?.Invoke(null, result);
  35. // await GoogleDrive.LoginUderCount();
  36. }
  37. #endregion
  38. public void OpenCloudDrive_Click()
  39. {
  40. }
  41. #region 谷歌云盘
  42. public void LoginUser_Click()
  43. {
  44. }
  45. public async Task<bool> GetHistoryUser()
  46. {
  47. bool isFound = false;
  48. //if (await GoogleDrive.GetHistoryUsers())
  49. //{
  50. // isFound = true;
  51. //}
  52. return isFound;
  53. }
  54. #endregion
  55. #region 用户帐号
  56. /// <summary>
  57. /// 登录
  58. /// </summary>
  59. public void LoginUser()
  60. {
  61. }
  62. /// <summary>
  63. /// 移除用户
  64. /// </summary>
  65. public void RemoveUser()
  66. {
  67. }
  68. /// <summary>
  69. /// 切换用户
  70. /// </summary>
  71. public void SwitchUser()
  72. {
  73. }
  74. #endregion
  75. #region 文件
  76. public void GetFiles()
  77. {
  78. }
  79. public void GetFolders()
  80. {
  81. }
  82. public void UpLoad()
  83. {
  84. }
  85. #endregion
  86. }
  87. }