using Dropbox.Api;
using PDF_Office.Model.CloudDrive;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PDF_Office.ViewModels.HomePanel.CloudDrive.CloudDriveType
{


    public class DropbBoxManager
    {
        private static DropbBoxManager instance;
        public static DropbBoxManager DropbBox => instance ?? (instance = new DropbBoxManager());

        public DropbBoxManager()
        {
        }



        #region 用户帐号

        /// <summary>
        /// 登录
        /// </summary>
        public async Task<bool> LoginUser()
        {
            bool result = false;
            DropbBoxUserItem dropbBoxUserItem = new DropbBoxUserItem();
            result = await dropbBoxUserItem.LoginUser();
            if(result)
            {
                dropbBoxUserItem.cloudType = CloudType.DropBox;
                   UserInfo user = new UserInfo();
                user.Name = "DropBox测试" + (Cloud.CloudLists.Count + 1).ToString();
                dropbBoxUserItem.userInfo = user;

                Cloud.CloudLists.Add(dropbBoxUserItem);

            }
            return result;
        }

        /// <summary>
        /// 移除用户
        /// </summary>
        public void RemoveUser()
        {

        }

        /// <summary>
        /// 切换用户
        /// </summary>
        public void SwitchUser()
        {

        }


        #endregion


        #region 文件

        public void GetFiles()
        {

        }

        public void GetFolders()
        {

        }

        public void UpLoad()
        {

        }
        #endregion







    }
}
