Exemple #1
0
        public void UpdateSpellingContext(object sender, EventArgs e)
        {
            IBlogPostSpellCheckingContext context = sender as IBlogPostSpellCheckingContext;

            _spellingContext = context;
            StopSession(true);
            InitializeSession(_spellingContext);
        }
Exemple #2
0
 public void InitializeSession(IBlogPostSpellCheckingContext spellingContext)
 {
     _ignoredOnce.Clear();
     _spellingContext     = spellingContext;
     _spellingHighlighter = new SpellingHighlighter(SpellingChecker, _mshtmlControl.HighlightRenderingServices,
                                                    _mshtmlControl.DisplayServices,
                                                    _mshtmlControl.MarkupServicesRaw,
                                                    (IHTMLDocument4)_htmlDocument);
     //start new highlighter
     _spellingChecker.StartChecking();
     _spellingChecker.WordIgnored += new EventHandler(_spellingChecker_WordIgnored);
     _spellingChecker.WordAdded   += new EventHandler(_spellingChecker_WordAdded);
 }
        public void InitializeSession(IBlogPostSpellCheckingContext spellingContext)
        {
            _ignoredOnce.Clear();
            _spellingContext = spellingContext;
            _spellingHighlighter = new SpellingHighlighter(SpellingChecker, _mshtmlControl.HighlightRenderingServices,
                _mshtmlControl.DisplayServices,
                _mshtmlControl.MarkupServicesRaw,
                (IHTMLDocument4)_htmlDocument);
            //start new highlighter
            _spellingChecker.StartChecking();
            _spellingChecker.WordIgnored += new EventHandler(_spellingChecker_WordIgnored);
            _spellingChecker.WordAdded += new EventHandler(_spellingChecker_WordAdded);

        }
        public BlogPostHtmlSourceEditorControl(IBlogPostSpellCheckingContext spellingContext, CommandManager commandManager, IBlogPostImageEditingContext editingContext)
        {
            this.spellingContext = spellingContext;
            this.editingContext = editingContext;
            InitializeComponent();

            sourceControl = new HtmlSourceEditorControl(spellingContext.SpellingChecker, commandManager, editingContext);
            sourceControl.EditorControl.TextChanged += new EventHandler(EditorControl_TextChanged);
            sourceControl.EditorControl.GotFocus += new EventHandler(EditorControl_GotFocus);
            BorderControl borderControl = new BorderControl();
            borderControl.SuppressBottomBorder = true;
            borderControl.Control = sourceControl.EditorControl;
            borderControl.Dock = DockStyle.Fill;
            panelSourceEditor.Controls.Add(borderControl);

            ColorizedResources.Instance.RegisterControlForBackColorUpdates(this);

            textBoxTitle.AccessibleName = Res.Get(StringId.PostEditorTitleRegion);
            sourceControl.EditorControl.AccessibleName = Res.Get(StringId.PostEditorBodyRegion);
        }
Exemple #5
0
        public BlogPostHtmlSourceEditorControl(IBlogPostSpellCheckingContext spellingContext, CommandManager commandManager, IBlogPostImageEditingContext editingContext)
        {
            this.spellingContext = spellingContext;
            this.editingContext  = editingContext;
            InitializeComponent();

            sourceControl = new HtmlSourceEditorControl(spellingContext.SpellingChecker, commandManager, editingContext);
            sourceControl.EditorControl.TextChanged += new EventHandler(EditorControl_TextChanged);
            sourceControl.EditorControl.GotFocus    += new EventHandler(EditorControl_GotFocus);
            BorderControl borderControl = new BorderControl();

            borderControl.SuppressBottomBorder = true;
            borderControl.Control = sourceControl.EditorControl;
            borderControl.Dock    = DockStyle.Fill;
            panelSourceEditor.Controls.Add(borderControl);

            ColorizedResources.Instance.RegisterControlForBackColorUpdates(this);

            textBoxTitle.AccessibleName = Res.Get(StringId.PostEditorTitleRegion);
            sourceControl.EditorControl.AccessibleName = Res.Get(StringId.PostEditorBodyRegion);
        }
        public BlogPostHtmlEditorControl(IMainFrameWindow mainFrameWindow, IStatusBar statusBar, MshtmlOptions options, IBlogPostImageEditingContext imageEditingContext, IBlogPostSidebarContext sidebarContext, IContentSourceSidebarContext sourceContext, SmartContentResizedListener resizedListener, IBlogPostSpellCheckingContext spellingContext, IImageReferenceFixer referenceFixer, IInternetSecurityManager internetSecurityManager, CommandManager commandManager, TemplateStrategy strategy, IEditingMode editingModeContext)
            : base(mainFrameWindow, statusBar, options, spellingContext.SpellingChecker, internetSecurityManager, commandManager)
        {
            _strategy = strategy;
            _imageEditingContext = imageEditingContext;
            _sidebarContext = sidebarContext;
            _sourceContext = sourceContext;
            _resizedListener = resizedListener;
            _spellingContext = spellingContext;

            _spellingManager = new SpellingManager(CommandManager);
            _keyBoardHandler = new PostEditorKeyboardHandler(this, imageEditingContext, editingModeContext);
            _referenceFixer = referenceFixer;

            InitializeTableEditingManager();

            InitializeElementBehaviors();

            SelectionChanged += BlogPostHtmlEditorControl_SelectionChanged;
            KeyPress += new HtmlEventHandler(BlogPostHtmlEditorControl_KeyPress);
        }
 public void UpdateSpellingContext(object sender, EventArgs e)
 {
     IBlogPostSpellCheckingContext context = sender as IBlogPostSpellCheckingContext;
     _spellingContext = context;
     StopSession(true);
     InitializeSession(_spellingContext);
 }