public override async Task OnNavigatedFromAsync(IDictionary <string, object> pageState, bool suspending) { var service = await WebDavNavigationService.InintializeAsync(); await service.ReloadAsync(); await base.OnNavigatedFromAsync(pageState, suspending); }
public override async Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state) { await base.OnNavigatedToAsync(parameter, mode, state); WebDavNavigationService = await WebDavNavigationService.InintializeAsync(); WebDavNavigationService.PropertyChanged += WebDavNavigationServiceOnPropertyChanged; await Task.Run(() => LoadThumbnails()); }
public override async Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state) { await base.OnNavigatedToAsync(parameter, mode, state); Windows.UI.Core.SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = Windows.UI.Core.AppViewBackButtonVisibility.Visible; WebDavNavigationService = await WebDavNavigationService.InintializeAsync(); WebDavNavigationService.PropertyChanged += WebDavNavigationServiceOnPropertyChanged; await Task.Run(() => LoadThumbnails()); await ShowCameraUploadInfo(); }
public override async Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state) { WebDavNavigationService = await WebDavNavigationService.InintializeAsync(); WebDavNavigationService.PropertyChanged += WebDavNavigationServiceOnPropertyChanged; if (parameter is List <DavItem> ) { _itemsToMove = parameter as List <DavItem>; } HideItemsToMove(); await base.OnNavigatedToAsync(parameter, mode, state); }
public override async Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state) { WebDavNavigationService = await WebDavNavigationService.InintializeAsync(); WebDavNavigationService.PropertyChanged += WebDavNavigationServiceOnPropertyChanged; //items should be moved if (parameter is List <DavItem> ) { _itemsToMove = parameter as List <DavItem>; HideItemsToMove(); } //just a folder has to be selected (nothing to move), the parameter is the default folder if (parameter is DavItem item) { await WebDavNavigationService.NavigateAsync(item); } await base.OnNavigatedToAsync(parameter, mode, state); }
public override async Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state) { Windows.UI.Core.SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = Windows.UI.Core.AppViewBackButtonVisibility.Visible; WebDavNavigationService = await WebDavNavigationService.InintializeAsync(); WebDavNavigationService.PropertyChanged += WebDavNavigationServiceOnPropertyChanged; //items should be moved if (parameter is List <DavItem> ) { _itemsToMove = parameter as List <DavItem>; HideItemsToMove(); } //just a folder has to be selected (nothing to move), the parameter is the default folder if (parameter is DavItem item) { await WebDavNavigationService.NavigateAsync(item); } await base.OnNavigatedToAsync(parameter, mode, state); }
private async Task <List <DavItem> > LoadItems() { var service = await WebDavNavigationService.InintializeAsync(); var serverUrl = Configuration.ServerUrl.Substring(0, Configuration.ServerUrl.IndexOf("remote.php", StringComparison.OrdinalIgnoreCase)); foreach (var davItem in service.Items) { if (!davItem.IsCollection && davItem.ContentType.StartsWith("image", StringComparison.OrdinalIgnoreCase)) { var url = new Uri(davItem.EntityId, UriKind.RelativeOrAbsolute); if (!url.IsAbsoluteUri) { url = new Uri(new Uri(serverUrl), url); } //var itemPath = davItem.EntityId.Substring(davItem.EntityId.IndexOf("remote.php/webdav", StringComparison.OrdinalIgnoreCase) + 17); //var url = serverUrl + "index.php/apps/files/api/v1/thumbnail/" + 2000 + "/" + 2000 + itemPath; davItem.ThumbnailUrl = url.ToString(); } } return(service.Items.Where(i => i.ContentType.StartsWith("image") || i.ContentType.StartsWith("video")).ToList()); }