示例#1
0
        private void txtDownRule_Click(object sender, EventArgs e)
        {
            var itm = this.lvColor.SelectedItems[0];
            var b   = this.GetSelectedFileColorDefinitionSet();

            b.MoveDown(itm.Text);
            b.PopulateListView(this.lvColor);
            TextHighlighterConfigApi.SetFileColorDefinitionSet(cboFileExtension.Text, b);
        }
示例#2
0
        private void txtNewRule_Click(object sender, EventArgs e)
        {
            string exp = Microsoft.VisualBasic.Interaction.InputBox("", "New Regular Expression", "");

            if (!string.IsNullOrEmpty(exp))
            {
                var b = this.GetSelectedFileColorDefinitionSet();
                b.AddColorDefinition(exp);
                b.PopulateListView(this.lvColor);
                TextHighlighterConfigApi.SetFileColorDefinitionSet(cboFileExtension.Text, b);
                var ba = this.GetSelectedFileColorDefinitionSet();
            }
        }