Beispiel #1
0
        private void ButtonModifyColorSetClick(object sender, EventArgs e)
        {
            var set = GetSelectedColorSet();

            if (set == null)
            {
                return;
            }

            var edit = new ColorSetEdit(set, true);
            var dr   = edit.ShowDialog(this);

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

            var existing = GetExistingColorSet(edit.ColorSet);

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

            var item = listViewColorSets.SelectedItems[0];

            item.Text             = edit.ColorSet.Name;
            item.SubItems[1].Text = edit.ColorSet.ForeColorName;
            item.SubItems[2].Text = edit.ColorSet.BackColorName;
            item.SubItems[3].Text = edit.ColorSet.Mode.ToString();
            item.SubItems[4].Text = edit.ColorSet.FrameWidth.ToString();
        }
        private void buttonColor_Click(object sender, EventArgs e)
        {
            ColorSetEdit edit = new ColorSetEdit(QuickColorizer.ColorSet, false);
            DialogResult dr = edit.ShowDialog(this);
            if (dr != DialogResult.OK)
                return;

            textBoxColor.Tag = edit.ColorSet;
            textBoxColor.Text = edit.ColorSet.ToString();
        }
Beispiel #3
0
        private void ButtonColor_Click(object sender, EventArgs e)
        {
            var          edit = new ColorSetEdit(QuickColorizer.ColorSet, false);
            DialogResult dr   = edit.ShowDialog(this);

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

            textBoxColor.Tag  = edit.ColorSet;
            textBoxColor.Text = edit.ColorSet.ToString();
        }
Beispiel #4
0
        private void ButtonAddColorSetClick(object sender, EventArgs e)
        {
            var edit = new ColorSetEdit(null, true);
            var dr   = edit.ShowDialog(this);

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

            var existing = GetExistingColorSet(edit.ColorSet);

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

            listViewColorSets.Items.Add(GetColorSetItem(edit.ColorSet)).Selected = true;
        }
Beispiel #5
0
        private void ButtonModifyColorSetClick(object sender, EventArgs e)
        {
            ColorSet set = GetSelectedColorSet();
            if (set == null)
                return;

            ColorSetEdit edit = new ColorSetEdit(set, true);
            DialogResult dr = edit.ShowDialog(this);
            listViewColorSets.Focus();
            if (dr != DialogResult.OK)
                return;

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

            ListViewItem item = listViewColorSets.SelectedItems[0];
            item.Text = edit.ColorSet.Name;
            item.SubItems[1].Text = edit.ColorSet.ForeColorName;
            item.SubItems[2].Text = edit.ColorSet.BackColorName;
            item.SubItems[3].Text = edit.ColorSet.Mode.ToString();
            item.SubItems[4].Text = edit.ColorSet.FrameWidth.ToString();
        }
Beispiel #6
0
        private void ButtonAddColorSetClick(object sender, EventArgs e)
        {
            ColorSetEdit edit = new ColorSetEdit(null, true);
            DialogResult dr = edit.ShowDialog(this);
            listViewColorizers.Focus();
            if (dr != DialogResult.OK)
                return;

            ColorSet existing = GetExistingColorSet(edit.ColorSet);
            if (existing != null)
            {
                GetColorSetItem(existing).Selected = true;
                return;
            }

            listViewColorSets.Items.Add(GetColorSetItem(edit.ColorSet)).Selected = true;
        }