/// <summary> /// Создать новую папку в текущей папке на сервере /// </summary> /// <param name="dirName">Имя новой папки</param> internal async Task <bool> CreateDirAsync(string dirName) { bool result = false; if (CurrentUri != null) { string path = CurrentUri.ToString().Replace(webDavCore.Server.ToString(), string.Empty); path += (path.EndsWith("/") ? "" : "/") + dirName; result = await webDavCore.CreateDirAsync(path); } return(result); }
void ButtonGrabWebPage_Click(object sender, RoutedEventArgs e) { if (null == CurrentUri) { MessageBoxes.Error("You need to have navigated to a web page before trying to export to PDF."); return; } string title = CurrentTitle; string url = CurrentUri.ToString(); // This was the code that does the magic locally on the client... SafeThreadPool.QueueUserWorkItem(o => HTMLToPDFConversion.GrabWebPage(title, url)); }
public string ShortCurrentUrl() { string url = CurrentUri.ToString().Replace(Server.ToString(), string.Empty); return(url == "" ? "../" : url); }