CloudFilesContentViewModel.cs 2.7 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 static ObservableCollection<CloudFileUser> CloudFileUserLists = new ObservableCollection<CloudFileUser>();
  17. public GoogleDriveManager GoogleDrive => GoogleDriveManager.GoogleDrive;
  18. public DropbBoxManager DropbBox => DropbBoxManager.DropbBox;
  19. public DelegateCommand OpenCloudDriveCommand { get; set; }
  20. public DelegateCommand CheckDriveUsersCommand { get; set; }
  21. //向外触发
  22. // public event EventHandler<bool> isFoundUserHandler;
  23. public CloudFilesContentViewModel()
  24. {
  25. // Manager = new GoogleDriveManager();
  26. // GoogleDrive = new GoogleDriveManager();
  27. OpenCloudDriveCommand = new DelegateCommand(OpenCloudDrive_Click);
  28. OpenCloudDriveCommand = new DelegateCommand(CheckDriveUsers);
  29. // CheckDriveUsersCommand = new DelegateCommand(CheckDriveUsers);
  30. }
  31. #region 云盘公用接口
  32. public async void CheckDriveUsers()
  33. {
  34. // var result = await GetHistoryUser();
  35. // isFoundUserHandler?.Invoke(null, result);
  36. // await GoogleDrive.LoginUderCount();
  37. }
  38. #endregion
  39. public void OpenCloudDrive_Click()
  40. {
  41. }
  42. #region 谷歌云盘
  43. public void LoginUser_Click()
  44. {
  45. }
  46. public async Task<bool> GetHistoryUser()
  47. {
  48. bool isFound = false;
  49. //if (await GoogleDrive.GetHistoryUsers())
  50. //{
  51. // isFound = true;
  52. //}
  53. return isFound;
  54. }
  55. #endregion
  56. #region 用户帐号
  57. /// <summary>
  58. /// 登录
  59. /// </summary>
  60. public void LoginUser()
  61. {
  62. }
  63. /// <summary>
  64. /// 移除用户
  65. /// </summary>
  66. public void RemoveUser()
  67. {
  68. }
  69. /// <summary>
  70. /// 切换用户
  71. /// </summary>
  72. public void SwitchUser()
  73. {
  74. }
  75. #endregion
  76. #region 文件
  77. public void GetFiles()
  78. {
  79. }
  80. public void GetFolders()
  81. {
  82. }
  83. public void UpLoad()
  84. {
  85. }
  86. #endregion
  87. }
  88. }