mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-06-30 22:29:29 +03:00
Added DockPanel basics & updated example
Re-adding content currently broken. Need to add tabs too.
This commit is contained in:
parent
9227a0a367
commit
5a57b1011c
@ -7,5 +7,9 @@
|
||||
public static int ScrollBarSize = 15;
|
||||
public static int ArrowButtonSize = 15;
|
||||
public static int MinimumThumbSize = 11;
|
||||
|
||||
public const int ToolWindowHeaderSize = 25;
|
||||
public const int DocumentTabAreaSize = 24;
|
||||
public const int ToolWindowTabAreaSize = 21;
|
||||
}
|
||||
}
|
||||
|
@ -44,4 +44,13 @@
|
||||
Warning,
|
||||
Error
|
||||
}
|
||||
|
||||
public enum DarkDockArea
|
||||
{
|
||||
None,
|
||||
Document,
|
||||
Left,
|
||||
Right,
|
||||
Bottom
|
||||
}
|
||||
}
|
||||
|
@ -91,9 +91,21 @@
|
||||
<Compile Include="Docking\DarkDockContent.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Docking\DarkDockGroup.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Docking\DarkDockPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Docking\DarkDockRegion.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Docking\DarkDocument.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Docking\DarkToolWindow.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Extensions\BitmapExtensions.cs" />
|
||||
<Compile Include="Forms\DarkDialog.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DarkUI
|
||||
@ -6,20 +7,17 @@ namespace DarkUI
|
||||
[ToolboxItem(false)]
|
||||
public class DarkDockContent : UserControl
|
||||
{
|
||||
#region Event Region
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Field Region
|
||||
|
||||
private string _dockText;
|
||||
private Image _icon;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property Region
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("Determines the text that will appear in the content tabs and headers.")]
|
||||
public string DockText
|
||||
{
|
||||
get { return _dockText; }
|
||||
@ -27,10 +25,60 @@ namespace DarkUI
|
||||
{
|
||||
_dockText = value;
|
||||
Invalidate();
|
||||
// TODO: raise event for parent tabs
|
||||
// TODO: raise event for re-sizing parent tabs
|
||||
}
|
||||
}
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("Determines the icon that will appear in the content tabs and headers.")]
|
||||
public Image Icon
|
||||
{
|
||||
get { return _icon; }
|
||||
set
|
||||
{
|
||||
_icon = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
[Category("Layout")]
|
||||
[Description("Determines which area of the dock panel this content will dock to.")]
|
||||
[DefaultValue(DarkDockArea.None)]
|
||||
public DarkDockArea DockArea { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public DarkDockPanel DockPanel { get; internal set; }
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public DarkDockRegion DockRegion { get; internal set; }
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public DarkDockGroup DockGroup { get; internal set; }
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public bool IsActive { get; internal set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor Region
|
||||
|
||||
public DarkDockContent()
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method Region
|
||||
|
||||
public virtual void Close()
|
||||
{
|
||||
if (DockPanel != null)
|
||||
DockPanel.RemoveContent(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
69
DarkUI/Docking/DarkDockGroup.cs
Normal file
69
DarkUI/Docking/DarkDockGroup.cs
Normal file
@ -0,0 +1,69 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DarkUI
|
||||
{
|
||||
[ToolboxItem(false)]
|
||||
public class DarkDockGroup : Panel
|
||||
{
|
||||
#region Field Region
|
||||
|
||||
private List<DarkDockContent> _contents;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property Region
|
||||
|
||||
public DarkDockPanel DockPanel { get; private set; }
|
||||
|
||||
public DarkDockRegion DockRegion { get; private set; }
|
||||
|
||||
public DarkDockArea DockArea { get; private set; }
|
||||
|
||||
public int ContentCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return _contents.Count;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor Region
|
||||
|
||||
public DarkDockGroup(DarkDockPanel dockPanel, DarkDockRegion dockRegion)
|
||||
{
|
||||
_contents = new List<DarkDockContent>();
|
||||
|
||||
DockPanel = dockPanel;
|
||||
DockRegion = dockRegion;
|
||||
DockArea = dockRegion.DockArea;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method Region
|
||||
|
||||
public void AddContent(DarkDockContent dockContent)
|
||||
{
|
||||
dockContent.DockGroup = this;
|
||||
dockContent.Dock = DockStyle.Fill;
|
||||
|
||||
_contents.Add(dockContent);
|
||||
Controls.Add(dockContent);
|
||||
}
|
||||
|
||||
public void RemoveContent(DarkDockContent dockContent)
|
||||
{
|
||||
dockContent.DockGroup = null;
|
||||
|
||||
_contents.Remove(dockContent);
|
||||
Controls.Remove(dockContent);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,9 +1,17 @@
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DarkUI
|
||||
{
|
||||
public class DarkDockPanel : UserControl
|
||||
{
|
||||
#region Field Region
|
||||
|
||||
private List<DarkDockContent> _contents;
|
||||
private Dictionary<DarkDockArea, DarkDockRegion> _regions;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property Region
|
||||
|
||||
public IMessageFilter MessageFilter { get; private set; }
|
||||
@ -16,7 +24,71 @@ namespace DarkUI
|
||||
{
|
||||
MessageFilter = new DarkDockResizeFilter(this);
|
||||
|
||||
_regions = new Dictionary<DarkDockArea, DarkDockRegion>();
|
||||
_contents = new List<DarkDockContent>();
|
||||
|
||||
BackColor = Colors.GreyBackground;
|
||||
|
||||
CreateRegions();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method Region
|
||||
|
||||
public void AddContent(DarkDockContent dockContent)
|
||||
{
|
||||
if (_contents.Contains(dockContent))
|
||||
return;
|
||||
|
||||
if (dockContent.DockArea == DarkDockArea.None)
|
||||
return;
|
||||
|
||||
dockContent.DockPanel = this;
|
||||
_contents.Add(dockContent);
|
||||
|
||||
var region = _regions[dockContent.DockArea];
|
||||
region.AddContent(dockContent);
|
||||
}
|
||||
|
||||
public void RemoveContent(DarkDockContent dockContent)
|
||||
{
|
||||
if (!_contents.Contains(dockContent))
|
||||
return;
|
||||
|
||||
dockContent.DockPanel = null;
|
||||
_contents.Remove(dockContent);
|
||||
|
||||
var region = _regions[dockContent.DockArea];
|
||||
region.RemoveContent(dockContent);
|
||||
}
|
||||
|
||||
private void CreateRegions()
|
||||
{
|
||||
var documentRegion = new DarkDockRegion(this, DarkDockArea.Document);
|
||||
_regions.Add(DarkDockArea.Document, documentRegion);
|
||||
|
||||
var leftRegion = new DarkDockRegion(this, DarkDockArea.Left);
|
||||
_regions.Add(DarkDockArea.Left, leftRegion);
|
||||
|
||||
var rightRegion = new DarkDockRegion(this, DarkDockArea.Right);
|
||||
_regions.Add(DarkDockArea.Right, rightRegion);
|
||||
|
||||
var bottomRegion = new DarkDockRegion(this, DarkDockArea.Bottom);
|
||||
_regions.Add(DarkDockArea.Bottom, bottomRegion);
|
||||
|
||||
// Add the regions in this order to force the bottom region to be positioned
|
||||
// between the left and right regions properly.
|
||||
Controls.Add(documentRegion);
|
||||
Controls.Add(bottomRegion);
|
||||
Controls.Add(leftRegion);
|
||||
Controls.Add(rightRegion);
|
||||
|
||||
// Create tab index for intuitive tabbing order
|
||||
documentRegion.TabIndex = 0;
|
||||
rightRegion.TabIndex = 1;
|
||||
bottomRegion.TabIndex = 2;
|
||||
leftRegion.TabIndex = 3;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
185
DarkUI/Docking/DarkDockRegion.cs
Normal file
185
DarkUI/Docking/DarkDockRegion.cs
Normal file
@ -0,0 +1,185 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DarkUI
|
||||
{
|
||||
[ToolboxItem(false)]
|
||||
public class DarkDockRegion : Panel
|
||||
{
|
||||
#region Field Region
|
||||
|
||||
private List<DarkDockGroup> _groups;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property Region
|
||||
|
||||
public DarkDockPanel DockPanel { get; private set; }
|
||||
|
||||
public DarkDockArea DockArea { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor Region
|
||||
|
||||
public DarkDockRegion(DarkDockPanel dockPanel, DarkDockArea dockArea)
|
||||
{
|
||||
_groups = new List<DarkDockGroup>();
|
||||
|
||||
DockPanel = dockPanel;
|
||||
DockArea = dockArea;
|
||||
|
||||
BuildProperties();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method Region
|
||||
|
||||
public void AddContent(DarkDockContent dockContent)
|
||||
{
|
||||
AddContent(dockContent, null);
|
||||
}
|
||||
|
||||
public void AddContent(DarkDockContent dockContent, DarkDockGroup dockGroup)
|
||||
{
|
||||
// If no existing group is specified then create a new one
|
||||
if (dockGroup == null)
|
||||
{
|
||||
// If this is the document region, then default to first group if it exists
|
||||
if (DockArea == DarkDockArea.Document && _groups.Count > 0)
|
||||
dockGroup = _groups[0];
|
||||
else
|
||||
dockGroup = CreateGroup();
|
||||
}
|
||||
|
||||
dockContent.DockRegion = this;
|
||||
dockGroup.AddContent(dockContent);
|
||||
|
||||
// Show the region if it was previously hidden
|
||||
if (!Visible)
|
||||
Visible = true;
|
||||
}
|
||||
|
||||
public void RemoveContent(DarkDockContent dockContent)
|
||||
{
|
||||
dockContent.DockRegion = null;
|
||||
|
||||
var group = dockContent.DockGroup;
|
||||
group.RemoveContent(dockContent);
|
||||
|
||||
// If that was the final content in the group then remove the group
|
||||
if (group.ContentCount == 0)
|
||||
{
|
||||
_groups.Remove(group);
|
||||
PositionGroups();
|
||||
}
|
||||
|
||||
// Check if we have any groups left. If not then hide the region
|
||||
if (_groups.Count == 0)
|
||||
Visible = false;
|
||||
}
|
||||
|
||||
private DarkDockGroup CreateGroup()
|
||||
{
|
||||
var newGroup = new DarkDockGroup(DockPanel, this);
|
||||
_groups.Add(newGroup);
|
||||
Controls.Add(newGroup);
|
||||
|
||||
PositionGroups();
|
||||
|
||||
return newGroup;
|
||||
}
|
||||
|
||||
private void PositionGroups()
|
||||
{
|
||||
DockStyle dockStyle;
|
||||
|
||||
switch (DockArea)
|
||||
{
|
||||
default:
|
||||
case DarkDockArea.Document:
|
||||
dockStyle = DockStyle.Fill;
|
||||
break;
|
||||
case DarkDockArea.Left:
|
||||
case DarkDockArea.Right:
|
||||
dockStyle = DockStyle.Top;
|
||||
break;
|
||||
case DarkDockArea.Bottom:
|
||||
dockStyle = DockStyle.Left;
|
||||
break;
|
||||
}
|
||||
|
||||
if (_groups.Count == 1)
|
||||
_groups[0].Dock = DockStyle.Fill;
|
||||
else if (_groups.Count > 1)
|
||||
foreach (var group in _groups)
|
||||
group.Dock = dockStyle;
|
||||
}
|
||||
|
||||
private void BuildProperties()
|
||||
{
|
||||
switch (DockArea)
|
||||
{
|
||||
default:
|
||||
case DarkDockArea.Document:
|
||||
Dock = DockStyle.Fill;
|
||||
Padding = new Padding(0, 1, 0, 0);
|
||||
break;
|
||||
case DarkDockArea.Left:
|
||||
Dock = DockStyle.Left;
|
||||
Padding = new Padding(0, 0, 1, 0);
|
||||
Visible = false;
|
||||
break;
|
||||
case DarkDockArea.Right:
|
||||
Dock = DockStyle.Right;
|
||||
Padding = new Padding(1, 0, 0, 0);
|
||||
Visible = false;
|
||||
break;
|
||||
case DarkDockArea.Bottom:
|
||||
Dock = DockStyle.Bottom;
|
||||
Padding = new Padding(0, 0, 0, 0);
|
||||
Visible = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Paint Region
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
var g = e.Graphics;
|
||||
|
||||
if (!Visible)
|
||||
return;
|
||||
|
||||
// Fill body
|
||||
using (var b = new SolidBrush(Colors.GreyBackground))
|
||||
{
|
||||
g.FillRectangle(b, ClientRectangle);
|
||||
}
|
||||
|
||||
// Draw border
|
||||
using (var p = new Pen(Colors.DarkBorder))
|
||||
{
|
||||
// Top border
|
||||
if (DockArea == DarkDockArea.Document)
|
||||
g.DrawLine(p, ClientRectangle.Left, 0, ClientRectangle.Right, 0);
|
||||
|
||||
// Left border
|
||||
if (DockArea == DarkDockArea.Right)
|
||||
g.DrawLine(p, ClientRectangle.Left, 0, ClientRectangle.Left, Height);
|
||||
|
||||
// Right border
|
||||
if (DockArea == DarkDockArea.Left)
|
||||
g.DrawLine(p, ClientRectangle.Right - 1, 0, ClientRectangle.Right - 1, Height);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
29
DarkUI/Docking/DarkDocument.cs
Normal file
29
DarkUI/Docking/DarkDocument.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace DarkUI
|
||||
{
|
||||
[ToolboxItem(false)]
|
||||
public class DarkDocument : DarkDockContent
|
||||
{
|
||||
#region Property Region
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public new DarkDockArea DockArea
|
||||
{
|
||||
get { return base.DockArea; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor Region
|
||||
|
||||
public DarkDocument()
|
||||
{
|
||||
BackColor = Colors.GreyBackground;
|
||||
base.DockArea = DarkDockArea.Document;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
100
DarkUI/Docking/DarkToolWindow.cs
Normal file
100
DarkUI/Docking/DarkToolWindow.cs
Normal file
@ -0,0 +1,100 @@
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DarkUI
|
||||
{
|
||||
[ToolboxItem(false)]
|
||||
public class DarkToolWindow : DarkDockContent
|
||||
{
|
||||
#region Property Region
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public new Padding Padding
|
||||
{
|
||||
get { return base.Padding; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor Region
|
||||
|
||||
public DarkToolWindow()
|
||||
{
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer |
|
||||
ControlStyles.ResizeRedraw |
|
||||
ControlStyles.UserPaint, true);
|
||||
|
||||
BackColor = Colors.GreyBackground;
|
||||
base.Padding = new Padding(0, Consts.ToolWindowHeaderSize, 0, 0);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Paint Region
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
var g = e.Graphics;
|
||||
|
||||
// Fill body
|
||||
using (var b = new SolidBrush(Colors.GreyBackground))
|
||||
{
|
||||
g.FillRectangle(b, ClientRectangle);
|
||||
}
|
||||
|
||||
// Draw header
|
||||
var bgColor = IsActive ? Colors.BlueBackground : Colors.HeaderBackground;
|
||||
var darkColor = IsActive ? Colors.DarkBlueBorder : Colors.DarkBorder;
|
||||
var lightColor = IsActive ? Colors.LightBlueBorder : Colors.LightBorder;
|
||||
|
||||
using (var b = new SolidBrush(bgColor))
|
||||
{
|
||||
var bgRect = new Rectangle(0, 0, ClientRectangle.Width, Consts.ToolWindowHeaderSize);
|
||||
g.FillRectangle(b, bgRect);
|
||||
}
|
||||
|
||||
using (var p = new Pen(darkColor))
|
||||
{
|
||||
g.DrawLine(p, ClientRectangle.Left, 0, ClientRectangle.Right, 0);
|
||||
g.DrawLine(p, ClientRectangle.Left, Consts.ToolWindowHeaderSize - 1, ClientRectangle.Right, Consts.ToolWindowHeaderSize - 1);
|
||||
}
|
||||
|
||||
using (var p = new Pen(lightColor))
|
||||
{
|
||||
g.DrawLine(p, ClientRectangle.Left, 1, ClientRectangle.Right, 1);
|
||||
}
|
||||
|
||||
var xOffset = 2;
|
||||
|
||||
if (Icon != null)
|
||||
{
|
||||
g.DrawImageUnscaled(Icon, ClientRectangle.Left + 5, ClientRectangle.Top + (Consts.ToolWindowHeaderSize / 2) - (Icon.Height / 2) + 1);
|
||||
xOffset = Icon.Width + 8;
|
||||
}
|
||||
|
||||
using (var b = new SolidBrush(Colors.LightText))
|
||||
{
|
||||
var textRect = new Rectangle(xOffset, 0, ClientRectangle.Width - 4 - xOffset, Consts.ToolWindowHeaderSize);
|
||||
|
||||
var format = new StringFormat
|
||||
{
|
||||
Alignment = StringAlignment.Near,
|
||||
LineAlignment = StringAlignment.Center,
|
||||
FormatFlags = StringFormatFlags.NoWrap,
|
||||
Trimming = StringTrimming.EllipsisCharacter
|
||||
};
|
||||
|
||||
g.DrawString(DockText, Font, b, textRect, format);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPaintBackground(PaintEventArgs e)
|
||||
{
|
||||
// Absorb event
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -41,18 +41,42 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Forms\DialogAbout.cs">
|
||||
<Compile Include="Forms\Dialogs\DialogAbout.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\DialogAbout.Designer.cs">
|
||||
<Compile Include="Forms\Dialogs\DialogAbout.Designer.cs">
|
||||
<DependentUpon>DialogAbout.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\DialogTest.cs">
|
||||
<Compile Include="Forms\Dialogs\DialogTest.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\DialogTest.Designer.cs">
|
||||
<Compile Include="Forms\Dialogs\DialogTest.Designer.cs">
|
||||
<DependentUpon>DialogTest.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Docking\DockDocument.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Docking\DockDocument.Designer.cs">
|
||||
<DependentUpon>DockDocument.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Docking\DockConsole.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Docking\DockConsole.Designer.cs">
|
||||
<DependentUpon>DockConsole.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Docking\DockProperties.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Docking\DockProperties.Designer.cs">
|
||||
<DependentUpon>DockProperties.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Docking\DockProject.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Docking\DockProject.Designer.cs">
|
||||
<DependentUpon>DockProject.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -66,12 +90,24 @@
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Forms\DialogAbout.resx">
|
||||
<EmbeddedResource Include="Forms\Dialogs\DialogAbout.resx">
|
||||
<DependentUpon>DialogAbout.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\DialogTest.resx">
|
||||
<EmbeddedResource Include="Forms\Dialogs\DialogTest.resx">
|
||||
<DependentUpon>DialogTest.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Docking\DockDocument.resx">
|
||||
<DependentUpon>DockDocument.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Docking\DockConsole.resx">
|
||||
<DependentUpon>DockConsole.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Docking\DockProperties.resx">
|
||||
<DependentUpon>DockProperties.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Docking\DockProject.resx">
|
||||
<DependentUpon>DockProject.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@ -126,6 +162,15 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\StatusAnnotations_Information_16xLG_color.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\properties_16xLG.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\application_16x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Console.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.
|
||||
|
@ -49,7 +49,7 @@
|
||||
this.pnlMain.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnlMain.Name = "pnlMain";
|
||||
this.pnlMain.Padding = new System.Windows.Forms.Padding(15, 15, 15, 5);
|
||||
this.pnlMain.Size = new System.Drawing.Size(343, 272);
|
||||
this.pnlMain.Size = new System.Drawing.Size(343, 229);
|
||||
this.pnlMain.TabIndex = 2;
|
||||
//
|
||||
// lblVersion
|
||||
@ -59,10 +59,10 @@
|
||||
this.lblVersion.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.lblVersion.Location = new System.Drawing.Point(15, 192);
|
||||
this.lblVersion.Name = "lblVersion";
|
||||
this.lblVersion.Size = new System.Drawing.Size(313, 77);
|
||||
this.lblVersion.Size = new System.Drawing.Size(313, 36);
|
||||
this.lblVersion.TabIndex = 7;
|
||||
this.lblVersion.Text = "Version: [version]";
|
||||
this.lblVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.lblVersion.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
//
|
||||
// darkLabel3
|
||||
//
|
||||
@ -119,7 +119,7 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(343, 317);
|
||||
this.ClientSize = new System.Drawing.Size(343, 274);
|
||||
this.Controls.Add(this.pnlMain);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
49
Example/Forms/Docking/DockConsole.Designer.cs
generated
Normal file
49
Example/Forms/Docking/DockConsole.Designer.cs
generated
Normal file
@ -0,0 +1,49 @@
|
||||
namespace Example
|
||||
{
|
||||
partial class DockConsole
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// DockConsole
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.DockArea = DarkUI.DarkDockArea.Bottom;
|
||||
this.DockText = "Console";
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Icon = global::Example.Icons.Console;
|
||||
this.Name = "DockConsole";
|
||||
this.Size = new System.Drawing.Size(500, 200);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
16
Example/Forms/Docking/DockConsole.cs
Normal file
16
Example/Forms/Docking/DockConsole.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using DarkUI;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public partial class DockConsole : DarkToolWindow
|
||||
{
|
||||
#region Constructor Region
|
||||
|
||||
public DockConsole()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
120
Example/Forms/Docking/DockConsole.resx
Normal file
120
Example/Forms/Docking/DockConsole.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
64
Example/Forms/Docking/DockDocument.Designer.cs
generated
Normal file
64
Example/Forms/Docking/DockDocument.Designer.cs
generated
Normal file
@ -0,0 +1,64 @@
|
||||
namespace Example
|
||||
{
|
||||
partial class DockDocument
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.txtDocument = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtDocument
|
||||
//
|
||||
this.txtDocument.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(43)))), ((int)(((byte)(43)))));
|
||||
this.txtDocument.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.txtDocument.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.txtDocument.ForeColor = System.Drawing.Color.Gainsboro;
|
||||
this.txtDocument.Location = new System.Drawing.Point(0, 0);
|
||||
this.txtDocument.Multiline = true;
|
||||
this.txtDocument.Name = "txtDocument";
|
||||
this.txtDocument.Size = new System.Drawing.Size(175, 173);
|
||||
this.txtDocument.TabIndex = 1;
|
||||
this.txtDocument.Text = "This is some example text";
|
||||
//
|
||||
// DockDocument
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.txtDocument);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Name = "DockDocument";
|
||||
this.Size = new System.Drawing.Size(175, 173);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox txtDocument;
|
||||
}
|
||||
}
|
33
Example/Forms/Docking/DockDocument.cs
Normal file
33
Example/Forms/Docking/DockDocument.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using DarkUI;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public partial class DockDocument : DarkDocument
|
||||
{
|
||||
#region Constructor Region
|
||||
|
||||
public DockDocument()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Workaround to stop the textbox from highlight all text.
|
||||
txtDocument.SelectionStart = txtDocument.Text.Length;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Event Handler Region
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
var result = DarkMessageBox.ShowWarning(@"You will lose any unsaved changes. Continue?", @"Close document", DarkDialogButton.YesNo);
|
||||
if (result == DialogResult.No)
|
||||
return;
|
||||
|
||||
base.Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
120
Example/Forms/Docking/DockDocument.resx
Normal file
120
Example/Forms/Docking/DockDocument.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
49
Example/Forms/Docking/DockProject.Designer.cs
generated
Normal file
49
Example/Forms/Docking/DockProject.Designer.cs
generated
Normal file
@ -0,0 +1,49 @@
|
||||
namespace Example
|
||||
{
|
||||
partial class DockProject
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// DockProject
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.DockArea = DarkUI.DarkDockArea.Left;
|
||||
this.DockText = "Project Explorer";
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Icon = global::Example.Icons.application_16x;
|
||||
this.Name = "DockProject";
|
||||
this.Size = new System.Drawing.Size(280, 450);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
16
Example/Forms/Docking/DockProject.cs
Normal file
16
Example/Forms/Docking/DockProject.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using DarkUI;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public partial class DockProject : DarkToolWindow
|
||||
{
|
||||
#region Constructor Region
|
||||
|
||||
public DockProject()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
120
Example/Forms/Docking/DockProject.resx
Normal file
120
Example/Forms/Docking/DockProject.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
49
Example/Forms/Docking/DockProperties.Designer.cs
generated
Normal file
49
Example/Forms/Docking/DockProperties.Designer.cs
generated
Normal file
@ -0,0 +1,49 @@
|
||||
namespace Example
|
||||
{
|
||||
partial class DockProperties
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// DockProperties
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.DockArea = DarkUI.DarkDockArea.Right;
|
||||
this.DockText = "Properties";
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Icon = global::Example.Icons.properties_16xLG;
|
||||
this.Name = "DockProperties";
|
||||
this.Size = new System.Drawing.Size(280, 450);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
16
Example/Forms/Docking/DockProperties.cs
Normal file
16
Example/Forms/Docking/DockProperties.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using DarkUI;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public partial class DockProperties : DarkToolWindow
|
||||
{
|
||||
#region Constructor Region
|
||||
|
||||
public DockProperties()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
120
Example/Forms/Docking/DockProperties.resx
Normal file
120
Example/Forms/Docking/DockProperties.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
125
Example/Forms/MainForm.Designer.cs
generated
125
Example/Forms/MainForm.Designer.cs
generated
@ -31,22 +31,25 @@
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
this.mnuMain = new DarkUI.DarkMenuStrip();
|
||||
this.mnuFile = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuNewFile = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mnuClose = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuView = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuDialog = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuTools = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuWindow = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuHelp = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuAbout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolMain = new DarkUI.DarkToolStrip();
|
||||
this.btnNewFile = new System.Windows.Forms.ToolStripButton();
|
||||
this.stripMain = new DarkUI.DarkStatusStrip();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabel6 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabel5 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.DockPanel = new DarkUI.DarkDockPanel();
|
||||
this.btnNewFile = new System.Windows.Forms.ToolStripButton();
|
||||
this.mnuNewFile = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuAbout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuProject = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuProperties = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuConsole = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuMain.SuspendLayout();
|
||||
this.toolMain.SuspendLayout();
|
||||
this.stripMain.SuspendLayout();
|
||||
@ -74,12 +77,37 @@
|
||||
this.mnuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuNewFile,
|
||||
this.toolStripSeparator1,
|
||||
this.closeToolStripMenuItem});
|
||||
this.mnuClose});
|
||||
this.mnuFile.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.mnuFile.Name = "mnuFile";
|
||||
this.mnuFile.Size = new System.Drawing.Size(37, 20);
|
||||
this.mnuFile.Text = "&File";
|
||||
//
|
||||
// mnuNewFile
|
||||
//
|
||||
this.mnuNewFile.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.mnuNewFile.Image = global::Example.Icons.NewFile_6276;
|
||||
this.mnuNewFile.Name = "mnuNewFile";
|
||||
this.mnuNewFile.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
||||
this.mnuNewFile.Size = new System.Drawing.Size(160, 22);
|
||||
this.mnuNewFile.Text = "&New file";
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.toolStripSeparator1.Margin = new System.Windows.Forms.Padding(0, 0, 0, 1);
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(157, 6);
|
||||
//
|
||||
// mnuClose
|
||||
//
|
||||
this.mnuClose.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.mnuClose.Image = global::Example.Icons.Close_16xLG;
|
||||
this.mnuClose.Name = "mnuClose";
|
||||
this.mnuClose.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
|
||||
this.mnuClose.Size = new System.Drawing.Size(160, 22);
|
||||
this.mnuClose.Text = "&Close";
|
||||
//
|
||||
// mnuView
|
||||
//
|
||||
this.mnuView.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@ -92,8 +120,9 @@
|
||||
// mnuDialog
|
||||
//
|
||||
this.mnuDialog.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.mnuDialog.Image = global::Example.Icons.properties_16xLG;
|
||||
this.mnuDialog.Name = "mnuDialog";
|
||||
this.mnuDialog.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuDialog.Size = new System.Drawing.Size(130, 22);
|
||||
this.mnuDialog.Text = "&Dialog test";
|
||||
//
|
||||
// mnuTools
|
||||
@ -105,6 +134,10 @@
|
||||
//
|
||||
// mnuWindow
|
||||
//
|
||||
this.mnuWindow.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuProject,
|
||||
this.mnuProperties,
|
||||
this.mnuConsole});
|
||||
this.mnuWindow.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.mnuWindow.Name = "mnuWindow";
|
||||
this.mnuWindow.Size = new System.Drawing.Size(63, 20);
|
||||
@ -119,6 +152,14 @@
|
||||
this.mnuHelp.Size = new System.Drawing.Size(44, 20);
|
||||
this.mnuHelp.Text = "&Help";
|
||||
//
|
||||
// mnuAbout
|
||||
//
|
||||
this.mnuAbout.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.mnuAbout.Image = global::Example.Icons.StatusAnnotations_Information_16xLG_color;
|
||||
this.mnuAbout.Name = "mnuAbout";
|
||||
this.mnuAbout.Size = new System.Drawing.Size(145, 22);
|
||||
this.mnuAbout.Text = "&About DarkUI";
|
||||
//
|
||||
// toolMain
|
||||
//
|
||||
this.toolMain.AutoSize = false;
|
||||
@ -134,6 +175,17 @@
|
||||
this.toolMain.TabIndex = 1;
|
||||
this.toolMain.Text = "darkToolStrip1";
|
||||
//
|
||||
// btnNewFile
|
||||
//
|
||||
this.btnNewFile.AutoSize = false;
|
||||
this.btnNewFile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnNewFile.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.btnNewFile.Image = global::Example.Icons.NewFile_6276;
|
||||
this.btnNewFile.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnNewFile.Name = "btnNewFile";
|
||||
this.btnNewFile.Size = new System.Drawing.Size(24, 24);
|
||||
this.btnNewFile.Text = "New file";
|
||||
//
|
||||
// stripMain
|
||||
//
|
||||
this.stripMain.AutoSize = false;
|
||||
@ -176,13 +228,6 @@
|
||||
this.toolStripStatusLabel5.Text = "120 MB";
|
||||
this.toolStripStatusLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.toolStripSeparator1.Margin = new System.Windows.Forms.Padding(0, 0, 0, 1);
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// DockPanel
|
||||
//
|
||||
this.DockPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65)))));
|
||||
@ -192,40 +237,29 @@
|
||||
this.DockPanel.Size = new System.Drawing.Size(784, 486);
|
||||
this.DockPanel.TabIndex = 3;
|
||||
//
|
||||
// btnNewFile
|
||||
// mnuProject
|
||||
//
|
||||
this.btnNewFile.AutoSize = false;
|
||||
this.btnNewFile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnNewFile.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.btnNewFile.Image = global::Example.Icons.NewFile_6276;
|
||||
this.btnNewFile.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnNewFile.Name = "btnNewFile";
|
||||
this.btnNewFile.Size = new System.Drawing.Size(24, 24);
|
||||
this.btnNewFile.Text = "New file";
|
||||
this.mnuProject.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.mnuProject.Image = global::Example.Icons.application_16x;
|
||||
this.mnuProject.Name = "mnuProject";
|
||||
this.mnuProject.Size = new System.Drawing.Size(156, 22);
|
||||
this.mnuProject.Text = "&Project Explorer";
|
||||
//
|
||||
// mnuNewFile
|
||||
// mnuProperties
|
||||
//
|
||||
this.mnuNewFile.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.mnuNewFile.Image = global::Example.Icons.NewFile_6276;
|
||||
this.mnuNewFile.Name = "mnuNewFile";
|
||||
this.mnuNewFile.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuNewFile.Text = "&New file";
|
||||
this.mnuProperties.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.mnuProperties.Image = global::Example.Icons.properties_16xLG;
|
||||
this.mnuProperties.Name = "mnuProperties";
|
||||
this.mnuProperties.Size = new System.Drawing.Size(156, 22);
|
||||
this.mnuProperties.Text = "P&roperties";
|
||||
//
|
||||
// closeToolStripMenuItem
|
||||
// mnuConsole
|
||||
//
|
||||
this.closeToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.closeToolStripMenuItem.Image = global::Example.Icons.Close_16xLG;
|
||||
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
|
||||
this.closeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.closeToolStripMenuItem.Text = "&Close";
|
||||
//
|
||||
// mnuAbout
|
||||
//
|
||||
this.mnuAbout.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.mnuAbout.Image = global::Example.Icons.StatusAnnotations_Information_16xLG_color;
|
||||
this.mnuAbout.Name = "mnuAbout";
|
||||
this.mnuAbout.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuAbout.Text = "&About DarkUI";
|
||||
this.mnuConsole.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.mnuConsole.Image = global::Example.Icons.Console;
|
||||
this.mnuConsole.Name = "mnuConsole";
|
||||
this.mnuConsole.Size = new System.Drawing.Size(156, 22);
|
||||
this.mnuConsole.Text = "&Console";
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
@ -265,7 +299,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuFile;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuView;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuDialog;
|
||||
private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuClose;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuTools;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuWindow;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuHelp;
|
||||
@ -274,6 +308,9 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuNewFile;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private DarkUI.DarkDockPanel DockPanel;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuProject;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuProperties;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuConsole;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,19 @@
|
||||
using DarkUI;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public partial class MainForm : DarkForm
|
||||
{
|
||||
#region Field Region
|
||||
|
||||
private DockProject _dockProject;
|
||||
private DockProperties _dockProperties;
|
||||
private DockConsole _dockConsole;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor Region
|
||||
|
||||
public MainForm()
|
||||
@ -19,6 +28,20 @@ namespace Example
|
||||
// input before letting events pass through to the rest of the application.
|
||||
Application.AddMessageFilter(DockPanel.MessageFilter);
|
||||
|
||||
// Build the tool windows and add them to the dock panel
|
||||
_dockProject = new DockProject();
|
||||
_dockProperties = new DockProperties();
|
||||
_dockConsole = new DockConsole();
|
||||
|
||||
DockPanel.AddContent(_dockProject);
|
||||
DockPanel.AddContent(_dockProperties);
|
||||
DockPanel.AddContent(_dockConsole);
|
||||
|
||||
// Show the tool windows as visible in the 'Window' menu
|
||||
mnuProject.Checked = true;
|
||||
mnuProperties.Checked = true;
|
||||
mnuConsole.Checked = true;
|
||||
|
||||
// Hook in all the UI events manually for clarity.
|
||||
HookEvents();
|
||||
}
|
||||
@ -29,17 +52,87 @@ namespace Example
|
||||
|
||||
private void HookEvents()
|
||||
{
|
||||
mnuDialog.Click += delegate
|
||||
{
|
||||
var test = new DialogTest();
|
||||
test.ShowDialog();
|
||||
};
|
||||
mnuNewFile.Click += NewFile_Click;
|
||||
mnuClose.Click += Close_Click;
|
||||
|
||||
mnuAbout.Click += delegate
|
||||
btnNewFile.Click += NewFile_Click;
|
||||
|
||||
mnuDialog.Click += Dialog_Click;
|
||||
|
||||
mnuProject.Click += Project_Click;
|
||||
mnuProperties.Click += Properties_Click;
|
||||
mnuConsole.Click += Console_Click;
|
||||
|
||||
mnuAbout.Click += About_Click;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Event Handler Region
|
||||
|
||||
private void NewFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
var newFile = new DockDocument();
|
||||
DockPanel.AddContent(newFile);
|
||||
}
|
||||
|
||||
private void Close_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void Dialog_Click(object sender, EventArgs e)
|
||||
{
|
||||
var test = new DialogTest();
|
||||
test.ShowDialog();
|
||||
}
|
||||
|
||||
private void Project_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_dockProject.DockPanel == null)
|
||||
{
|
||||
var about = new DialogAbout();
|
||||
about.ShowDialog();
|
||||
};
|
||||
DockPanel.AddContent(_dockProject);
|
||||
mnuProject.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DockPanel.RemoveContent(_dockProject);
|
||||
mnuProject.Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void Properties_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_dockProperties.DockPanel == null)
|
||||
{
|
||||
DockPanel.AddContent(_dockProperties);
|
||||
mnuProperties.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DockPanel.RemoveContent(_dockProperties);
|
||||
mnuProperties.Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void Console_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_dockConsole.DockPanel == null)
|
||||
{
|
||||
DockPanel.AddContent(_dockConsole);
|
||||
mnuConsole.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DockPanel.RemoveContent(_dockConsole);
|
||||
mnuConsole.Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void About_Click(object sender, EventArgs e)
|
||||
{
|
||||
var about = new DialogAbout();
|
||||
about.ShowDialog();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
30
Example/Icons.Designer.cs
generated
30
Example/Icons.Designer.cs
generated
@ -60,6 +60,16 @@ namespace Example {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap application_16x {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("application_16x", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@ -70,6 +80,16 @@ namespace Example {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Console {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Console", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@ -110,6 +130,16 @@ namespace Example {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap properties_16xLG {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("properties_16xLG", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
@ -124,6 +124,12 @@
|
||||
<data name="StatusAnnotations_Information_16xMD_color" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\StatusAnnotations_Information_16xMD_color.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="StatusAnnotations_Information_16xLG_color" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\StatusAnnotations_Information_16xLG_color.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="application_16x" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\application_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Close_16xLG" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\Close_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@ -133,10 +139,13 @@
|
||||
<data name="NewFile_6276" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\NewFile_6276.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="properties_16xLG" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\properties_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="folder_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\folder_Closed_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="StatusAnnotations_Information_16xLG_color" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\StatusAnnotations_Information_16xLG_color.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Console" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\Console.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
Example/Resources/Console.png
Normal file
BIN
Example/Resources/Console.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 182 B |
BIN
Example/Resources/application_16x.png
Normal file
BIN
Example/Resources/application_16x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 157 B |
BIN
Example/Resources/properties_16xLG.png
Normal file
BIN
Example/Resources/properties_16xLG.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 357 B |
Loading…
x
Reference in New Issue
Block a user