示例#1
0
        public RtfEditorHelper(FormCodeLibrary mainform, TextBoxHelper textboxHelper)
        {
            _TextBoxHelper = textboxHelper;
            _mainform      = mainform;
            _rtf           = _mainform.rtfEditor;

            _rtf.TextChanged += RtfEditor_TextChanged;
            _rtf.MouseUp     += _rtf_MouseUp;
            _rtf.KeyDown     += _rtf_KeyDown;
            _rtf.RichTextConrol.SelectionChanged += RichTextConrol_SelectionChanged;
        }
        public FastColoredTextBoxHelper(FormCodeLibrary mainform, TextBoxHelper textboxHelper)
        {
            _mainform      = mainform;
            _tb            = _mainform.fastColoredTextBox;
            _TextBoxHelper = textboxHelper;

            CodeInsight.Instance.Init(_mainform.listBoxInsight, _tb);
            _tb.AllowDrop                = true;
            _tb.DragDrop                += FastColoredTextBox_DragDrop;
            _tb.DragOver                += FastColoredTextBox_DragOver;
            _tb.TextChanged             += new System.EventHandler <TextChangedEventArgs>(TbCode_TextChanged);
            _tb.SelectionChanged        += _tb_SelectionChanged;
            _tb.SelectionChangedDelayed += _tb_SelectionChangedDelayed;
            _tb.KeyDown += new KeyEventHandler(TbCode_KeyDown);
            _tb.MouseUp += new MouseEventHandler(TbCode_MouseUp);
        }