Esempio n. 1
0
        private void InitializeSQLEditor(HilightRichTextBox control)
        {
            control.Settings.Keywords.Add("SELECT");
            control.Settings.Keywords.Add("FROM");
            control.Settings.Keywords.Add("WHERE");
            control.Settings.Keywords.Add("GROUP BY");
            control.Settings.Keywords.Add("HAVING");
            control.Settings.Keywords.Add("ORDER BY");
            control.Settings.Keywords.Add("ASC");
            control.Settings.Keywords.Add("DESC");
            control.Settings.Keywords.Add("INNER");
            control.Settings.Keywords.Add("LEFT");
            control.Settings.Keywords.Add("RIGHT");
            control.Settings.Keywords.Add("OUTER");
            control.Settings.Keywords.Add("JOIN");
            control.Settings.Keywords.Add("CROSS");
            control.Settings.Keywords.Add("UNIQUE");
            control.Settings.Keywords.Add("DISTINCT");
            control.Settings.Keywords.Add("AS");
            control.Settings.Keywords.Add("TOP");
            control.CompileKeywords();

            control.Settings.Symbols.Add("\\bNOT\\b|");
            control.Settings.Symbols.Add("\\bLIKE\\b|");
            control.Settings.Symbols.Add("=|");
            control.Settings.Symbols.Add("<|");
            control.Settings.Symbols.Add("!|");
            control.Settings.Symbols.Add("\\bALL\\b|");
            control.Settings.Symbols.Add("\\bAND\\b|");
            control.Settings.Symbols.Add("\\bOR\\b|");
            control.Settings.Symbols.Add("\\bIN\\b|");
            control.Settings.Symbols.Add("\\bANY\\b|");
            control.Settings.Symbols.Add("\\(|");
            control.Settings.Symbols.Add("\\)|");
            control.Settings.Symbols.Add("\\+|");
            control.Settings.Symbols.Add("\\-|");
            control.Settings.Symbols.Add("\\bSOME\\b|");
            control.Settings.Symbols.Add("\\bEXIST\\b|");
            control.Settings.Symbols.Add("\\bBETWEEN\\b");
            control.CompileRegexSymbols();

            control.Settings.EnableComments = false;
            control.Settings.EnableStrings  = true;
            control.Settings.EnableIntegers = true;

            control.Settings.KeywordColor = Color.Blue;
            control.Settings.SymbolsColor = Color.Purple;
            control.Settings.StringColor  = Color.Green;
        }
Esempio n. 2
0
        private void InitializeXMLEditor(HilightRichTextBox control)
        {
            control.Settings.Keywords.Add("(\\w+)\\s*=");
            control.CompileRegexKeywords();

            control.Settings.Symbols.Add("<\\w+|");
            control.Settings.Symbols.Add("</\\w+|");
            control.Settings.Symbols.Add(">|");
            control.Settings.Symbols.Add("/>|");
            control.Settings.Symbols.Add("=");
            control.CompileRegexSymbols();

            control.Settings.EnableIntegers = true;
            control.Settings.EnableStrings  = true;

            control.Settings.KeywordColor = Color.Purple;
            control.Settings.SymbolsColor = Color.Blue;
            control.Settings.StringColor  = Color.Green;
        }