private void SetButtons(bool enabled)
{
btnIgnore.Enabled = btnPreview.Enabled = btnDiff.Enabled =
btntsPreview.Enabled = btntsChanges.Enabled = /*listMaker.MakeListEnabled = */
btntsSave.Enabled = btntsIgnore.Enabled = btnWatch.Enabled = findGroup.Enabled = enabled;
btnSave.Enabled = enabled && TheArticle != null && !string.IsNullOrEmpty(TheSession.Page.Title);
// allow protection of non-existent page (salting)
btnProtect.Enabled = (enabled && TheSession.User.IsSysop && TheArticle != null);
btnMove.Enabled = btnProtect.Enabled && TheSession.Page.Exists;
btnDelete.Enabled = btntsDelete.Enabled = enabled && TheSession.User.CanDeletePage(TheSession.Page) && TheArticle != null && TheSession.Page.Exists;
btnFind.Enabled = txtFind.TextLength > 0;
// if there are find matches, colour the Find button yellow
if (btnFind.Enabled && txtEdit.FindAll(txtFind.Text, chkFindRegex.Checked, chkFindCaseSensitive.Checked, TheArticle.Name).Any())
btnFind.BackColor = Color.Yellow;
else
btnFind.BackColor = SystemColors.ButtonFace;
}