public TextHighlighter(RichTextBox textbox, Scanner scanner, Parser parser) { Textbox = textbox; Scanner = scanner; Parser = parser; ClearUndo(); //Tree = Parser.Parse(Textbox.Text); Textbox.TextChanged += new EventHandler(Textbox_TextChanged); textbox.KeyDown += new KeyEventHandler(textbox_KeyDown); Textbox.SelectionChanged += new EventHandler(Textbox_SelectionChanged); Textbox.Disposed += new EventHandler(Textbox_Disposed); SwitchContext = null; currentContext = Tree; threadAutoHighlight = new Thread(AutoHighlightStart) { Name = "Text Highlighter", IsBackground = true }; threadAutoHighlight.Start(); }
/// <summary> /// /// </summary> public Interpreter() { // initialize parser objects scanner = new Scanner(); parser = new Parser(scanner); //highlighter = new TextHighlighter(richTextBox, scanner, parser); // read configuration file and item files now readConfiguration(); Logger.Log(TrinityLogLevel.Info, LogCategory.UserInformation, " _______________________________________"); Logger.Log(TrinityLogLevel.Info, LogCategory.UserInformation, " ___-|: Darkfriend's Item Rules 2 :|-___"); Logger.Log(TrinityLogLevel.Info, LogCategory.UserInformation, " ___________________Rel.-v {0}_______", version); }