public TagForm(TagContext context) : base() { InitializeComponent(); this.buttonInsert.Text = Res.Get(StringId.InsertButton); this.buttonCancel.Text = Res.Get(StringId.CancelButton); this.Text = Res.Get(StringId.TagsInsertTags); tagEditor.Tags = context.Tags; tagEditor.SetTagProviders(context); tagEditor.TagProvider = context.CurrentProvider; tagEditor.PreviouslyUsedTags = context.PreviouslyUsedTags; }
public override DialogResult CreateContent(IWin32Window dialogOwner, ISmartContent newContent) { IBlogContext blogContext = dialogOwner as IBlogContext; if (blogContext != null) _currentBlogId = blogContext.CurrentAccountId; TagContext context = new TagContext(newContent, Options, _currentBlogId); using (TagForm form = new TagForm(context)) { DialogResult result = form.ShowDialog(dialogOwner); if (result == DialogResult.OK) { context.Tags = form.Tags; context.CurrentProvider = form.TagProvider; context.AddTagsToHistory(form.Tags); } return result; } }
public override DialogResult CreateContent(IWin32Window dialogOwner, ISmartContent newContent) { IBlogContext blogContext = dialogOwner as IBlogContext; if (blogContext != null) { _currentBlogId = blogContext.CurrentAccountId; } TagContext context = new TagContext(newContent, Options, _currentBlogId); using (TagForm form = new TagForm(context)) { DialogResult result = form.ShowDialog(dialogOwner); if (result == DialogResult.OK) { context.Tags = form.Tags; context.CurrentProvider = form.TagProvider; context.AddTagsToHistory(form.Tags); } return(result); } }
public void SetContext(TagContext context) { _context = context; }
private string FormTagLinks(ISmartContent smartContent) { TagContext context = new TagContext(smartContent, Options, _currentBlogId); return(context.CurrentProvider.GenerateHtmlForTags(context.Tags)); }
private string FormTagLinks(ISmartContent smartContent) { TagContext context = new TagContext(smartContent, Options, _currentBlogId); return context.CurrentProvider.GenerateHtmlForTags(context.Tags); }
public void SetTagProviders(TagContext context) { _context = context; tagProviderComboBox.SetTagProviders(new TagProviderManager(_context.PluginSettings).TagProviders); }