/// <summary> /// Tries to fetch a given path and refreshes the views. /// </summary> /// <param name="path"></param> private void FetchStructure(string path) { _board = (Storyboard)Resources["DropFileListFadeOut"] as Storyboard; if (_dropFileListFadeOutCompleted == null) { _dropFileListFadeOutCompleted = new EventHandler(delegate { _context.Files.Clear(); _collector.Raise(_dropFileListFadeOutCompleted); }); _board.Completed += _dropFileListFadeOutCompleted; } _result = null; _board.Begin(); _collector.WaitFor(_dropFileListFadeOutCompleted); _collector.WaitFor("FileListReceived"); _collector.Complete = () => { FetchStructureCompleteHandler(_result); Dispatcher.BeginInvoke(() => { ((Storyboard)Resources["DropFileListFadeIn"] as Storyboard).Begin(); }); }; if (_workingAccount != null) { var dav = new WebDAV(_workingAccount.GetUri(), _workingAccount.GetCredentials()); dav.StartRequest(DAVRequestHeader.CreateListing(path), DAVRequestBody.CreateAllPropertiesListing(), null, FetchStructureComplete); } }
private void Button_Tap(object sender, System.Windows.Input.GestureEventArgs e) { Account account = (DataContext as AccountDataContext).CurrentAccount; // Some Web DAV Test var dav_request = DAVRequestHeader.CreateListing(account.WebDAVPath); dav_request.Headers[Header.Depth] = HeaderAttribute.MethodDepth.ApplyInfinityNoRoot; var dav = new WebDAV(account.GetUri(), account.GetCredentials()); dav.StartRequest(dav_request, DAVRequestBody.CreateAllPropertiesListing(), null, DAVResult); }
private void StartRequest() { var dav = new WebDAV(_workingAccount.GetUri(), _workingAccount.GetCredentials()); dav.StartRequest(DAVRequestHeader.CreateListing(_workingPath), DAVRequestBody.CreateAllPropertiesListing(), null, FetchStructureComplete); }