mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-07-23 12:11:32 +03:00
Dock panel tabs now calculated & drawn
This commit is contained in:
parent
4de889ae6e
commit
04f116d333
@ -129,6 +129,11 @@
|
||||
<Compile Include="Forms\DarkTranslucentForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Icons\DockIcons.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DockIcons.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Icons\MenuIcons.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@ -164,6 +169,11 @@
|
||||
<EmbeddedResource Include="Forms\DarkMessageBox.resx">
|
||||
<DependentUpon>DarkMessageBox.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Icons\DockIcons.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>DockIcons.Designer.cs</LastGenOutput>
|
||||
<CustomToolNamespace>DarkUI</CustomToolNamespace>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Icons\MenuIcons.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>MenuIcons.Designer.cs</LastGenOutput>
|
||||
@ -224,7 +234,24 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\node_open_empty.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<None Include="Resources\active-inactive-close.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\arrow.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\close.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\close-selected.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\inactive-close.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\inactive-close-selected.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DarkUI.Docking
|
||||
@ -12,7 +13,9 @@ namespace DarkUI.Docking
|
||||
{
|
||||
#region Field Region
|
||||
|
||||
private List<DarkDockContent> _contents;
|
||||
private List<DarkDockContent> _contents = new List<DarkDockContent>();
|
||||
|
||||
private Dictionary<DarkDockContent, DarkDockTab> _tabs = new Dictionary<DarkDockContent, DarkDockTab>();
|
||||
|
||||
private DarkDockTabArea _tabArea;
|
||||
|
||||
@ -38,7 +41,9 @@ namespace DarkUI.Docking
|
||||
|
||||
public DarkDockGroup(DarkDockPanel dockPanel, DarkDockRegion dockRegion, int order)
|
||||
{
|
||||
_contents = new List<DarkDockContent>();
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer |
|
||||
ControlStyles.ResizeRedraw |
|
||||
ControlStyles.UserPaint, true);
|
||||
|
||||
DockPanel = dockPanel;
|
||||
DockRegion = dockRegion;
|
||||
@ -61,6 +66,8 @@ namespace DarkUI.Docking
|
||||
_contents.Add(dockContent);
|
||||
Controls.Add(dockContent);
|
||||
|
||||
_tabs.Add(dockContent, new DarkDockTab(dockContent));
|
||||
|
||||
if (VisibleContent == null)
|
||||
VisibleContent = dockContent;
|
||||
|
||||
@ -80,6 +87,9 @@ namespace DarkUI.Docking
|
||||
_contents.Remove(dockContent);
|
||||
Controls.Remove(dockContent);
|
||||
|
||||
if (_tabs.ContainsKey(dockContent))
|
||||
_tabs.Remove(dockContent);
|
||||
|
||||
if (VisibleContent == dockContent)
|
||||
{
|
||||
VisibleContent = null;
|
||||
@ -123,21 +133,27 @@ namespace DarkUI.Docking
|
||||
case DarkDockArea.Document:
|
||||
size = _tabArea.Visible ? Consts.DocumentTabAreaSize : 0;
|
||||
Padding = new Padding(0, size, 0, 0);
|
||||
_tabArea.Area = new Rectangle(Padding.Left, 0, ClientRectangle.Width - Padding.Horizontal, size);
|
||||
_tabArea.ClientRectangle = new Rectangle(Padding.Left, 0, ClientRectangle.Width - Padding.Horizontal, size);
|
||||
break;
|
||||
case DarkDockArea.Left:
|
||||
case DarkDockArea.Right:
|
||||
size = _tabArea.Visible ? Consts.ToolWindowTabAreaSize : 0;
|
||||
Padding = new Padding(0, 0, 0, size);
|
||||
_tabArea.Area = new Rectangle(Padding.Left, ClientRectangle.Height - size, ClientRectangle.Width - Padding.Horizontal, size);
|
||||
_tabArea.ClientRectangle = new Rectangle(Padding.Left, ClientRectangle.Bottom - size, ClientRectangle.Width - Padding.Horizontal, size);
|
||||
break;
|
||||
case DarkDockArea.Bottom:
|
||||
size = _tabArea.Visible ? Consts.ToolWindowTabAreaSize : 0;
|
||||
Padding = new Padding(1, 0, 0, size);
|
||||
_tabArea.Area = new Rectangle(Padding.Left, ClientRectangle.Height - size, ClientRectangle.Width - Padding.Horizontal, size);
|
||||
_tabArea.ClientRectangle = new Rectangle(Padding.Left, ClientRectangle.Bottom - size, ClientRectangle.Width - Padding.Horizontal, size);
|
||||
break;
|
||||
}
|
||||
|
||||
if (DockArea == DarkDockArea.Document)
|
||||
{
|
||||
var dropdownSize = Consts.DocumentTabAreaSize;
|
||||
_tabArea.DropdownRectangle = new Rectangle(_tabArea.ClientRectangle.Right - dropdownSize, 0, dropdownSize, dropdownSize);
|
||||
}
|
||||
|
||||
BuildTabs();
|
||||
}
|
||||
|
||||
@ -148,17 +164,129 @@ namespace DarkUI.Docking
|
||||
|
||||
SuspendLayout();
|
||||
|
||||
var closeButtonSize = DockIcons.close.Width;
|
||||
|
||||
// Calculate areas of all tabs
|
||||
var totalSize = 0;
|
||||
|
||||
foreach (var tab in _tabs.Values)
|
||||
{
|
||||
int width;
|
||||
|
||||
using (var g = CreateGraphics())
|
||||
{
|
||||
width = tab.CalculateWidth(g, Font);
|
||||
}
|
||||
|
||||
// Add area for the close button
|
||||
if (DockArea == DarkDockArea.Document)
|
||||
{
|
||||
width += closeButtonSize;
|
||||
|
||||
if (tab.DockContent.Icon != null)
|
||||
width += tab.DockContent.Icon.Width + 5;
|
||||
}
|
||||
|
||||
// Show separator on all tabs for now
|
||||
tab.ShowSeparator = true;
|
||||
width += 1;
|
||||
|
||||
var y = DockArea == DarkDockArea.Document ? 0 : ClientRectangle.Height - Consts.ToolWindowTabAreaSize;
|
||||
var height = DockArea == DarkDockArea.Document ? Consts.DocumentTabAreaSize : Consts.ToolWindowTabAreaSize;
|
||||
|
||||
var tabRect = new Rectangle(_tabArea.ClientRectangle.Left + totalSize, y, width, height);
|
||||
tab.ClientRectangle = tabRect;
|
||||
|
||||
totalSize += width;
|
||||
}
|
||||
|
||||
// Cap the size if too large for the tab area
|
||||
if (DockArea != DarkDockArea.Document)
|
||||
{
|
||||
if (totalSize > _tabArea.ClientRectangle.Width)
|
||||
{
|
||||
var difference = totalSize - _tabArea.ClientRectangle.Width;
|
||||
|
||||
// No matter what, we want to slice off the 1 pixel separator from the final tab.
|
||||
var lastTab = _tabs.Values.Last();
|
||||
var tabRect = lastTab.ClientRectangle;
|
||||
lastTab.ClientRectangle = new Rectangle(tabRect.Left, tabRect.Top, tabRect.Width - 1, tabRect.Height);
|
||||
lastTab.ShowSeparator = false;
|
||||
|
||||
var differenceMadeUp = 1;
|
||||
|
||||
// Loop through and progressively resize the larger tabs until the total size fits within the tab area.
|
||||
while (differenceMadeUp < difference)
|
||||
{
|
||||
var largest = _tabs.Values.OrderByDescending(tab => tab.ClientRectangle.Width)
|
||||
.First()
|
||||
.ClientRectangle.Width;
|
||||
|
||||
foreach (var tab in _tabs.Values)
|
||||
{
|
||||
// Check if previous iteration of loop met the difference
|
||||
if (differenceMadeUp >= difference)
|
||||
continue;
|
||||
|
||||
if (tab.ClientRectangle.Width >= largest)
|
||||
{
|
||||
var rect = tab.ClientRectangle;
|
||||
tab.ClientRectangle = new Rectangle(rect.Left, rect.Top, rect.Width - 1, rect.Height);
|
||||
differenceMadeUp += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// After resizing the tabs reposition them accordingly.
|
||||
var xOffset = 0;
|
||||
foreach (var tab in _tabs.Values)
|
||||
{
|
||||
var rect = tab.ClientRectangle;
|
||||
tab.ClientRectangle = new Rectangle(_tabArea.ClientRectangle.Left + xOffset, rect.Top, rect.Width, rect.Height);
|
||||
|
||||
xOffset += rect.Width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Build close button rectangles
|
||||
if (DockArea == DarkDockArea.Document)
|
||||
{
|
||||
foreach (var tab in _tabs.Values)
|
||||
{
|
||||
var closeRect = new Rectangle(tab.ClientRectangle.Right - 7 - closeButtonSize - 1,
|
||||
tab.ClientRectangle.Top + (tab.ClientRectangle.Height / 2) - (closeButtonSize / 2) - 1,
|
||||
closeButtonSize, closeButtonSize);
|
||||
tab.CloseButtonRectangle = closeRect;
|
||||
}
|
||||
}
|
||||
|
||||
ResumeLayout();
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
private Point PointToTabArea(Point point)
|
||||
{
|
||||
return new Point(point.X - _tabArea.Offset, point.Y);
|
||||
}
|
||||
|
||||
private Rectangle RectangleToTabArea(Rectangle rectangle)
|
||||
{
|
||||
return new Rectangle(PointToTabArea(rectangle.Location), rectangle.Size);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Event Handler Region
|
||||
|
||||
protected override void OnResize(EventArgs eventargs)
|
||||
{
|
||||
base.OnResize(eventargs);
|
||||
|
||||
UpdateTabArea();
|
||||
}
|
||||
|
||||
private void TabMenuItem_Select(object sender, EventArgs e)
|
||||
{
|
||||
var menuItem = sender as ToolStripMenuItem;
|
||||
@ -176,6 +304,14 @@ namespace DarkUI.Docking
|
||||
|
||||
#region Render Region
|
||||
|
||||
public void Redraw()
|
||||
{
|
||||
Invalidate();
|
||||
|
||||
foreach (var content in _contents)
|
||||
content.Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
var g = e.Graphics;
|
||||
@ -190,7 +326,149 @@ namespace DarkUI.Docking
|
||||
|
||||
using (var b = new SolidBrush(Colors.MediumBackground))
|
||||
{
|
||||
g.FillRectangle(b, _tabArea.Area);
|
||||
g.FillRectangle(b, _tabArea.ClientRectangle);
|
||||
}
|
||||
|
||||
foreach (var tab in _tabs.Values)
|
||||
{
|
||||
if (DockArea == DarkDockArea.Document)
|
||||
PaintDocumentTab(g, tab);
|
||||
else
|
||||
PaintToolWindowTab(g, tab);
|
||||
}
|
||||
|
||||
if (DockArea == DarkDockArea.Document)
|
||||
{
|
||||
// Color divider
|
||||
var isActiveGroup = DockPanel.ActiveGroup == this;
|
||||
var divColor = isActiveGroup ? Colors.BlueSelection : Colors.GreySelection;
|
||||
using (var b = new SolidBrush(divColor))
|
||||
{
|
||||
var divRect = new Rectangle(_tabArea.ClientRectangle.Left, _tabArea.ClientRectangle.Bottom - 2, _tabArea.ClientRectangle.Width, 2);
|
||||
g.FillRectangle(b, divRect);
|
||||
}
|
||||
|
||||
// Content dropdown list
|
||||
var dropdownRect = new Rectangle(_tabArea.DropdownRectangle.Left, _tabArea.DropdownRectangle.Top, _tabArea.DropdownRectangle.Width, _tabArea.DropdownRectangle.Height - 2);
|
||||
|
||||
using (var b = new SolidBrush(Colors.MediumBackground))
|
||||
{
|
||||
g.FillRectangle(b, dropdownRect);
|
||||
}
|
||||
|
||||
using (var img = DockIcons.arrow)
|
||||
{
|
||||
g.DrawImageUnscaled(img, dropdownRect.Left + (dropdownRect.Width / 2) - (img.Width / 2), dropdownRect.Top + (dropdownRect.Height / 2) - (img.Height / 2) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PaintDocumentTab(Graphics g, DarkDockTab tab)
|
||||
{
|
||||
var tabRect = RectangleToTabArea(tab.ClientRectangle);
|
||||
|
||||
var isVisibleTab = VisibleContent == tab.DockContent;
|
||||
var isActiveGroup = DockPanel.ActiveGroup == this;
|
||||
|
||||
var bgColor = isVisibleTab ? Colors.BlueSelection : Colors.DarkBackground;
|
||||
|
||||
if (!isActiveGroup)
|
||||
bgColor = isVisibleTab ? Colors.GreySelection : Colors.DarkBackground;
|
||||
|
||||
if (tab.Hot && !isVisibleTab)
|
||||
bgColor = Colors.MediumBackground;
|
||||
|
||||
using (var b = new SolidBrush(bgColor))
|
||||
{
|
||||
g.FillRectangle(b, tabRect);
|
||||
}
|
||||
|
||||
// Draw separators
|
||||
if (tab.ShowSeparator)
|
||||
{
|
||||
using (var p = new Pen(Colors.DarkBorder))
|
||||
{
|
||||
g.DrawLine(p, tabRect.Right - 1, tabRect.Top, tabRect.Right - 1, tabRect.Bottom);
|
||||
}
|
||||
}
|
||||
|
||||
var xOffset = 0;
|
||||
|
||||
// Draw icon
|
||||
if (tab.DockContent.Icon != null)
|
||||
{
|
||||
g.DrawImageUnscaled(tab.DockContent.Icon, tabRect.Left + 5, tabRect.Top + 4);
|
||||
xOffset += tab.DockContent.Icon.Width + 2;
|
||||
}
|
||||
|
||||
var tabTextFormat = new StringFormat
|
||||
{
|
||||
Alignment = StringAlignment.Near,
|
||||
LineAlignment = StringAlignment.Center,
|
||||
FormatFlags = StringFormatFlags.NoWrap
|
||||
};
|
||||
|
||||
// Draw text
|
||||
var textColor = isVisibleTab ? Colors.LightText : Colors.DisabledText;
|
||||
using (var b = new SolidBrush(textColor))
|
||||
{
|
||||
var textRect = new Rectangle(tabRect.Left + 5 + xOffset, tabRect.Top, tabRect.Width - tab.CloseButtonRectangle.Width - 7 - 5 - xOffset, tabRect.Height);
|
||||
g.DrawString(tab.DockContent.DockText, Font, b, textRect, tabTextFormat);
|
||||
}
|
||||
|
||||
// Close button
|
||||
var img = tab.CloseButtonHot ? DockIcons.inactive_close_selected : DockIcons.inactive_close;
|
||||
|
||||
if (isVisibleTab)
|
||||
{
|
||||
if (isActiveGroup)
|
||||
img = tab.CloseButtonHot ? DockIcons.close_selected : DockIcons.close;
|
||||
else
|
||||
img = tab.CloseButtonHot ? DockIcons.close_selected : DockIcons.active_inactive_close;
|
||||
}
|
||||
|
||||
var closeRect = RectangleToTabArea(tab.CloseButtonRectangle);
|
||||
g.DrawImageUnscaled(img, closeRect.Left, closeRect.Top);
|
||||
}
|
||||
|
||||
private void PaintToolWindowTab(Graphics g, DarkDockTab tab)
|
||||
{
|
||||
var tabRect = tab.ClientRectangle;
|
||||
|
||||
var isVisibleTab = VisibleContent == tab.DockContent;
|
||||
|
||||
var bgColor = isVisibleTab ? Colors.GreyBackground : Colors.DarkBackground;
|
||||
|
||||
if (tab.Hot && !isVisibleTab)
|
||||
bgColor = Colors.MediumBackground;
|
||||
|
||||
using (var b = new SolidBrush(bgColor))
|
||||
{
|
||||
g.FillRectangle(b, tabRect);
|
||||
}
|
||||
|
||||
// Draw separators
|
||||
if (tab.ShowSeparator)
|
||||
{
|
||||
using (var p = new Pen(Colors.DarkBorder))
|
||||
{
|
||||
g.DrawLine(p, tabRect.Right - 1, tabRect.Top, tabRect.Right - 1, tabRect.Bottom);
|
||||
}
|
||||
}
|
||||
|
||||
var tabTextFormat = new StringFormat
|
||||
{
|
||||
Alignment = StringAlignment.Near,
|
||||
LineAlignment = StringAlignment.Center,
|
||||
FormatFlags = StringFormatFlags.NoWrap,
|
||||
Trimming = StringTrimming.EllipsisCharacter
|
||||
};
|
||||
|
||||
var textColor = isVisibleTab ? Colors.BlueHighlight : Colors.DisabledText;
|
||||
using (var b = new SolidBrush(textColor))
|
||||
{
|
||||
var textRect = new Rectangle(tabRect.Left + 5, tabRect.Top, tabRect.Width - 5, tabRect.Height);
|
||||
g.DrawString(tab.DockContent.DockText, Font, b, textRect, tabTextFormat);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,8 +29,8 @@ namespace DarkUI.Docking
|
||||
ActiveGroup = _activeContent.DockGroup;
|
||||
ActiveRegion = ActiveGroup.DockRegion;
|
||||
|
||||
foreach (var content in _contents)
|
||||
content.Invalidate();
|
||||
foreach (var region in _regions.Values)
|
||||
region.Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -182,10 +182,10 @@ namespace DarkUI.Docking
|
||||
return;
|
||||
case DarkDockArea.Left:
|
||||
case DarkDockArea.Right:
|
||||
size = new Size(Width, Height / _groups.Count);
|
||||
size = new Size(ClientRectangle.Width, ClientRectangle.Height / _groups.Count);
|
||||
break;
|
||||
case DarkDockArea.Bottom:
|
||||
size = new Size(Width / _groups.Count, Height);
|
||||
size = new Size(ClientRectangle.Width / _groups.Count, ClientRectangle.Height);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -276,6 +276,14 @@ namespace DarkUI.Docking
|
||||
|
||||
#region Paint Region
|
||||
|
||||
public void Redraw()
|
||||
{
|
||||
Invalidate();
|
||||
|
||||
foreach (var group in _groups)
|
||||
group.Redraw();
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
var g = e.Graphics;
|
||||
@ -298,11 +306,11 @@ namespace DarkUI.Docking
|
||||
|
||||
// Left border
|
||||
if (DockArea == DarkDockArea.Right)
|
||||
g.DrawLine(p, ClientRectangle.Left, 0, ClientRectangle.Left, Height);
|
||||
g.DrawLine(p, ClientRectangle.Left, 0, ClientRectangle.Left, ClientRectangle.Height);
|
||||
|
||||
// Right border
|
||||
if (DockArea == DarkDockArea.Left)
|
||||
g.DrawLine(p, ClientRectangle.Right - 1, 0, ClientRectangle.Right - 1, Height);
|
||||
g.DrawLine(p, ClientRectangle.Right - 1, 0, ClientRectangle.Right - 1, ClientRectangle.Height);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,9 @@ namespace DarkUI.Docking
|
||||
|
||||
public DarkDockArea DockArea { get; private set; }
|
||||
|
||||
public Rectangle Area { get; set; }
|
||||
public Rectangle ClientRectangle { get; set; }
|
||||
|
||||
public Rectangle DropdownRectangle { get; set; }
|
||||
|
||||
public int Offset { get; set; }
|
||||
|
||||
|
123
DarkUI/Icons/DockIcons.Designer.cs
generated
Normal file
123
DarkUI/Icons/DockIcons.Designer.cs
generated
Normal file
@ -0,0 +1,123 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DarkUI {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class DockIcons {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal DockIcons() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DarkUI.Icons.DockIcons", typeof(DockIcons).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap active_inactive_close {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("active_inactive_close", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap arrow {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("arrow", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap close {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("close", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap close_selected {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("close_selected", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap inactive_close {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("inactive_close", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap inactive_close_selected {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("inactive_close_selected", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
139
DarkUI/Icons/DockIcons.resx
Normal file
139
DarkUI/Icons/DockIcons.resx
Normal file
@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="active_inactive_close" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\active-inactive-close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\arrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="close" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="close_selected" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\close-selected.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="inactive_close" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\inactive-close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="inactive_close_selected" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\inactive-close-selected.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
DarkUI/Resources/active-inactive-close.png
Normal file
BIN
DarkUI/Resources/active-inactive-close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
DarkUI/Resources/arrow.png
Normal file
BIN
DarkUI/Resources/arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
DarkUI/Resources/close-selected.png
Normal file
BIN
DarkUI/Resources/close-selected.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
DarkUI/Resources/close.png
Normal file
BIN
DarkUI/Resources/close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
DarkUI/Resources/inactive-close-selected.png
Normal file
BIN
DarkUI/Resources/inactive-close-selected.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
DarkUI/Resources/inactive-close.png
Normal file
BIN
DarkUI/Resources/inactive-close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Loading…
x
Reference in New Issue
Block a user