mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-07-02 07:09:27 +03:00
Merge branch 'feature/controls'
This commit is contained in:
commit
55377f70ae
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,6 +6,7 @@
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
.idea
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
207
DarkUI/Controls/DarkComboBox.cs
Normal file
207
DarkUI/Controls/DarkComboBox.cs
Normal file
@ -0,0 +1,207 @@
|
||||
using DarkUI.Config;
|
||||
using DarkUI.Icons;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DarkUI.Controls
|
||||
{
|
||||
public class DarkComboBox : ComboBox
|
||||
{
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public new Color ForeColor { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public new Color BackColor { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public new FlatStyle FlatStyle { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public new ComboBoxStyle DropDownStyle { get; set; }
|
||||
|
||||
private Bitmap _buffer;
|
||||
|
||||
public DarkComboBox() : base()
|
||||
{
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer |
|
||||
ControlStyles.ResizeRedraw |
|
||||
ControlStyles.UserPaint, true);
|
||||
|
||||
DrawMode = DrawMode.OwnerDrawVariable;
|
||||
|
||||
base.FlatStyle = FlatStyle.Flat;
|
||||
base.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
_buffer = null;
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
protected override void OnTabStopChanged(EventArgs e)
|
||||
{
|
||||
base.OnTabStopChanged(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnTabIndexChanged(EventArgs e)
|
||||
{
|
||||
base.OnTabIndexChanged(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnGotFocus(EventArgs e)
|
||||
{
|
||||
base.OnGotFocus(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnLostFocus(EventArgs e)
|
||||
{
|
||||
base.OnLostFocus(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnTextChanged(EventArgs e)
|
||||
{
|
||||
base.OnTextChanged(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnTextUpdate(EventArgs e)
|
||||
{
|
||||
base.OnTextUpdate(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnSelectedValueChanged(EventArgs e)
|
||||
{
|
||||
base.OnSelectedValueChanged(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnInvalidated(InvalidateEventArgs e)
|
||||
{
|
||||
base.OnInvalidated(e);
|
||||
PaintCombobox();
|
||||
}
|
||||
|
||||
private void PaintCombobox()
|
||||
{
|
||||
if (_buffer == null)
|
||||
_buffer = new Bitmap(ClientRectangle.Width, ClientRectangle.Height);
|
||||
|
||||
using (var g = Graphics.FromImage(_buffer))
|
||||
{
|
||||
var rect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height);
|
||||
|
||||
var textColor = Colors.LightText;
|
||||
var borderColor = Colors.GreySelection;
|
||||
var fillColor = Colors.LightBackground;
|
||||
|
||||
if (Focused && TabStop)
|
||||
borderColor = Colors.BlueHighlight;
|
||||
|
||||
using (var b = new SolidBrush(fillColor))
|
||||
{
|
||||
g.FillRectangle(b, rect);
|
||||
}
|
||||
|
||||
using (var p = new Pen(borderColor, 1))
|
||||
{
|
||||
var modRect = new Rectangle(rect.Left, rect.Top, rect.Width - 1, rect.Height - 1);
|
||||
g.DrawRectangle(p, modRect);
|
||||
}
|
||||
|
||||
var icon = ScrollIcons.scrollbar_arrow_hot;
|
||||
g.DrawImageUnscaled(icon,
|
||||
rect.Right - icon.Width - (Consts.Padding / 2),
|
||||
(rect.Height / 2) - (icon.Height / 2));
|
||||
|
||||
var text = SelectedItem != null ? SelectedItem.ToString() : Text;
|
||||
|
||||
using (var b = new SolidBrush(textColor))
|
||||
{
|
||||
var padding = 2;
|
||||
|
||||
var modRect = new Rectangle(rect.Left + padding,
|
||||
rect.Top + padding,
|
||||
rect.Width - icon.Width - (Consts.Padding / 2) - (padding * 2),
|
||||
rect.Height - (padding * 2));
|
||||
|
||||
var stringFormat = new StringFormat
|
||||
{
|
||||
LineAlignment = StringAlignment.Center,
|
||||
Alignment = StringAlignment.Near,
|
||||
FormatFlags = StringFormatFlags.NoWrap,
|
||||
Trimming = StringTrimming.EllipsisCharacter
|
||||
};
|
||||
|
||||
g.DrawString(text, Font, b, modRect, stringFormat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
if (_buffer == null)
|
||||
PaintCombobox();
|
||||
|
||||
var g = e.Graphics;
|
||||
g.DrawImageUnscaled(_buffer, Point.Empty);
|
||||
}
|
||||
|
||||
protected override void OnDrawItem(DrawItemEventArgs e)
|
||||
{
|
||||
var g = e.Graphics;
|
||||
var rect = e.Bounds;
|
||||
|
||||
var textColor = Colors.LightText;
|
||||
var fillColor = Colors.LightBackground;
|
||||
|
||||
if ((e.State & DrawItemState.Selected) == DrawItemState.Selected ||
|
||||
(e.State & DrawItemState.Focus) == DrawItemState.Focus ||
|
||||
(e.State & DrawItemState.NoFocusRect) != DrawItemState.NoFocusRect)
|
||||
fillColor = Colors.BlueSelection;
|
||||
|
||||
using (var b = new SolidBrush(fillColor))
|
||||
{
|
||||
g.FillRectangle(b, rect);
|
||||
}
|
||||
|
||||
if (e.Index >= 0 && e.Index < Items.Count)
|
||||
{
|
||||
var text = Items[e.Index].ToString();
|
||||
|
||||
using (var b = new SolidBrush(textColor))
|
||||
{
|
||||
var padding = 2;
|
||||
|
||||
var modRect = new Rectangle(rect.Left + padding,
|
||||
rect.Top + padding,
|
||||
rect.Width - (padding * 2),
|
||||
rect.Height - (padding * 2));
|
||||
|
||||
var stringFormat = new StringFormat
|
||||
{
|
||||
LineAlignment = StringAlignment.Center,
|
||||
Alignment = StringAlignment.Near,
|
||||
FormatFlags = StringFormatFlags.NoWrap,
|
||||
Trimming = StringTrimming.EllipsisCharacter
|
||||
};
|
||||
|
||||
g.DrawString(text, Font, b, modRect, stringFormat);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
80
DarkUI/Controls/DarkGroupBox.cs
Normal file
80
DarkUI/Controls/DarkGroupBox.cs
Normal file
@ -0,0 +1,80 @@
|
||||
using DarkUI.Config;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DarkUI.Controls
|
||||
{
|
||||
public class DarkGroupBox : GroupBox
|
||||
{
|
||||
private Color _borderColor = Colors.DarkBorder;
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("Determines the color of the border.")]
|
||||
public Color BorderColor
|
||||
{
|
||||
get { return _borderColor; }
|
||||
set
|
||||
{
|
||||
_borderColor = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
public DarkGroupBox()
|
||||
{
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer |
|
||||
ControlStyles.ResizeRedraw |
|
||||
ControlStyles.UserPaint, true);
|
||||
|
||||
ResizeRedraw = true;
|
||||
DoubleBuffered = true;
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
var g = e.Graphics;
|
||||
var rect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height);
|
||||
var stringSize = g.MeasureString(Text, Font);
|
||||
|
||||
var textColor = Colors.LightText;
|
||||
var fillColor = Colors.GreyBackground;
|
||||
|
||||
using (var b = new SolidBrush(fillColor))
|
||||
{
|
||||
g.FillRectangle(b, rect);
|
||||
}
|
||||
|
||||
using (var p = new Pen(BorderColor, 1))
|
||||
{
|
||||
var borderRect = new Rectangle(0, (int)stringSize.Height / 2, rect.Width - 1, rect.Height - ((int)stringSize.Height / 2) - 1);
|
||||
g.DrawRectangle(p, borderRect);
|
||||
}
|
||||
|
||||
var textRect = new Rectangle(rect.Left + Consts.Padding,
|
||||
rect.Top,
|
||||
rect.Width - (Consts.Padding * 2),
|
||||
(int)stringSize.Height);
|
||||
|
||||
using (var b2 = new SolidBrush(fillColor))
|
||||
{
|
||||
var modRect = new Rectangle(textRect.Left, textRect.Top, Math.Min(textRect.Width, (int)stringSize.Width), textRect.Height);
|
||||
g.FillRectangle(b2, modRect);
|
||||
}
|
||||
|
||||
using (var b = new SolidBrush(textColor))
|
||||
{
|
||||
var stringFormat = new StringFormat
|
||||
{
|
||||
LineAlignment = StringAlignment.Center,
|
||||
Alignment = StringAlignment.Near,
|
||||
FormatFlags = StringFormatFlags.NoWrap,
|
||||
Trimming = StringTrimming.EllipsisCharacter
|
||||
};
|
||||
|
||||
g.DrawString(Text, Font, b, textRect, stringFormat);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
153
DarkUI/Controls/DarkNumericUpDown.cs
Normal file
153
DarkUI/Controls/DarkNumericUpDown.cs
Normal file
@ -0,0 +1,153 @@
|
||||
using DarkUI.Config;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Reflection;
|
||||
using System.Security;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DarkUI.Controls
|
||||
{
|
||||
public class DarkNumericUpDown : NumericUpDown
|
||||
{
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public new Color ForeColor { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public new Color BackColor { get; set; }
|
||||
|
||||
private bool _mouseDown;
|
||||
|
||||
public DarkNumericUpDown()
|
||||
{
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer |
|
||||
ControlStyles.ResizeRedraw |
|
||||
ControlStyles.UserPaint, true);
|
||||
|
||||
base.ForeColor = Color.Gainsboro;
|
||||
base.BackColor = Colors.LightBackground;
|
||||
|
||||
Controls[0].Paint += DarkNumericUpDown_Paint;
|
||||
|
||||
try
|
||||
{
|
||||
// Prevent flickering, only if our assembly has reflection permission
|
||||
Type type = Controls[0].GetType();
|
||||
BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Instance;
|
||||
MethodInfo method = type.GetMethod("SetStyle", flags);
|
||||
|
||||
if (method != null)
|
||||
{
|
||||
object[] param = { ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true };
|
||||
method.Invoke(Controls[0], param);
|
||||
}
|
||||
}
|
||||
catch (SecurityException)
|
||||
{
|
||||
// Don't do anything, we are running in a trusted contex
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
_mouseDown = true;
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnMouseUp(MouseEventArgs mevent)
|
||||
{
|
||||
_mouseDown = false;
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnMouseEnter(EventArgs e)
|
||||
{
|
||||
base.OnMouseEnter(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnMouseLeave(EventArgs e)
|
||||
{
|
||||
base.OnMouseLeave(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnGotFocus(EventArgs e)
|
||||
{
|
||||
base.OnGotFocus(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnLostFocus(EventArgs e)
|
||||
{
|
||||
base.OnLostFocus(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnTextBoxLostFocus(object source, EventArgs e)
|
||||
{
|
||||
base.OnTextBoxLostFocus(source, e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
private void DarkNumericUpDown_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
var g = e.Graphics;
|
||||
var rect = e.ClipRectangle;
|
||||
|
||||
var fillColor = Colors.HeaderBackground;
|
||||
|
||||
using (var b = new SolidBrush(fillColor))
|
||||
{
|
||||
g.FillRectangle(b, rect);
|
||||
}
|
||||
|
||||
var mousePos = Controls[0].PointToClient(Cursor.Position);
|
||||
|
||||
var upArea = new Rectangle(0, 0, rect.Width, rect.Height / 2);
|
||||
var upHot = upArea.Contains(mousePos);
|
||||
|
||||
var upIcon = upHot ? ScrollIcons.scrollbar_arrow_small_hot : ScrollIcons.scrollbar_arrow_small_standard;
|
||||
if (upHot && _mouseDown)
|
||||
upIcon = ScrollIcons.scrollbar_arrow_small_clicked;
|
||||
|
||||
upIcon.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
g.DrawImageUnscaled(upIcon, (upArea.Width / 2) - (upIcon.Width / 2), (upArea.Height / 2) - (upIcon.Height / 2));
|
||||
|
||||
var downArea = new Rectangle(0, rect.Height / 2, rect.Width, rect.Height / 2);
|
||||
var downHot = downArea.Contains(mousePos);
|
||||
|
||||
var downIcon = downHot ? ScrollIcons.scrollbar_arrow_small_hot : ScrollIcons.scrollbar_arrow_small_standard;
|
||||
if (downHot && _mouseDown)
|
||||
downIcon = ScrollIcons.scrollbar_arrow_small_clicked;
|
||||
|
||||
g.DrawImageUnscaled(downIcon, (downArea.Width / 2) - (downIcon.Width / 2), downArea.Top + (downArea.Height / 2) - (downIcon.Height / 2));
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
var g = e.Graphics;
|
||||
var rect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height);
|
||||
|
||||
var borderColor = Colors.GreySelection;
|
||||
|
||||
if (Focused && TabStop)
|
||||
borderColor = Colors.BlueHighlight;
|
||||
|
||||
using (var p = new Pen(borderColor, 1))
|
||||
{
|
||||
var modRect = new Rectangle(rect.Left, rect.Top, rect.Width - 1, rect.Height - 1);
|
||||
g.DrawRectangle(p, modRect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -54,8 +54,17 @@
|
||||
<Compile Include="Controls\DarkDropdownList.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\DarkComboBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\DarkContentAlignment.cs" />
|
||||
<Compile Include="Controls\DarkControlState.cs" />
|
||||
<Compile Include="Controls\DarkGroupBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\DarkNumericUpDown.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\DarkRadioButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@ -312,6 +321,15 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\scrollbar_disabled.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\scrollbar_arrow_small_clicked.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\scrollbar_arrow_small_hot.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\scrollbar_arrow_small_standard.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.
|
||||
|
32
DarkUI/Icons/ScrollIcons.Designer.cs
generated
32
DarkUI/Icons/ScrollIcons.Designer.cs
generated
@ -19,7 +19,7 @@ namespace DarkUI {
|
||||
// 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.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class ScrollIcons {
|
||||
@ -100,6 +100,36 @@ namespace DarkUI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap scrollbar_arrow_small_clicked {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("scrollbar_arrow_small_clicked", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap scrollbar_arrow_small_hot {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("scrollbar_arrow_small_hot", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap scrollbar_arrow_small_standard {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("scrollbar_arrow_small_standard", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
@ -130,6 +130,15 @@
|
||||
<data name="scrollbar_arrow_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\scrollbar_arrow_hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="scrollbar_arrow_small_clicked" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\scrollbar_arrow_small_clicked.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="scrollbar_arrow_small_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\scrollbar_arrow_small_hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="scrollbar_arrow_small_standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\scrollbar_arrow_small_standard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="scrollbar_arrow_standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\scrollbar_arrow_standard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
BIN
DarkUI/Resources/scrollbar_arrow_small_clicked.png
Normal file
BIN
DarkUI/Resources/scrollbar_arrow_small_clicked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
DarkUI/Resources/scrollbar_arrow_small_hot.png
Normal file
BIN
DarkUI/Resources/scrollbar_arrow_small_hot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
DarkUI/Resources/scrollbar_arrow_small_standard.png
Normal file
BIN
DarkUI/Resources/scrollbar_arrow_small_standard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
147
Example/Forms/Dialogs/DialogControls.Designer.cs
generated
147
Example/Forms/Dialogs/DialogControls.Designer.cs
generated
@ -39,6 +39,12 @@ namespace Example
|
||||
this.lstTest = new DarkUI.Controls.DarkListView();
|
||||
this.pnlMessageBox = new DarkUI.Controls.DarkSectionPanel();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel7 = new System.Windows.Forms.Panel();
|
||||
this.darkComboBox1 = new DarkUI.Controls.DarkComboBox();
|
||||
this.darkTitle4 = new DarkUI.Controls.DarkTitle();
|
||||
this.panel6 = new System.Windows.Forms.Panel();
|
||||
this.darkNumericUpDown1 = new DarkUI.Controls.DarkNumericUpDown();
|
||||
this.darkTitle5 = new DarkUI.Controls.DarkTitle();
|
||||
this.panel5 = new System.Windows.Forms.Panel();
|
||||
this.darkRadioButton3 = new DarkUI.Controls.DarkRadioButton();
|
||||
this.darkRadioButton2 = new DarkUI.Controls.DarkRadioButton();
|
||||
@ -53,16 +59,23 @@ namespace Example
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.btnDialog = new DarkUI.Controls.DarkButton();
|
||||
this.darkTitle1 = new DarkUI.Controls.DarkTitle();
|
||||
this.darkGroupBox1 = new DarkUI.Controls.DarkGroupBox();
|
||||
this.darkCheckBox3 = new DarkUI.Controls.DarkCheckBox();
|
||||
this.darkRadioButton4 = new DarkUI.Controls.DarkRadioButton();
|
||||
this.pnlMain.SuspendLayout();
|
||||
this.tblMain.SuspendLayout();
|
||||
this.pnlTreeView.SuspendLayout();
|
||||
this.pnlListView.SuspendLayout();
|
||||
this.pnlMessageBox.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel7.SuspendLayout();
|
||||
this.panel6.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.darkNumericUpDown1)).BeginInit();
|
||||
this.panel5.SuspendLayout();
|
||||
this.panel4.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.darkGroupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pnlMain
|
||||
@ -72,7 +85,7 @@ namespace Example
|
||||
this.pnlMain.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnlMain.Name = "pnlMain";
|
||||
this.pnlMain.Padding = new System.Windows.Forms.Padding(5, 10, 5, 0);
|
||||
this.pnlMain.Size = new System.Drawing.Size(708, 410);
|
||||
this.pnlMain.Size = new System.Drawing.Size(708, 528);
|
||||
this.pnlMain.TabIndex = 2;
|
||||
//
|
||||
// tblMain
|
||||
@ -89,7 +102,7 @@ namespace Example
|
||||
this.tblMain.Name = "tblMain";
|
||||
this.tblMain.RowCount = 1;
|
||||
this.tblMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tblMain.Size = new System.Drawing.Size(698, 400);
|
||||
this.tblMain.Size = new System.Drawing.Size(698, 518);
|
||||
this.tblMain.TabIndex = 0;
|
||||
//
|
||||
// pnlTreeView
|
||||
@ -100,7 +113,7 @@ namespace Example
|
||||
this.pnlTreeView.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.pnlTreeView.Name = "pnlTreeView";
|
||||
this.pnlTreeView.SectionHeader = "Tree view test";
|
||||
this.pnlTreeView.Size = new System.Drawing.Size(224, 400);
|
||||
this.pnlTreeView.Size = new System.Drawing.Size(224, 518);
|
||||
this.pnlTreeView.TabIndex = 14;
|
||||
//
|
||||
// treeTest
|
||||
@ -112,7 +125,7 @@ namespace Example
|
||||
this.treeTest.MultiSelect = true;
|
||||
this.treeTest.Name = "treeTest";
|
||||
this.treeTest.ShowIcons = true;
|
||||
this.treeTest.Size = new System.Drawing.Size(222, 374);
|
||||
this.treeTest.Size = new System.Drawing.Size(222, 492);
|
||||
this.treeTest.TabIndex = 0;
|
||||
this.treeTest.Text = "darkTreeView1";
|
||||
//
|
||||
@ -124,7 +137,7 @@ namespace Example
|
||||
this.pnlListView.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.pnlListView.Name = "pnlListView";
|
||||
this.pnlListView.SectionHeader = "List view test";
|
||||
this.pnlListView.Size = new System.Drawing.Size(222, 400);
|
||||
this.pnlListView.Size = new System.Drawing.Size(222, 518);
|
||||
this.pnlListView.TabIndex = 13;
|
||||
//
|
||||
// lstTest
|
||||
@ -133,7 +146,7 @@ namespace Example
|
||||
this.lstTest.Location = new System.Drawing.Point(1, 25);
|
||||
this.lstTest.MultiSelect = true;
|
||||
this.lstTest.Name = "lstTest";
|
||||
this.lstTest.Size = new System.Drawing.Size(220, 374);
|
||||
this.lstTest.Size = new System.Drawing.Size(220, 492);
|
||||
this.lstTest.TabIndex = 7;
|
||||
this.lstTest.Text = "darkListView1";
|
||||
//
|
||||
@ -145,11 +158,14 @@ namespace Example
|
||||
this.pnlMessageBox.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.pnlMessageBox.Name = "pnlMessageBox";
|
||||
this.pnlMessageBox.SectionHeader = "Controls test";
|
||||
this.pnlMessageBox.Size = new System.Drawing.Size(222, 400);
|
||||
this.pnlMessageBox.Size = new System.Drawing.Size(222, 518);
|
||||
this.pnlMessageBox.TabIndex = 12;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.darkGroupBox1);
|
||||
this.panel1.Controls.Add(this.panel7);
|
||||
this.panel1.Controls.Add(this.panel6);
|
||||
this.panel1.Controls.Add(this.panel5);
|
||||
this.panel1.Controls.Add(this.panel4);
|
||||
this.panel1.Controls.Add(this.panel3);
|
||||
@ -158,9 +174,72 @@ namespace Example
|
||||
this.panel1.Location = new System.Drawing.Point(1, 25);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Padding = new System.Windows.Forms.Padding(10);
|
||||
this.panel1.Size = new System.Drawing.Size(220, 374);
|
||||
this.panel1.Size = new System.Drawing.Size(220, 492);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// panel7
|
||||
//
|
||||
this.panel7.Controls.Add(this.darkComboBox1);
|
||||
this.panel7.Controls.Add(this.darkTitle4);
|
||||
this.panel7.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel7.Location = new System.Drawing.Point(10, 349);
|
||||
this.panel7.Name = "panel7";
|
||||
this.panel7.Size = new System.Drawing.Size(200, 63);
|
||||
this.panel7.TabIndex = 23;
|
||||
//
|
||||
// darkComboBox1
|
||||
//
|
||||
this.darkComboBox1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkComboBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
|
||||
this.darkComboBox1.FormattingEnabled = true;
|
||||
this.darkComboBox1.Items.AddRange(new object[] {
|
||||
"Item 1",
|
||||
"Item 2",
|
||||
"This is a really long item in the collection to check out how text is clipped",
|
||||
"Item 4"});
|
||||
this.darkComboBox1.Location = new System.Drawing.Point(0, 26);
|
||||
this.darkComboBox1.Name = "darkComboBox1";
|
||||
this.darkComboBox1.Size = new System.Drawing.Size(200, 24);
|
||||
this.darkComboBox1.TabIndex = 20;
|
||||
//
|
||||
// darkTitle4
|
||||
//
|
||||
this.darkTitle4.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkTitle4.Location = new System.Drawing.Point(0, 0);
|
||||
this.darkTitle4.Name = "darkTitle4";
|
||||
this.darkTitle4.Size = new System.Drawing.Size(200, 26);
|
||||
this.darkTitle4.TabIndex = 21;
|
||||
this.darkTitle4.Text = "ComboBox";
|
||||
//
|
||||
// panel6
|
||||
//
|
||||
this.panel6.Controls.Add(this.darkNumericUpDown1);
|
||||
this.panel6.Controls.Add(this.darkTitle5);
|
||||
this.panel6.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel6.Location = new System.Drawing.Point(10, 285);
|
||||
this.panel6.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.panel6.Name = "panel6";
|
||||
this.panel6.Size = new System.Drawing.Size(200, 64);
|
||||
this.panel6.TabIndex = 22;
|
||||
//
|
||||
// darkNumericUpDown1
|
||||
//
|
||||
this.darkNumericUpDown1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkNumericUpDown1.Location = new System.Drawing.Point(0, 26);
|
||||
this.darkNumericUpDown1.Name = "darkNumericUpDown1";
|
||||
this.darkNumericUpDown1.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.darkNumericUpDown1.Size = new System.Drawing.Size(200, 23);
|
||||
this.darkNumericUpDown1.TabIndex = 24;
|
||||
//
|
||||
// darkTitle5
|
||||
//
|
||||
this.darkTitle5.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkTitle5.Location = new System.Drawing.Point(0, 0);
|
||||
this.darkTitle5.Name = "darkTitle5";
|
||||
this.darkTitle5.Size = new System.Drawing.Size(200, 26);
|
||||
this.darkTitle5.TabIndex = 23;
|
||||
this.darkTitle5.Text = "Numeric Up/Down";
|
||||
//
|
||||
// panel5
|
||||
//
|
||||
this.panel5.Controls.Add(this.darkRadioButton3);
|
||||
@ -312,11 +391,47 @@ namespace Example
|
||||
this.darkTitle1.TabIndex = 14;
|
||||
this.darkTitle1.Text = "Dialogs";
|
||||
//
|
||||
// darkGroupBox1
|
||||
//
|
||||
this.darkGroupBox1.AutoSize = true;
|
||||
this.darkGroupBox1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
|
||||
this.darkGroupBox1.Controls.Add(this.darkRadioButton4);
|
||||
this.darkGroupBox1.Controls.Add(this.darkCheckBox3);
|
||||
this.darkGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkGroupBox1.Location = new System.Drawing.Point(10, 412);
|
||||
this.darkGroupBox1.Name = "darkGroupBox1";
|
||||
this.darkGroupBox1.Padding = new System.Windows.Forms.Padding(10, 5, 10, 10);
|
||||
this.darkGroupBox1.Size = new System.Drawing.Size(200, 69);
|
||||
this.darkGroupBox1.TabIndex = 24;
|
||||
this.darkGroupBox1.TabStop = false;
|
||||
this.darkGroupBox1.Text = "GroupBox";
|
||||
//
|
||||
// darkCheckBox3
|
||||
//
|
||||
this.darkCheckBox3.AutoSize = true;
|
||||
this.darkCheckBox3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkCheckBox3.Location = new System.Drawing.Point(10, 21);
|
||||
this.darkCheckBox3.Name = "darkCheckBox3";
|
||||
this.darkCheckBox3.Size = new System.Drawing.Size(180, 19);
|
||||
this.darkCheckBox3.TabIndex = 0;
|
||||
this.darkCheckBox3.Text = "Checkbox";
|
||||
//
|
||||
// darkRadioButton4
|
||||
//
|
||||
this.darkRadioButton4.AutoSize = true;
|
||||
this.darkRadioButton4.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkRadioButton4.Location = new System.Drawing.Point(10, 40);
|
||||
this.darkRadioButton4.Name = "darkRadioButton4";
|
||||
this.darkRadioButton4.Size = new System.Drawing.Size(180, 19);
|
||||
this.darkRadioButton4.TabIndex = 1;
|
||||
this.darkRadioButton4.TabStop = true;
|
||||
this.darkRadioButton4.Text = "Radio button";
|
||||
//
|
||||
// DialogControls
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(708, 455);
|
||||
this.ClientSize = new System.Drawing.Size(708, 573);
|
||||
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")));
|
||||
@ -331,12 +446,17 @@ namespace Example
|
||||
this.pnlMessageBox.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.panel7.ResumeLayout(false);
|
||||
this.panel6.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.darkNumericUpDown1)).EndInit();
|
||||
this.panel5.ResumeLayout(false);
|
||||
this.panel5.PerformLayout();
|
||||
this.panel4.ResumeLayout(false);
|
||||
this.panel4.PerformLayout();
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.darkGroupBox1.ResumeLayout(false);
|
||||
this.darkGroupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@ -365,5 +485,14 @@ namespace Example
|
||||
private DarkTitle darkTitle1;
|
||||
private DarkTitle darkTitle2;
|
||||
private DarkTitle darkTitle3;
|
||||
private System.Windows.Forms.Panel panel7;
|
||||
private DarkComboBox darkComboBox1;
|
||||
private DarkTitle darkTitle4;
|
||||
private System.Windows.Forms.Panel panel6;
|
||||
private DarkNumericUpDown darkNumericUpDown1;
|
||||
private DarkTitle darkTitle5;
|
||||
private DarkGroupBox darkGroupBox1;
|
||||
private DarkRadioButton darkRadioButton4;
|
||||
private DarkCheckBox darkCheckBox3;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user