示例#1
0
        /*The root of each tab in your TabbedPage should be a single NavigationPage, which wraps a ContentPage. From that ContentPage you navigate to other pages by using the Navigation property of the page.*/

        public FilePage(Group group, FSObject parentFolder) : this()
        {
            _parentFolder = parentFolder;
            _group        = group;
            Title         = parentFolder.title;
            Reload();
        }
示例#2
0
	    /*The root of each tab in your TabbedPage should be a single NavigationPage, which wraps a ContentPage. From that ContentPage you navigate to other pages by using the Navigation property of the page.*/

	    public FilePage(Group group, FSObject parentFolder):this()
        {
            _parentFolder = parentFolder;
            _group = group;
            Title = parentFolder.title;
            Reload();
        }
示例#3
0
        private Uri GetFolderUri(Group group, FSObject parentFolder)
        {
            var uri = parentFolder == null
                ? new Uri(string.Format(RootFolderUrlTemplate, currentSite.url, group.guid))
                : new Uri(string.Format(SubFolderUrlTemplate, currentSite.url, group.guid, parentFolder.guid));

            return(uri);
        }
示例#4
0
        public async Task <List <FSObject> > GetFiles(Group group, FSObject parentFolder)
        {
            var uri = GetFolderUri(group, parentFolder);

            System.Diagnostics.Debug.WriteLine("[Webservice] Retrieving files... ");

            var response = await GetAuthorizedClient().GetAsync(uri);

            var content = await response.Content.ReadAsStringAsync();

            if (response.IsSuccessStatusCode)
            {
                System.Diagnostics.Debug.WriteLine("[Webservice] Retrieved files");

                var list = JsonConvert.DeserializeObject <PaginatedList <FSObject> >(content);
                return(list.entities);
            }

            return(new List <FSObject>());
        }
示例#5
0
 private static bool IsFolder(FSObject selectedEvent)
 {
     return(selectedEvent.subtype.Equals("folder", StringComparison.OrdinalIgnoreCase));
 }
示例#6
0
	    private static bool IsFolder(FSObject selectedEvent)
	    {
	        return selectedEvent.subtype.Equals("folder", StringComparison.OrdinalIgnoreCase);
	    }