Пример #1
0
        protected override object CreateControlCore()
        {
            var richEditContainer = RichEditContainerBase.Create(((IModelOptionsWin)Model.Application.Options).FormStyle, _application);

            if (!_modelRichEditEx.ShowToolBars)
            {
                richEditContainer.HideToolBars();
            }
            richEditContainer.Dock = DockStyle.Fill;
            richEditContainer.RichEditControl.TextChanged += Editor_RtfTextChanged;
            richEditContainer.RichEditControl.AddService(typeof(ISyntaxHighlightService), new SyntaxHighlightService(this));
            return(richEditContainer);
        }
Пример #2
0
 protected void ApplyMinimalConfiiguration(RichEditContainerBase richEditContainer)
 {
     richEditContainer.RichEditControl.Options.AutoCorrect.DetectUrls                    = false;
     richEditContainer.RichEditControl.Options.AutoCorrect.ReplaceTextAsYouType          = false;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.Bookmarks            = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.CharacterStyle       = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.HeadersFooters       = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.Hyperlinks           = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.InlinePictures       = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.Numbering.Bulleted   = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.Numbering.MultiLevel = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.Numbering.Simple     = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.ParagraphFormatting  = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.Paragraphs           = DocumentCapability.Enabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.ParagraphStyle       = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.Sections             = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.Tables               = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Options.DocumentCapabilities.TableStyle           = DocumentCapability.Disabled;
     richEditContainer.RichEditControl.Views.SimpleView.AllowDisplayLineNumbers          = true;
 }