예제 #1
0
        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;
        }
예제 #2
0
        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);
            }
        }
예제 #5
0
 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);
 }
예제 #8
0
 public void SetTagProviders(TagContext context)
 {
     _context = context;
     tagProviderComboBox.SetTagProviders(new TagProviderManager(_context.PluginSettings).TagProviders);
 }
예제 #9
0
 public void SetContext(TagContext context)
 {
     _context = context;
 }
예제 #10
0
 public void SetTagProviders(TagContext context)
 {
     _context = context;
     tagProviderComboBox.SetTagProviders(new TagProviderManager(_context.PluginSettings).TagProviders);
 }