void dropPanel_ColorPicked(object sender, EventArgs e) { currentColor = dropPanel.CurrentColor; dropPanel.Hide(); SolidColorPickerPanel.AddRecentColor(currentColor); if (ColorPicked != null) { ColorPicked.Invoke(this, new EventArgs()); } }
void dropPanel_ColorPicked(object sender, EventArgs e) { currentColor = dropPanel.CurrentColor; if (CloseOnClick && currentColor is SolidColor) { dropPanel.Close(ToolStripDropDownCloseReason.ItemClicked); } Invalidate(); if (currentColor is SolidColor) { SolidColorPickerPanel.AddRecentColor(((SolidColor)currentColor).Color); } if (ColorPicked != null) { ColorPicked.Invoke(this, new EventArgs()); } }