コード例 #1
0
 public static void ApplyTo(
     this VisualizerDialogColourTable colourTable,
     ToolStrip toolStrip)
 {
     toolStrip.BackColor = colourTable.ToolbarColour;
     toolStrip.ForeColor = colourTable.ForeColour;
 }
コード例 #2
0
        public static void ApplyTo(
            this VisualizerDialogColourTable colourTable,
            Control control)
        {
            if (control is ToolStrip toolStrip && !(toolStrip is ToolStripDropDown))
            {
                colourTable.ApplyTo(toolStrip);
                return;
            }

            control.BackColor = colourTable.MenuColour;
            control.ForeColor = colourTable.ForeColour;

            if (control is IThemeable themeable)
            {
                themeable.Apply(colourTable);
            }
        }