private void Drafts_Click() { if (WikiPageCur == null) { return; } if (WikiPages.GetDraftsByTitle(WikiPageCur.PageTitle).Count == 0) { MsgBox.Show(this, "There are no drafts for this Wiki Page."); return; } FormWikiDrafts FormWD = new FormWikiDrafts(); FormWD.OwnerForm = this; FormWD.ShowDialog(); }
private void Edit_Click() { if (Plugins.HookMethod(this, "FormWiki.Edit_Click")) { return; } if (WikiPageCur == null) { return; } if (WikiPages.GetDraftsByTitle(WikiPageCur.PageTitle).Count > 0 && MsgBox.Show(this, MsgBoxButtons.YesNo, "This page has one or more drafts associated with it. Would you like to open a draft instead of the current Wiki page?")) { FormWikiDrafts FormWD = new FormWikiDrafts(); FormWD.OwnerForm = this; FormWD.ShowDialog(); return; } FormWikiEdit FormWE = new FormWikiEdit(); FormWE.WikiPageCur = WikiPageCur.Copy(); FormWE.OwnerForm = this; FormWE.Show(); }