示例#1
0
 void OnEntrySelected(object sender, PaletteSelectionInfo e)
 {
     if (EntrySelected != null)
     {
         EntrySelected(this, e);
     }
 }
示例#2
0
        private void OnChildClick(Object sender, EventArgs e)
        {
            PictureBox s = sender as PictureBox;

            // Don't reselect pal entry
            if (s.Image == selectionImage)
            {
                return;
            }

            s.Image = selectionImage;
            if (PaletteEntrySelected != null)
            {
                PaletteSelectionInfo i = new PaletteSelectionInfo(
                    s,
                    this,
                    s == pal0 ?
                    0 :
                    s == pal1 ?
                    1 :
                    s == pal2 ?
                    2 : 3,
                    (ModifierKeys == Keys.Shift)
                    );
                PaletteEntrySelected(this, i);
            }
        }