Esempio n. 1
0
        private void ProtectArticle()
        {
            if (dlg == null)
                dlg = new MoveDeleteDialog(3);

            try
            {
                dlg.Summary = LastProtect;

                if (dlg.ShowDialog(this) == DialogResult.OK)
                {
                    LastProtect = dlg.Summary;
                    webBrowserEdit.ProtectPage(TheArticle.Name, dlg.Summary, dlg.EditProtectionLevel, dlg.MoveProtectionLevel, dlg.ProtectExpiry);
                }
            }
            catch (Exception ex)
            {
                ErrorHandler.Handle(ex);
            }
        }
Esempio n. 2
0
        private void DeleteArticle()
        {
            MoveDeleteDialog dlg = new MoveDeleteDialog(2);

            try
            {
                dlg.Summary = LastDelete;

                if (dlg.ShowDialog(this) == DialogResult.OK)
                {
                    LastDelete = dlg.Summary;
                    webBrowserEdit.DeletePage(TheArticle.Name, dlg.Summary);
                }
            }
            catch (Exception ex)
            {
                ErrorHandler.Handle(ex);
            }
            finally
            {
                dlg.Dispose();
            }
        }