private void Highlighting_Click(object sender, EventArgs e)
        {
            EditorTabPage     etb = GetActiveTab();
            ToolStripMenuItem tsi = (ToolStripMenuItem)sender;

            if (etb != null)
            {
                etb.SetHighlighting(tsi.Text);
                string name = etb.GetHighlighting();

                if (tsi.Text.Equals(name))
                {
                    tsi.Checked = true;
                }
            }
        }
Beispiel #2
0
        private void Highlighting_Click(object sender, EventArgs e)
        {
            TabPage tb = tabControl1.SelectedTab;

            if (tb as EditorTabPage == null)
            {
                return;
            }
            EditorTabPage     etb = tb as EditorTabPage;
            ToolStripMenuItem tsi = (ToolStripMenuItem)sender;

            etb.SetHighlighting(tsi.Text);
            string name = etb.GetHighlighting();

            if (tsi.Text.Equals(name))
            {
                tsi.Checked = true;
            }
        }
        private void Highlighting_Click(object sender, EventArgs e)
        {
            TabPage tb = tabControl1.SelectedTab;

            if (tb as EditorTabPage == null)
            {
                return;
            }
            EditorTabPage     etb = tb as EditorTabPage;
            ToolStripMenuItem tsi = (ToolStripMenuItem)sender;
            var oldName           = tsi.Tag as string;

            etb.SetHighlighting(oldName);
            string name = etb.GetHighlightingStrategyName();

            if (string.Compare(oldName, name, StringComparison.InvariantCulture) == 0)
            {
                ClearCheckedHighlighters();
                tsi.Checked = true;
            }
        }