private void SetupColorsLocal(ColorPalette c)
{
// Disabled?
if(!localenabled)
{
// Disabled color
this.BackColor = c[ColorIndex.ControlDisabled];
this.ForeColor = c[ColorIndex.ControlDisabledText];
}
// Info color?
else if(!flashwarning && flashinfo)
{
if(General.MainWindow.InfoFlashState ^ inverseflash)
{
this.BackColor = c[ColorIndex.InfoLight];
this.ForeColor = c[ColorIndex.InfoLightText];
}
else
{
this.BackColor = c[ColorIndex.InfoDark];
this.ForeColor = c[ColorIndex.InfoDarkText];
}
}
// Warning color?
else if(flashwarning)
{
if(General.MainWindow.WarningFlashState ^ inverseflash)
{
this.BackColor = c[ColorIndex.WarningLight];
this.ForeColor = c[ColorIndex.WarningLightText];
}
else
{
this.BackColor = c[ColorIndex.WarningDark];
this.ForeColor = c[ColorIndex.WarningDarkText];
}
}
else
{
// Normal color
this.BackColor = c[normalcolor];
this.ForeColor = c[textcolor];
}
}