123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- using PDF_Office.Model.CloudDrive;
- using PDF_Office.ViewModels.HomePanel.CloudDrive.CloudDriveType;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace PDF_Office.ViewModels.HomePanel.CloudDrive
- {
-
-
- public class CloudDriveManager
- {
- public GoogleDriveManager GoogleDrive;
- public DropbBoxManager DropbBox;
- public CloudType cloudType;
- private static CloudDriveManager instance;
- public static CloudDriveManager GetInstance()
- {
- if (instance == null)
- instance = new CloudDriveManager();
- return instance;
- }
- private CloudDriveManager()
- {
- GoogleDrive = new GoogleDriveManager();
- DropbBox = new DropbBoxManager();
- }
- #region 用户帐号
-
-
-
- public async Task<bool> LoginUser(CloudType cloudType)
- {
- switch(cloudType)
- {
- case CloudType.GoogleDrive:
- return await GoogleDrive.LoginUderCount();
- }
- return false;
- }
- public bool LoadedUsers()
- {
- bool isUsers = false;
- if(GoogleDrive.GoogleDriveUsers.Count > 0)
- isUsers = true;
- return isUsers;
- }
-
-
-
- public async Task<bool> RemoveUser()
- {
- GoogleDriveUserItem userIttem = null;
- switch (cloudType)
- {
- case CloudType.OneDrive:
- return await GoogleDrive.RemoveUser(userIttem);
- }
- return false;
- }
-
-
-
- public void SwitchUser()
- {
- }
- #endregion
- #region 文件
- public void GetFiles()
- {
- }
- public void GetFolders()
- {
- }
- public void UpLoad()
- {
- }
- #endregion
- }
- }
|