/// <summary>
 /// Basic Constructor
 /// </summary>
 /// <param name="defaultRules">Option to set default rules or not</param>
 public SyntaxHighlighter(bool defaultRules = true)
 {
     this._highlightRules = new HighlightRules();
     this._backupRtf = new System.Windows.Forms.RichTextBox();
     this.DefaultTextColor = Color.Black;
     this.DefaultTextBackColor = Color.White;
     this.DefaultFont = new Font("Lucida Console", 10);
     if (defaultRules)
     {
         this.SetDefaultKeywords();
         this.SetDefaultRules();
     }
 }
 /// <summary>
 /// Constructor specifies custom highlight rules & default font to use
 /// </summary>
 /// <param name="highlightRules">HighlightRules object which specifies the highlighting rules to apply</param>
 /// <param name="defaultFont">Custom Font object</param>
 public BasicHighlighter(HighlightRules highlightRules, Font defaultFont)
     : base(highlightRules, defaultFont)
 {
 }
 /// <summary>
 /// Custom Constructor
 /// </summary>
 /// <param name="highlightRules">Object of type HighlightRules</param>
 public SyntaxHighlighter(HighlightRules highlightRules)
     : this(true)
 {
     this._highlightRules = highlightRules;
 }
 /// <summary>
 /// Custom Constructor
 /// </summary>
 /// <param name="highlightRules">Object of type HighlightRules</param>
 /// <param name="defaultFont">Default font to be used</param>
 public SyntaxHighlighter(HighlightRules highlightRules, Font defaultFont)
     : this(defaultFont)
 {
     this._highlightRules = highlightRules;
 }
 /// <summary>
 /// Sets the rules of highlighter
 /// </summary>
 /// <param name="highlightRules"></param>
 public void SetRules(HighlightRules highlightRules)
 {
     this._highlightRules = highlightRules;
 }
 /// <summary>
 /// Construct object using another HighlightRules object
 /// </summary>
 /// <param name="hr">Object of type HighlightRules</param>
 public HighlightRules( HighlightRules hr )
 {
     this._highlightRules = hr._highlightRules;
 }