/// <summary>
        /// Creates a new XsltDialog.
        /// </summary>
        public XsltDialog()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            htmlSyntaxFile = Application.StartupPath + @"\XML.syn";
            language = Compona.SourceCode.Language.FromSyntaxFile(htmlSyntaxFile);
            synXml.Parser.Init(language);
            synXslt.Parser.Init(language);

            StringBuilder defaultTemplate = new StringBuilder();
            defaultTemplate.Append("<!-- Author: Ecyware  -->");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<!-- Description: Default Test Template -->");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<!-- Note: Load an existing XSLT Template from File > Open XSLT or use this template. -->");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<!-- Note: We recommend always using UTF-8 for best support. -->");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<!-- Note: For XML, XPath and XSLT documentation, visit http://msdn.microsoft.com/ -->");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<xsl:output method=\"xml\" version=\"1.0\" indent=\"yes\" encoding=\"UTF-8\" omit-xml-declaration=\"yes\"/>");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<xsl:template match=\"/\">");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<xsl:if test=\"rss\">");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<xsl:apply-templates select=\"rss\" />");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("</xsl:if>");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("</xsl:template>");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<!-- RSS Template -->");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<xsl:template name=\"Reseller\" match=\"rss\">");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<div>");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<xsl:for-each select=\"channel/item\">");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("<br/><span>Titel:<xsl:value-of select=\"./description\" /></span>");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("</xsl:for-each>");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("</div>");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("</xsl:template>");
            defaultTemplate.Append("\r\n");
            defaultTemplate.Append("</xsl:stylesheet>");
            defaultTemplate.Append("\r\n");

            this.XsltText = defaultTemplate.ToString();
        }
        /// <summary>
        /// Creates a HtmlQueryForm.
        /// </summary>
        public HtmlQueryForm()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            string htmlSyntaxFile = Application.StartupPath + @"\ASP.syn";
            language = Compona.SourceCode.Language.FromSyntaxFile(htmlSyntaxFile);
            this.txtEditor.Document.Parser.Init(language);
        }
        /// <summary>
        /// Creates a new SessionRequestHeaderEditor
        /// </summary>
        public ScriptingMainPage()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            findReplace = new FindReplaceForm(txtEditor);
            htmlSyntaxFile = Application.StartupPath + @"\XML.syn";
            language = Compona.SourceCode.Language.FromSyntaxFile(htmlSyntaxFile);
            syntaxDocument2.Parser.Init(language);
        }
        /// <summary>
        /// Creates a new text editor form.
        /// </summary>
        public TextEditorForm()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            findReplace = new FindReplaceForm(this.txtEditor);
            htmlSyntaxFile = Application.StartupPath + @"\ASP.syn";
            language = Compona.SourceCode.Language.FromSyntaxFile(htmlSyntaxFile);
            //this.txtEditor.Document.Parser.Init(language);
        }
        public XmlXpathDialog()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            htmlSyntaxFile = Application.StartupPath + @"\XML.syn";
            language = Compona.SourceCode.Language.FromSyntaxFile(htmlSyntaxFile);
            syntaxDocument2.Parser.Init(language);
        }
        /// <summary>
        /// Creates a new RegExDesignerDialog.
        /// </summary>
        public RegExDesignerDialog()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            htmlSyntaxFile = Application.StartupPath + @"\XML.syn";
            language = Compona.SourceCode.Language.FromSyntaxFile(htmlSyntaxFile);
            syntaxDocument2.Parser.Init(language);

            getElements = @"(?<element>((?<header><(?i:{0})[^>]*?((?<name>(\w+))=(""|'|)(?<value>.*?)(""|')*?)*?)(/>|>(?<source>[\w|\t|\r|\W]*?)</(?i:{0})>)))";
            getAttributes = @"(?<name>(\w+))=(""|')(?<value>.*?)(""|')";

            specialTags.Add("meta", "(?i:<{0}).+>");
            specialTags.Add("br", "(?i:<{0}).+>");
            specialTags.Add("hr", "(?i:<{0}).+>");
        }
        /// <summary>
        /// Creates a new TestRequestDialog.
        /// </summary>
        public TestRequestDialog()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            htmlSyntaxFile = Application.StartupPath + @"\XML.syn";
            language = Compona.SourceCode.Language.FromSyntaxFile(htmlSyntaxFile);
            syntaxDocument2.Parser.Init(language);

            ConnectEventHandlers();

            Navigate("about:blank");

            while (this.webBrowser.ReadyState != SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE )
            {
                Application.DoEvents();
            }

            cmbRegEx.Items.Add(@"(?<header><(?i:input)[^>]*?)(/>|>(?<source>[\w|\t|\r|\W]*?)</(?i:input)>)");
            cmbRegEx.Items.Add(@"(?<header><(?i:script)[^>]*?)(/>|>(?<source>[\w|\t|\r|\W]*?)</(?i:script)>)");
            cmbRegEx.Items.Add(@"(?<header><(?i:td)[^>]*?)(/>|>(?<source>[\w|\t|\r|\W]*?)</(?i:td)>)");
            cmbRegEx.Items.Add(@"(?<header><(?i:span)[^>]*?)(/>|>(?<source>[\w|\t|\r|\W]*?)</(?i:span)>)");
            cmbRegEx.Items.Add(@"(?<name>(\w+))=(""|')(?<value>.*?)(""|')");
        }