public static CheckOperation ( string xml ) : string | ||
xml | string | |
return | string |
private static void UploadResult(string result) { if (string.IsNullOrEmpty(Common.CheckOperation(result))) { UploadedThisSession += EditsAndIgnored; if (CurrentlyUploadingSaved.Count > 0) { SavedPages.RemoveRange(0, CurrentlyUploadingSaved.Count - 1); CurrentlyUploadingSaved.Clear(); } if (CurrentlyUploadingSkipped.Count > 0) { SkippedPages.RemoveRange(0, CurrentlyUploadingSkipped.Count - 1); CurrentlyUploadingSkipped.Clear(); } if (CurrentlyUploadingReasons.Count > 0) { SkippedReasons.RemoveRange(0, CurrentlyUploadingReasons.Count - 1); CurrentlyUploadingReasons.Clear(); } if ((UploadedThisSession % 100) == 0) { CheckoutTime = DateTime.Now; } } AWB.StopProgressBar(); AWB.StatusLabelText = ""; IsUploading = false; }
private static void UploadFinishedArticlesToServer() { int editsAndIgnored = EditAndIgnoredPages; if (editsAndIgnored == 0) { return; } AWB.StartProgressBar(); AWB.StatusLabelText = "Uploading " + editsAndIgnored + " TypoScan articles to server..."; NameValueCollection postVars = new NameValueCollection(); postVars.Add("articles", string.Join(",", SavedPages.ToArray())); postVars.Add("skipped", string.Join(",", SkippedPages.ToArray())); postVars.Add("skipreason", string.Join(",", SkippedReasons.ToArray())); if (!AWB.Privacy) { postVars.Add("user", Variables.User.Name); } else { postVars.Add("user", "[withheld]"); } try { string result = Tools.PostData(postVars, Common.GetUrlFor("finished")); if (string.IsNullOrEmpty(Common.CheckOperation(result))) { UploadedThisSession += editsAndIgnored; SavedPages.Clear(); SkippedPages.Clear(); SkippedReasons.Clear(); if ((UploadedThisSession % 100) == 0) { CheckoutTime = new DateTime(); } } } catch (System.IO.IOException ex) { Tools.WriteDebug("TypoScanAWBPlugin", ex.Message); } catch (System.Net.WebException we) { Tools.WriteDebug("TypoScanAWBPlugin", we.Message); } AWB.StopProgressBar(); AWB.StatusLabelText = ""; }
private static void UploadResult(string result) { if (string.IsNullOrEmpty(Common.CheckOperation(result))) { UploadedThisSession += editsAndIgnored; SavedPages.Clear(); SkippedPages.Clear(); SkippedReasons.Clear(); if ((UploadedThisSession % 100) == 0) { CheckoutTime = DateTime.Now; } } AWB.StopProgressBar(); AWB.StatusLabelText = ""; isUploading = false; }