Exemplo n.º 1
0
        private void InitEditor(bool typeIsCpp)//初始化代码高亮补全 false-C, trueC++
        {
            string highLightingRules = typeIsCpp ? Config.Cpp_HighLighting : Config.C_HighLighting;
            string autoCompleteRules = typeIsCpp ? Config.Cpp_AutoComplete : Config.C_AutoComplete;

            HighlightingCode.InitHighlightingCode(highLightingRules);
            AutoComplete.InitAutoComplete(autoCompleteRules, acMenu, fastColoredTextBox_Main, imageList_ACIco);
            AutoAddFragment.Init(fastColoredTextBox_Main);
        }
Exemplo n.º 2
0
        private void fastColoredTextBox_Main_TextChanged(object sender, TextChangedEventArgs e)
        {
            fastColoredTextBox_Main.LeftBracket   = '(';
            fastColoredTextBox_Main.RightBracket  = ')';
            fastColoredTextBox_Main.LeftBracket2  = '\x0';
            fastColoredTextBox_Main.RightBracket2 = '\x0';

            HighlightingCode.Highlighting(e);
            toolStripStatusLabel_LengthShow.Text = fastColoredTextBox_Main.TextLength.ToString();
        }
Exemplo n.º 3
0
 private void fastColoredTextBox_Main_SelectionChanged(object sender, EventArgs e)
 {
     toolStripStatusLabel_LineShow.Text      = (fastColoredTextBox_Main.Selection.FromLine + 1).ToString();
     toolStripStatusLabel_SelectionShow.Text = fastColoredTextBox_Main.Selection.Length.ToString();
     HighlightingCode.HighlightingSameWords(fastColoredTextBox_Main);
 }