private void NudgeTimer_Tick(object sender, NudgeTimer.NudgeTimerEventArgs e) { //make sure there was no error and bot mode is still enabled if (BotMode) { if (Program.MyTrace.IsUploading || Program.MyTrace.IsGettingPassword) { // Don't nudge when a log is uploading in the background or it is attempting to get a password from the user, just wait for it e.Cancel = true; return; } // Tell plugins we're about to nudge, and give them the opportunity to cancel: foreach (KeyValuePair<string, IAWBPlugin> a in Plugin.AWBPlugins) { bool cancel; a.Value.Nudge(out cancel); if (cancel) { e.Cancel = true; return; } } // Update stats and nudge: Nudges++; lblNudges.Text = NudgeTimerString + Nudges; NudgeTimer.Stop(); if (chkNudgeSkip.Checked && SameArticleNudges > 0) { SameArticleNudges = 0; SkipPage("There was an error saving the page twice"); } else { SameArticleNudges++; Stop(); _stopProcessing = false; Start(); } // Inform plugins: foreach (KeyValuePair<string, IAWBPlugin> a in Plugin.AWBPlugins) { a.Value.Nudged(Nudges); } } }
private void NudgeTimer_Tick(object sender, NudgeTimer.NudgeTimerEventArgs e) { //make sure there was no error and bot mode is still enabled if (BotMode) { // Tell plugins we're about to nudge, and give them the opportunity to cancel: foreach (KeyValuePair<string, IAWBPlugin> a in Plugin.AWBPlugins) { bool cancel; a.Value.Nudge(out cancel); if (cancel) { e.Cancel = true; return; } } // Update stats and nudge: Nudges++; lblNudges.Text = NudgeTimerString + Nudges; NudgeTimer.Stop(); if (chkNudgeSkip.Checked && SameArticleNudges > 0) { SameArticleNudges = 0; SkipPage("There was an error saving the page twice"); } else { SameArticleNudges++; Stop(); _stopProcessing = false; Start(); } // Inform plugins: foreach (KeyValuePair<string, IAWBPlugin> a in Plugin.AWBPlugins) { a.Value.Nudged(Nudges); } } }