Beispiel #1
0
        private void ButtonModifyQuickColorizer_Click(object sender, EventArgs e)
        {
            var colorizer = GetSelectedQuickColorizer();

            if (colorizer == null)
            {
                return;
            }

            var edit = new QuickColorizerEdit(colorizer);
            var dr   = edit.ShowDialog(this);

            listViewQuickColorizers.Focus();
            if (dr != DialogResult.OK)
            {
                return;
            }

            var existing = GetExistingQuickColorizer(edit.QuickColorizer);

            if ((existing != null) && (existing != edit.QuickColorizer))
            {
                Remove(edit.QuickColorizer);
                return;
            }

            var item = listViewQuickColorizers.SelectedItems[0];

            item.Text             = edit.QuickColorizer.Active.ToString();
            item.SubItems[1].Text = edit.QuickColorizer.IgnoreCase.ToString();
            item.SubItems[2].Text = edit.QuickColorizer.WholeText.ToString();
            item.SubItems[3].Text = edit.QuickColorizer.ColorSet != null?edit.QuickColorizer.ColorSet.ToString() : string.Empty;

            item.SubItems[4].Text = edit.QuickColorizer.Text;
        }
Beispiel #2
0
        private void buttonModifyQuickColorizer_Click(object sender, EventArgs e)
        {
            QuickColorizer colorizer = GetSelectedQuickColorizer();
            if (colorizer == null)
                return;

            QuickColorizerEdit edit = new QuickColorizerEdit(colorizer);
            DialogResult dr = edit.ShowDialog(this);
            listViewQuickColorizers.Focus();
            if (dr != DialogResult.OK)
                return;

            QuickColorizer existing = GetExistingQuickColorizer(edit.QuickColorizer);
            if ((existing != null) && (existing != edit.QuickColorizer))
            {
                Remove(edit.QuickColorizer);
                return;
            }

            ListViewItem item = listViewQuickColorizers.SelectedItems[0];
            item.Text = edit.QuickColorizer.Active.ToString();
            item.SubItems[1].Text = edit.QuickColorizer.IgnoreCase.ToString();
            item.SubItems[2].Text = edit.QuickColorizer.WholeText.ToString();
            item.SubItems[3].Text = edit.QuickColorizer.ColorSet != null ? edit.QuickColorizer.ColorSet.ToString() : string.Empty;
            item.SubItems[4].Text = edit.QuickColorizer.Text;
        }
Beispiel #3
0
        private void buttonAddQuickColorizer_Click(object sender, EventArgs e)
        {
            QuickColorizerEdit edit = new QuickColorizerEdit(null);
            DialogResult dr = edit.ShowDialog(this);
            listViewQuickColorizers.Focus();
            if (dr != DialogResult.OK)
                return;

            QuickColorizer existing = GetExistingQuickColorizer(edit.QuickColorizer);
            if (existing != null)
            {
                GetQuickColorizerItem(existing).Selected = true;
                return;
            }

            listViewQuickColorizers.Items.Add(GetQuickColorizerItem(edit.QuickColorizer)).Selected = true;
        }
Beispiel #4
0
        private void ButtonAddQuickColorizer_Click(object sender, EventArgs e)
        {
            var edit = new QuickColorizerEdit(null);
            var dr   = edit.ShowDialog(this);

            listViewQuickColorizers.Focus();
            if (dr != DialogResult.OK)
            {
                return;
            }

            var existing = GetExistingQuickColorizer(edit.QuickColorizer);

            if (existing != null)
            {
                GetQuickColorizerItem(existing).Selected = true;
                return;
            }

            listViewQuickColorizers.Items.Add(GetQuickColorizerItem(edit.QuickColorizer)).Selected = true;
        }