// GET: api/Folder/5
        public List <FileModel> Get(string id)
        {
            var service = AuthenticationHelper.GetDriveService();

            var gdriveFolders = FolderAPI.GetFolders(service, id);

            return(FileHelper.GetFiles(_dbManager, gdriveFolders));
        }
Exemplo n.º 2
0
        public MainViewModel()
        {
            if (IsolatedStorageSettings.ApplicationSettings.Contains("user") == false)
            {
            }
            else
            {
                _informerManagerLocator           = new InformerManagerLocator();
                _internetConnectionManagerLocator = new InternetConnectionManagerLocator();
                _internetConnectionManagerLocator.InternetConnectionManager.ConnectionStateChanged += InternetConnectionManager_ConnectionStateChanged;

                _folderApi = new FolderAPI(new Uri(AppResources.BaseAddress));
                _folderApi.ErrorReceived += _folderApi_ErrorReceived;

                _fileApi = new FileAPI(new Uri(AppResources.BaseAddress));
                _fileApi.ErrorReceived += _fileApi_ErrorReceived;

                _foldersIdTree = new List <int>();

                Entities      = new ObservableCollection <DiskEntity>();
                LocalEntities = new ObservableCollection <DiskEntity>();
                Permissions   = new ObservableCollection <Permission>();

                //transferRequests = new ObservableCollection<BackgroundTransferRequest>();
                transferRequests = new ObservableCollection <CustomBackgroundTransferRequest>();

                using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
                {
                    if (!isoStore.DirectoryExists("/shared/transfers"))
                    {
                        isoStore.CreateDirectory("/shared/transfers");
                    }
                }

                InitDownload();
            }
        }