protected virtual void OnGlobalPaletteChanged(object sender, EventArgs e)
{
// We only care if we are using the global palette
if (PaletteMode == PaletteMode.Global)
{
// Update ourself with the new global palette
_localPalette = null;
SetPalette(KryptonManager.CurrentGlobalPalette);
Redirector.Target = _palette;
// Need to recalculate anything relying on the palette
DirtyPaletteCounter++;
// A new palette source means we need to layout and redraw
OnNeedPaint(Palette, new NeedLayoutEventArgs(true));
// Must raise event to change palette in redirector
OnPaletteChanged(EventArgs.Empty);
}
}