public void SetStyle(ToolStrip strip, VsVersion version, ThemeBase theme) { ToolStripProperties properties = null; if (!strips.ContainsKey(strip)) { properties = new ToolStripProperties(strip) { VsVersion = version }; strips.Add(strip, properties); } else { properties = strips[strip]; } if (theme == null) { if (DefaultRenderer != null) { strip.Renderer = DefaultRenderer; } } else { theme.ApplyTo(strip); } properties.VsVersion = version; }
public void SetStyle(ToolStrip strip, VsVersion version, ThemeBase theme) { var apply = false; ToolStripProperties properties = null; if (!strips.ContainsKey(strip)) { properties = new ToolStripProperties(strip) { VsVersion = version }; strips.Add(strip, properties); apply = true; } else { properties = strips[strip]; apply = properties.VsVersion != version; } if (apply) { if (theme == null) strip.Renderer = DefaultRenderer; else theme.ApplyTo(strip); properties.VsVersion = version; } }
public void EnableVSRenderer(ThemeBase theme, VisualStudioToolStripExtender.VsVersion version = VisualStudioToolStripExtender.VsVersion.Vs2015) { System.Reflection.FieldInfo[] fieldInfo = this.GetType().GetFields(System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); for (int i = 0; i < fieldInfo.Length; i++) { switch (fieldInfo[i].FieldType.Name) { case "ContextMenuStrip": ContextMenuStrip cms = (ContextMenuStrip)fieldInfo[i].GetValue(this); cms.DropShadowEnabled = false; vsToolStripExtender.SetStyle(cms, version, theme); break; case "ToolStrip": ToolStrip ts = (ToolStrip)fieldInfo[i].GetValue(this); vsToolStripExtender.SetStyle(ts, version, theme); break; case "StatusStrip": StatusStrip ss = (StatusStrip)fieldInfo[i].GetValue(this); vsToolStripExtender.SetStyle(ss, version, theme); break; } } }
public void SetStyle(ToolStrip strip, ThemeBase theme)//VsVersion version, { ToolStripProperties properties = null; VsVersion version = VsVersion.Vs2015; VisualStudioToolStripRenderer vsRenderer = (VisualStudioToolStripRenderer)theme.ToolStripRenderer; vsRenderer.Refresh(); if (!strips.ContainsKey(strip)) { properties = new ToolStripProperties(strip) { VsVersion = version }; strips.Add(strip, properties); } else { properties = strips[strip]; } if (theme == null) { if (DefaultRenderer != null) { strip.Renderer = DefaultRenderer; } } else { theme.ApplyTo(strip); } properties.VsVersion = version; }
public VS2012PaneIndicator(ThemeBase theme) { _bitmapPaneDiamond = theme.ImageService.Dockindicator_PaneDiamond; _bitmapPaneDiamondLeft = theme.ImageService.Dockindicator_PaneDiamond_Fill; _bitmapPaneDiamondRight = theme.ImageService.Dockindicator_PaneDiamond_Fill; _bitmapPaneDiamondTop = theme.ImageService.Dockindicator_PaneDiamond_Fill; _bitmapPaneDiamondBottom = theme.ImageService.Dockindicator_PaneDiamond_Fill; _bitmapPaneDiamondFill = theme.ImageService.Dockindicator_PaneDiamond_Fill; _bitmapPaneDiamondHotSpot = theme.ImageService.Dockindicator_PaneDiamond_Hotspot; _bitmapPaneDiamondHotSpotIndex = theme.ImageService.DockIndicator_PaneDiamond_HotspotIndex; _displayingGraphicsPath = DrawHelper.CalculateGraphicsPathFromBitmap(_bitmapPaneDiamond); SizeMode = PictureBoxSizeMode.AutoSize; Image = _bitmapPaneDiamond; Region = new Region(DisplayingGraphicsPath); }
public VS2012PanelIndicator(DockStyle dockStyle, ThemeBase theme) { _imagePanelLeft = theme.ImageService.DockIndicator_PanelLeft; _imagePanelRight = theme.ImageService.DockIndicator_PanelRight; _imagePanelTop = theme.ImageService.DockIndicator_PanelTop; _imagePanelBottom = theme.ImageService.DockIndicator_PanelBottom; _imagePanelFill = theme.ImageService.DockIndicator_PanelFill; _imagePanelLeftActive = theme.ImageService.DockIndicator_PanelLeft; _imagePanelRightActive = theme.ImageService.DockIndicator_PanelRight; _imagePanelTopActive = theme.ImageService.DockIndicator_PanelTop; _imagePanelBottomActive = theme.ImageService.DockIndicator_PanelBottom; _imagePanelFillActive = theme.ImageService.DockIndicator_PanelFill; m_dockStyle = dockStyle; SizeMode = PictureBoxSizeMode.AutoSize; Image = ImageInactive; }
public VS2012LightPanelIndicator(DockStyle dockStyle, ThemeBase theme) { m_dockStyle = dockStyle; SizeMode = PictureBoxSizeMode.AutoSize; Image = ImageInactive; _imagePanelLeft = theme.ImageService.DockIndicator_PanelLeft; _imagePanelRight = theme.ImageService.DockIndicator_PanelRight; _imagePanelTop = theme.ImageService.DockIndicator_PanelTop; _imagePanelBottom = theme.ImageService.DockIndicator_PanelBottom; _imagePanelFill = theme.ImageService.DockIndicator_PanelFill; _imagePanelLeftActive = theme.ImageService.DockIndicator_PanelLeft; _imagePanelRightActive = theme.ImageService.DockIndicator_PanelRight; _imagePanelTopActive = theme.ImageService.DockIndicator_PanelTop; _imagePanelBottomActive = theme.ImageService.DockIndicator_PanelBottom; _imagePanelFillActive = theme.ImageService.DockIndicator_PanelFill; }
public DockPanel.IPaneIndicator CreatePaneIndicator(ThemeBase theme) { return(new VS2005MultithreadingPaneIndicator()); }
public DockPanel.IPanelIndicator CreatePanelIndicator(DockStyle style, ThemeBase theme) { return(new VS2005MultithreadingPanelIndicator(style)); }
public DockPanel.IPaneIndicator CreatePaneIndicator(ThemeBase theme, DockPanel.DockDragHandler dragHandler) { return(new VS2005MultithreadingPaneIndicator()); }
public DockPanel.IPanelIndicator CreatePanelIndicator(DockStyle style, ThemeBase theme) { return new VS2012LightPanelIndicator(style, (VS2012DarkTheme)theme); }
private void EnableVSRenderer(VisualStudioToolStripExtender.VsVersion version, ThemeBase theme) { vsToolStripExtender1.SetStyle(mainMenu, version, theme); vsToolStripExtender1.SetStyle(toolBar, version, theme); vsToolStripExtender1.SetStyle(statusBar, version, theme); }
public DockPanel.IPanelIndicator CreatePanelIndicator(DockStyle style, ThemeBase theme) { return(new DockPanel.DefaultPanelIndicator(style)); }
public DockPanel.IPaneIndicator CreatePaneIndicator(ThemeBase theme) { return new DockPanel.DefaultPaneIndicator(); }
public DockPanel.IPaneIndicator CreatePaneIndicator(ThemeBase theme) { throw new NotImplementedException(); }
public DockPanel.IPaneIndicator CreatePaneIndicator(ThemeBase theme) { return(new VS2013BluePaneIndicator()); }
public DockPanel.IPaneIndicator CreatePaneIndicator(ThemeBase theme) { return new VS2012LightPaneIndicator((VS2012DarkTheme)theme); }
public DockPanel.IPanelIndicator CreatePanelIndicator(DockStyle style, ThemeBase theme) { return(new VS2013BluePanelIndicator(style)); }
public DockPanel.IPaneIndicator CreatePaneIndicator(ThemeBase theme) { return new VS2005MultithreadingPaneIndicator(); }
public DockPanel.IPanelIndicator CreatePanelIndicator(DockStyle style, ThemeBase theme) { return new VS2005MultithreadingPanelIndicator(style); }
public DockPanel.IPaneIndicator CreatePaneIndicator(ThemeBase theme) { return(new DefaultPaneIndicator(theme)); }
public DockPanel.IPaneIndicator CreatePaneIndicator(ThemeBase theme) { return(new VS2012LightPaneIndicator((VS2012LightTheme)theme)); }
public DefaultPaneIndicator(ThemeBase theme) { this.theme = theme; }
public DockPanel.IPanelIndicator CreatePanelIndicator(DockStyle style, ThemeBase theme) { return new VS2013BluePanelIndicator(style); }
public ImageService(ThemeBase theme) { _palette = theme.ColorPalette; Dockindicator_PaneDiamond_Hotspot = Resources.Dockindicator_PaneDiamond_Hotspot; DockIndicator_PaneDiamond_HotspotIndex = Resources.DockIndicator_PaneDiamond_HotspotIndex; var arrow = _palette.DockTarget.GlyphArrow; var outerBorder = _palette.DockTarget.Border; var separator = _palette.DockTarget.ButtonBorder; var innerBorder = _palette.DockTarget.Background; var background = _palette.DockTarget.ButtonBackground; var window = _palette.DockTarget.GlyphBorder; var core = _palette.DockTarget.GlyphBackground; var drawCore = core.ToArgb() != background.ToArgb(); using (var layerArrow = ImageServiceHelper.GetLayerImage(arrow, 32, theme.PaintingService)) using (var layerWindow = ImageServiceHelper.GetLayerImage(window, 32, theme.PaintingService)) using (var layerCore = drawCore ? ImageServiceHelper.GetLayerImage(core, 32, theme.PaintingService) : null) using (var layerBorder = ImageServiceHelper.GetBackground(innerBorder, outerBorder, 40, theme.PaintingService)) using (var bottom = ImageServiceHelper.GetDockIcon( Resources.MaskArrowBottom, layerArrow, Resources.MaskWindowBottom, layerWindow, Resources.MaskDock, background, theme.PaintingService, Resources.MaskCoreBottom, layerCore, separator)) using (var center = ImageServiceHelper.GetDockIcon( null, null, Resources.MaskWindowCenter, layerWindow, Resources.MaskDock, background, theme.PaintingService, Resources.MaskCoreCenter, layerCore, separator)) using (var left = ImageServiceHelper.GetDockIcon( Resources.MaskArrowLeft, layerArrow, Resources.MaskWindowLeft, layerWindow, Resources.MaskDock, background, theme.PaintingService, Resources.MaskCoreLeft, layerCore, separator)) using (var right = ImageServiceHelper.GetDockIcon( Resources.MaskArrowRight, layerArrow, Resources.MaskWindowRight, layerWindow, Resources.MaskDock, background, theme.PaintingService, Resources.MaskCoreRight, layerCore, separator)) using (var top = ImageServiceHelper.GetDockIcon( Resources.MaskArrowTop, layerArrow, Resources.MaskWindowTop, layerWindow, Resources.MaskDock, background, theme.PaintingService, Resources.MaskCoreTop, layerCore, separator)) { DockIndicator_PanelBottom = ImageServiceHelper.GetDockImage(bottom, layerBorder); DockIndicator_PanelFill = ImageServiceHelper.GetDockImage(center, layerBorder); DockIndicator_PanelLeft = ImageServiceHelper.GetDockImage(left, layerBorder); DockIndicator_PanelRight = ImageServiceHelper.GetDockImage(right, layerBorder); DockIndicator_PanelTop = ImageServiceHelper.GetDockImage(top, layerBorder); using (var five = ImageServiceHelper.GetFiveBackground(Resources.MaskDockFive, innerBorder, outerBorder, theme.PaintingService)) { Dockindicator_PaneDiamond = ImageServiceHelper.CombineFive(five, bottom, center, left, right, top); Dockindicator_PaneDiamond_Fill = ImageServiceHelper.CombineFive(five, bottom, center, left, right, top); } } TabActive_Close = ImageServiceHelper.GetImage(Resources.MaskTabClose, _palette.TabSelectedActive.Button, _palette.TabSelectedActive.Background); TabInactive_Close = ImageServiceHelper.GetImage(Resources.MaskTabClose, _palette.TabUnselectedHovered.Button, _palette.TabUnselectedHovered.Background); TabLostFocus_Close = ImageServiceHelper.GetImage(Resources.MaskTabClose, _palette.TabSelectedInactive.Button, _palette.TabSelectedInactive.Background); TabHoverActive_Close = ImageServiceHelper.GetImage(Resources.MaskTabClose, _palette.TabButtonSelectedActiveHovered.Glyph, _palette.TabButtonSelectedActiveHovered.Background, _palette.TabButtonSelectedActiveHovered.Border); TabHoverInactive_Close = ImageServiceHelper.GetImage(Resources.MaskTabClose, _palette.TabButtonUnselectedTabHoveredButtonHovered.Glyph, _palette.TabButtonUnselectedTabHoveredButtonHovered.Background, _palette.TabButtonUnselectedTabHoveredButtonHovered.Border); TabHoverLostFocus_Close = ImageServiceHelper.GetImage(Resources.MaskTabClose, _palette.TabButtonSelectedInactiveHovered.Glyph, _palette.TabButtonSelectedInactiveHovered.Background, _palette.TabButtonSelectedInactiveHovered.Border); TabPressActive_Close = ImageServiceHelper.GetImage(Resources.MaskTabClose, _palette.TabButtonSelectedActivePressed.Glyph, _palette.TabButtonSelectedActivePressed.Background, _palette.TabButtonSelectedActivePressed.Border); TabPressInactive_Close = ImageServiceHelper.GetImage(Resources.MaskTabClose, _palette.TabButtonUnselectedTabHoveredButtonPressed.Glyph, _palette.TabButtonUnselectedTabHoveredButtonPressed.Background, _palette.TabButtonUnselectedTabHoveredButtonPressed.Border); TabPressLostFocus_Close = ImageServiceHelper.GetImage(Resources.MaskTabClose, _palette.TabButtonSelectedInactivePressed.Glyph, _palette.TabButtonSelectedInactivePressed.Background, _palette.TabButtonSelectedInactivePressed.Border); DockPane_List = ImageServiceHelper.GetImage(Resources.MaskTabList, _palette.OverflowButtonDefault.Glyph, _palette.MainWindowActive.Background); DockPane_OptionOverflow = ImageServiceHelper.GetImage(Resources.MaskTabOverflow, _palette.OverflowButtonDefault.Glyph, _palette.MainWindowActive.Background); DockPaneHover_List = ImageServiceHelper.GetImage(Resources.MaskTabList, _palette.OverflowButtonHovered.Glyph, _palette.OverflowButtonHovered.Background, _palette.OverflowButtonHovered.Border); DockPaneHover_OptionOverflow = ImageServiceHelper.GetImage(Resources.MaskTabOverflow, _palette.OverflowButtonHovered.Glyph, _palette.OverflowButtonHovered.Background, _palette.OverflowButtonHovered.Border); DockPanePress_List = ImageServiceHelper.GetImage(Resources.MaskTabList, _palette.OverflowButtonPressed.Glyph, _palette.OverflowButtonPressed.Background, _palette.OverflowButtonPressed.Border); DockPanePress_OptionOverflow = ImageServiceHelper.GetImage(Resources.MaskTabOverflow, _palette.OverflowButtonPressed.Glyph, _palette.OverflowButtonPressed.Background, _palette.OverflowButtonPressed.Border); DockPane_Close = ImageServiceHelper.GetImage(Resources.MaskToolWindowClose, _palette.ToolWindowCaptionInactive.Button, _palette.ToolWindowCaptionInactive.Background); DockPane_Dock = ImageServiceHelper.GetImage(Resources.MaskToolWindowDock, _palette.ToolWindowCaptionInactive.Button, _palette.ToolWindowCaptionInactive.Background); DockPane_Option = ImageServiceHelper.GetImage(Resources.MaskToolWindowOption, _palette.ToolWindowCaptionInactive.Button, _palette.ToolWindowCaptionInactive.Background); DockPaneActive_Close = ImageServiceHelper.GetImage(Resources.MaskToolWindowClose, _palette.ToolWindowCaptionActive.Button, _palette.ToolWindowCaptionActive.Background); DockPaneActive_Dock = ImageServiceHelper.GetImage(Resources.MaskToolWindowDock, _palette.ToolWindowCaptionActive.Button, _palette.ToolWindowCaptionActive.Background); DockPaneActive_Option = ImageServiceHelper.GetImage(Resources.MaskToolWindowOption, _palette.ToolWindowCaptionActive.Button, _palette.ToolWindowCaptionActive.Background); DockPaneActive_AutoHide = ImageServiceHelper.GetImage(Resources.MaskToolWindowAutoHide, _palette.ToolWindowCaptionActive.Button, _palette.ToolWindowCaptionActive.Background); DockPaneHover_Close = ImageServiceHelper.GetImage(Resources.MaskToolWindowClose, _palette.ToolWindowCaptionButtonInactiveHovered.Glyph, _palette.ToolWindowCaptionButtonInactiveHovered.Background, _palette.ToolWindowCaptionButtonInactiveHovered.Border); DockPaneHover_Dock = ImageServiceHelper.GetImage(Resources.MaskToolWindowDock, _palette.ToolWindowCaptionButtonInactiveHovered.Glyph, _palette.ToolWindowCaptionButtonInactiveHovered.Background, _palette.ToolWindowCaptionButtonInactiveHovered.Border); DockPaneHover_Option = ImageServiceHelper.GetImage(Resources.MaskToolWindowOption, _palette.ToolWindowCaptionButtonInactiveHovered.Glyph, _palette.ToolWindowCaptionButtonInactiveHovered.Background, _palette.ToolWindowCaptionButtonInactiveHovered.Border); DockPaneActiveHover_Close = ImageServiceHelper.GetImage(Resources.MaskToolWindowClose, _palette.ToolWindowCaptionButtonActiveHovered.Glyph, _palette.ToolWindowCaptionButtonActiveHovered.Background, _palette.ToolWindowCaptionButtonActiveHovered.Border); DockPaneActiveHover_Dock = ImageServiceHelper.GetImage(Resources.MaskToolWindowDock, _palette.ToolWindowCaptionButtonActiveHovered.Glyph, _palette.ToolWindowCaptionButtonActiveHovered.Background, _palette.ToolWindowCaptionButtonActiveHovered.Border); DockPaneActiveHover_Option = ImageServiceHelper.GetImage(Resources.MaskToolWindowOption, _palette.ToolWindowCaptionButtonActiveHovered.Glyph, _palette.ToolWindowCaptionButtonActiveHovered.Background, _palette.ToolWindowCaptionButtonActiveHovered.Border); DockPaneActiveHover_AutoHide = ImageServiceHelper.GetImage(Resources.MaskToolWindowAutoHide, _palette.ToolWindowCaptionButtonActiveHovered.Glyph, _palette.ToolWindowCaptionButtonActiveHovered.Background, _palette.ToolWindowCaptionButtonActiveHovered.Border); DockPanePress_Close = ImageServiceHelper.GetImage(Resources.MaskToolWindowClose, _palette.ToolWindowCaptionButtonPressed.Glyph, _palette.ToolWindowCaptionButtonPressed.Background, _palette.ToolWindowCaptionButtonPressed.Border); DockPanePress_Dock = ImageServiceHelper.GetImage(Resources.MaskToolWindowDock, _palette.ToolWindowCaptionButtonPressed.Glyph, _palette.ToolWindowCaptionButtonPressed.Background, _palette.ToolWindowCaptionButtonPressed.Border); DockPanePress_Option = ImageServiceHelper.GetImage(Resources.MaskToolWindowOption, _palette.ToolWindowCaptionButtonPressed.Glyph, _palette.ToolWindowCaptionButtonPressed.Background, _palette.ToolWindowCaptionButtonPressed.Border); DockPanePress_AutoHide = ImageServiceHelper.GetImage(Resources.MaskToolWindowAutoHide, _palette.ToolWindowCaptionButtonPressed.Glyph, _palette.ToolWindowCaptionButtonPressed.Background, _palette.ToolWindowCaptionButtonPressed.Border); }
private void SetTheme(ThemeBase theme) { dockPanel.Theme = theme; m_solutionExplorer.Theme = theme; m_propertyWindow.Theme = theme; m_toolbox.Theme = theme; m_outputWindow.Theme = theme; m_taskList.Theme = theme; }
public DockPanel.IPanelIndicator CreatePanelIndicator(DockStyle style, ThemeBase theme) { return new DockPanel.DefaultPanelIndicator(style); }
public DockPanel.IPaneIndicator CreatePaneIndicator(ThemeBase theme) { return new VS2013BluePaneIndicator(); }