private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EditorTabPage etb        = new EditorTabPage();
            string        newTabName = string.Format("Untitled{0}", GetUntitledTabCount());

            etb.SetTitle(newTabName);
            etb.Editor.DragEnter        += new DragEventHandler(tabControl1_DragEnter);
            etb.Editor.DragDrop         += new DragEventHandler(tabControl1_DragDrop);
            etb.OnEditorTextChanged     += new EventHandler(etb_TextChanged);
            etb.OnEditorFilenameChanged += new EventHandler(etb_FilenameChanged);
            etb.Show();

            tabControl1.TabPages.Add(etb);
            tabControl1.SelectedTab = etb;
        }
        private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EditorTabPage etb = GetActiveTab();

            if (etb != null)
            {
                string newName = etb.Editor.ActiveTextAreaControl.SelectionManager.SelectedText;
                if (string.IsNullOrEmpty(newName))
                {
                    newName = "index.htm";
                }
                FileInfo finfo = new FileInfo(etb.ToolTipText);
                saveFileDialog1.FileName = finfo.DirectoryName + Path.DirectorySeparatorChar + newName;
                if (saveFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    string fileName = saveFileDialog1.FileName;
                    etb.SaveFile(fileName);
                    etb.SetTitle(fileName);
                }
            }
        }