private void SaveArticle()
{
//remember article text in case it is lost, this is set to "" again when the article title is removed
LastArticle = txtEdit.Text;
if (ShowMovingAverageTimer)
{
StopSaveInterval();
Ticker += SaveInterval;
}
WatchOptions opt;
switch (addToWatchList.SelectedIndex)
{
case 0:
opt = WatchOptions.Watch;
break;
case 1:
opt = WatchOptions.Unwatch;
break;
case 3:
opt = WatchOptions.UsePreferences;
break;
default:
opt = WatchOptions.NoChange;
break;
}
if (!TheSession.Editor.IsActive)
{
if (!TheSession.Page.Exists)
NumberOfNewPages++;
// if section edit summary, check only this section has been edited
if (txtReviewEditSummary.Text.StartsWith(@"/*"))
{
string sectionEditText = Summary.ModifiedSection(TheArticle.OriginalArticleText, txtEdit.Text);
if (sectionEditText.Length == 0 || !txtReviewEditSummary.Text.Contains(@"/* " + sectionEditText + @" */"))
txtReviewEditSummary.Text = txtReviewEditSummary.Text.Substring(txtReviewEditSummary.Text.IndexOf(@"*/")+2);
}
TheSession.Editor.Save(txtEdit.Text, AppendUsingAWBSummary(txtReviewEditSummary.Text), markAllAsMinorToolStripMenuItem.Checked,
opt);
}
else
{
StatusLabelText = "Editor busy";
EnableButtons();
}
}