コード例 #1
0
    public void SetColors(PanelColors newColors)
    {
        colors                    = newColors;
        HeaderLabel.color         = colors.TextColor;
        ArrowIcon.ActiveColour    = colors.ArrowColor;
        ArrowIcon.InactiveColour  = colors.ArrowColor;
        CollapseButton.transition = Selectable.Transition.None;
        ColorBlock colorBlock = default(ColorBlock);

        colorBlock.normalColor      = new Color(colors.FrameColor.r, colors.FrameColor.g, colors.FrameColor.b, colors.FrameColor.a);
        colorBlock.highlightedColor = colors.FrameColor_Hover;
        colorBlock.pressedColor     = colors.FrameColor_Press;
        colorBlock.disabledColor    = colorBlock.normalColor;
        colorBlock.colorMultiplier  = 1f;
        CollapseButton.colors       = colorBlock;
        CollapseButton.transition   = Selectable.Transition.ColorTint;
    }
コード例 #2
0
        private static void SetPanelsStyle(Control control, Style style)
        {
            ToolStripRenderer             m_currentToolStripRenderer;
            ToolStripProfessionalRenderer toolStripRenderer = new Office2007Renderer();

            Panels.ProfessionalColorTable colorTable = StyleBuilderFactory.GetOffice2007ColorTable(style);

            PanelColors panelColorTable = colorTable.PanelColorTable;

            if (panelColorTable != null)
            {
                PanelSettingsManager.SetPanelProperties(
                    control.Controls,
                    panelColorTable);
            }
            m_currentToolStripRenderer = toolStripRenderer;
            object renderer = Activator.CreateInstance(m_currentToolStripRenderer.GetType(), new object[] { colorTable });

            m_currentToolStripRenderer = renderer as ToolStripProfessionalRenderer;
            ToolStripManager.Renderer  = m_currentToolStripRenderer;
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: andrdz/GameMemory
 public MainForm()
 {
     InitializeComponent();
     graph1 = DrawPanel.CreateGraphics();
     graph2 = PanelColors.CreateGraphics();
 }