Ejemplo n.º 1
0
        /// <summary>
        /// Applies the specific theme
        /// </summary>
        /// <param name="theme"></param>
        public virtual void ApplyTheme(ThemeBase theme)
        {
            contentPanel.Theme = theme;
            if (theme != null)
            {
                var toolstrips = toolStripContainer
                                 .TopToolStripPanel
                                 .Controls
                                 .OfType <ToolStrip>()
                                 .Concat(toolStripContainer
                                         .BottomToolStripPanel
                                         .Controls
                                         .OfType <ToolStrip>())
                                 .Concat(toolStripContainer
                                         .LeftToolStripPanel
                                         .Controls
                                         .OfType <ToolStrip>())
                                 .Concat(toolStripContainer
                                         .RightToolStripPanel
                                         .Controls
                                         .OfType <ToolStrip>());

                foreach (var ts in toolstrips)
                {
                    theme.ApplyTo(ts);
                }
                theme.ApplyTo(menu);
                theme.ApplyTo(status);
                theme.ApplyTo(ctxToolbar);
            }
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public SingleViewPerspective()
        {
            iDockPanel = new PerspectiveDockPanel {
                Margin = new Padding(0)
            };

            // Apply current theme
            ThemeBase theme = GetTheme();

            theme.ApplyTo(iDockPanel);
            theme.ApplyTo(iDockPanel);
            theme.ApplyToToolStripManager();

            // ReSharper disable once VirtualMemberCallInConstructor
            ConfigureDockPanel(iDockPanel);
        }
Ejemplo n.º 3
0
 public FrmLog(Setting setting, ThemeBase theme)
 {
     InitializeComponent();
     this.tbLog.BackColor = Color.FromArgb(setting.ColorScheme.Log_BackColor);
     this.tbLog.ForeColor = Color.FromArgb(setting.ColorScheme.Log_ForeColor);
     theme.ApplyTo(toolStrip1);
 }
 internal void AcceptTheme(ThemeBase theme)
 {
     theme.ApplyTo(tsSiteExplorer);
 }