示例#1
0
        void fctb_KeyPressing(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == 13) //Enter Key
            {
                e.Handled = true;
                fctb.InsertText(Environment.NewLine);
                fctb.DoAutoIndentIfNeed();
            }
            else
            {
                e.Handled = true;

                /*
                 * if (fctb.GetStyleIndex(_lastDictatedStyle) >= 0)
                 *  fctb.Range.ClearStyle(_lastDictatedStyle);*/

                fctb.InsertText(e.KeyChar.ToString(), fctb.SyntaxHighlighter.BlueStyle, true);
            }
        }