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); }
}
}
public int Nudges { get; private set; }