Esempio n. 1
0
        private void listBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            GlareSetAttributes gsd = listBox2.SelectedItem as GlareSetAttributes;

            if (attrib_last_selection != null)
            {
                if (!attrib_last_selection.Equals(gsd))
                {
                    attrib_last_selection.Primary            = this.colorWellPrimary.color;
                    attrib_last_selection.PrimaryHighlight   = this.colorWellPrimaryHighlight.color;
                    attrib_last_selection.Secondary          = this.colorWellSecondary.color;
                    attrib_last_selection.SecondaryHighlight = this.colorWellSecondaryHighlight.color;
                    attrib_last_selection.Tertiary           = this.colorWellTertiary.color;
                    attrib_last_selection.TertiaryHighlight  = this.colorWellTertiaryHighlight.color;
                }
            }

            psI_Button2.gs.attrib = gsd;
            if (gsd != null)
            {
                psI_Button2.Refresh();
            }
            psI_Button1.gs.attrib = gsd;
            if (gsd != null)
            {
                psI_Button1.Refresh();
            }

            if (gsd != null)
            {
                this.colorWellPrimary.color            = gsd.Primary;
                this.colorWellPrimaryHighlight.color   = gsd.PrimaryHighlight;
                this.colorWellSecondary.color          = gsd.Secondary;
                this.colorWellSecondaryHighlight.color = gsd.SecondaryHighlight;
                this.colorWellTertiary.color           = gsd.Tertiary;
                this.colorWellTertiaryHighlight.color  = gsd.TertiaryHighlight;
                attrib_last_selection = gsd;
            }
        }