implement pre-commit hooks on MBS.Framework
This commit is contained in:
parent
2cb8caacf7
commit
4c106e3a3a
6
.gitignore
vendored
6
.gitignore
vendored
@ -221,7 +221,7 @@ ClientBin/
|
|||||||
*.publishsettings
|
*.publishsettings
|
||||||
orleans.codegen.cs
|
orleans.codegen.cs
|
||||||
|
|
||||||
# Including strong name files can present a security risk
|
# Including strong name files can present a security risk
|
||||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
#*.snk
|
#*.snk
|
||||||
|
|
||||||
@ -317,7 +317,7 @@ __pycache__/
|
|||||||
# OpenCover UI analysis results
|
# OpenCover UI analysis results
|
||||||
OpenCover/
|
OpenCover/
|
||||||
|
|
||||||
# Azure Stream Analytics local run output
|
# Azure Stream Analytics local run output
|
||||||
ASALocalRun/
|
ASALocalRun/
|
||||||
|
|
||||||
# MSBuild Binary and Structured Log
|
# MSBuild Binary and Structured Log
|
||||||
@ -326,5 +326,5 @@ ASALocalRun/
|
|||||||
# NVidia Nsight GPU debugger configuration file
|
# NVidia Nsight GPU debugger configuration file
|
||||||
*.nvuser
|
*.nvuser
|
||||||
|
|
||||||
# MFractors (Xamarin productivity tool) working folder
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
.mfractor/
|
.mfractor/
|
||||||
|
|||||||
16
.pre-commit-config.yaml
Normal file
16
.pre-commit-config.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v3.4.0
|
||||||
|
hooks:
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-xml
|
||||||
|
- id: check-executables-have-shebangs
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
||||||
|
rev: 2.1.5
|
||||||
|
hooks:
|
||||||
|
- id: forbid-space-in-indent
|
||||||
|
language: script
|
||||||
|
exclude: (^.*\.(csproj|glade|resx|svg|yaml|txt|uexml)$)|LICENSE
|
||||||
|
exclude_types: ['binary']
|
||||||
@ -55,4 +55,4 @@ namespace MBS.Framework.CLI
|
|||||||
Console.WriteLine(String.Format("usage: {0} {1}", System.IO.Path.GetFileNameWithoutExtension(ExecutableFileTitle), sbSwitches.ToString()));
|
Console.WriteLine(String.Format("usage: {0} {1}", System.IO.Path.GetFileNameWithoutExtension(ExecutableFileTitle), sbSwitches.ToString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,4 +78,4 @@ namespace MBS.Framework.CLI
|
|||||||
private set { mvarValue = value; }
|
private set { mvarValue = value; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,4 +43,4 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
// Information about this assembly is defined by the following attributes.
|
// Information about this assembly is defined by the following attributes.
|
||||||
// Change them to the values specific to your project.
|
// Change them to the values specific to your project.
|
||||||
|
|
||||||
[assembly: AssemblyTitle("MBS.Framework.Console")]
|
[assembly: AssemblyTitle("MBS.Framework.Console")]
|
||||||
@ -19,7 +19,7 @@ using System.Runtime.CompilerServices;
|
|||||||
|
|
||||||
[assembly: AssemblyVersion("1.0.*")]
|
[assembly: AssemblyVersion("1.0.*")]
|
||||||
|
|
||||||
// The following attributes are used to specify the signing key for the assembly,
|
// The following attributes are used to specify the signing key for the assembly,
|
||||||
// if desired. See the Mono documentation for more information about signing.
|
// if desired. See the Mono documentation for more information about signing.
|
||||||
|
|
||||||
//[assembly: AssemblyDelaySign(false)]
|
//[assembly: AssemblyDelaySign(false)]
|
||||||
|
|||||||
@ -68,7 +68,7 @@ namespace MBS.Framework
|
|||||||
/// The child <see cref="CommandItem"/>s that are contained within this <see cref="Command"/>.
|
/// The child <see cref="CommandItem"/>s that are contained within this <see cref="Command"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public CommandItem.CommandItemCollection Items { get; } = new CommandItem.CommandItemCollection();
|
public CommandItem.CommandItemCollection Items { get; } = new CommandItem.CommandItemCollection();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The event that is fired when the command is executed.
|
/// The event that is fired when the command is executed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -133,4 +133,3 @@ namespace MBS.Framework
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ namespace MBS.Framework
|
|||||||
{
|
{
|
||||||
private string mvarCommandID = String.Empty;
|
private string mvarCommandID = String.Empty;
|
||||||
public string CommandID { get { return mvarCommandID; } set { mvarCommandID = value; } }
|
public string CommandID { get { return mvarCommandID; } set { mvarCommandID = value; } }
|
||||||
|
|
||||||
public CommandReferenceCommandItem(string commandID)
|
public CommandReferenceCommandItem(string commandID)
|
||||||
{
|
{
|
||||||
mvarCommandID = commandID;
|
mvarCommandID = commandID;
|
||||||
@ -74,4 +74,3 @@ namespace MBS.Framework
|
|||||||
public CommandItemCollection Items { get; } = new CommandItemCollection();
|
public CommandItemCollection Items { get; } = new CommandItemCollection();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
// Author:
|
// Author:
|
||||||
// Michael Becker <alcexhim@gmail.com>
|
// Michael Becker <alcexhim@gmail.com>
|
||||||
//
|
//
|
||||||
// Copyright (c) 2019
|
// Copyright (c) 2019
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -5,303 +5,303 @@ using System.Text;
|
|||||||
|
|
||||||
namespace MBS.Framework.Drawing
|
namespace MBS.Framework.Drawing
|
||||||
{
|
{
|
||||||
public static class Colors
|
public static class Colors
|
||||||
{
|
{
|
||||||
static Colors()
|
static Colors()
|
||||||
{
|
{
|
||||||
Aqua = Color.FromRGBAByte(0x00, 0xFF, 0xFF);
|
Aqua = Color.FromRGBAByte(0x00, 0xFF, 0xFF);
|
||||||
Black = Color.FromRGBAByte(0x00, 0x00, 0x00);
|
Black = Color.FromRGBAByte(0x00, 0x00, 0x00);
|
||||||
Blue = Color.FromRGBAByte(0x00, 0x00, 0xFF);
|
Blue = Color.FromRGBAByte(0x00, 0x00, 0xFF);
|
||||||
Fuchsia = Color.FromRGBAByte(0xFF, 0x00, 0xFF);
|
Fuchsia = Color.FromRGBAByte(0xFF, 0x00, 0xFF);
|
||||||
Gray = Color.FromRGBAByte(0x80, 0x80, 0x80);
|
Gray = Color.FromRGBAByte(0x80, 0x80, 0x80);
|
||||||
Green = Color.FromRGBAByte(0x00, 0x80, 0x00);
|
Green = Color.FromRGBAByte(0x00, 0x80, 0x00);
|
||||||
Lime = Color.FromRGBAByte(0x00, 0xFF, 0x00);
|
Lime = Color.FromRGBAByte(0x00, 0xFF, 0x00);
|
||||||
Maroon = Color.FromRGBAByte(0x80, 0x00, 0x00);
|
Maroon = Color.FromRGBAByte(0x80, 0x00, 0x00);
|
||||||
Navy = Color.FromRGBAByte(0x00, 0x00, 0x80);
|
Navy = Color.FromRGBAByte(0x00, 0x00, 0x80);
|
||||||
Olive = Color.FromRGBAByte(0x80, 0x80, 0x00);
|
Olive = Color.FromRGBAByte(0x80, 0x80, 0x00);
|
||||||
Purple = Color.FromRGBAByte(0x80, 0x00, 0x80);
|
Purple = Color.FromRGBAByte(0x80, 0x00, 0x80);
|
||||||
Red = Color.FromRGBAByte(0xFF, 0x00, 0x00);
|
Red = Color.FromRGBAByte(0xFF, 0x00, 0x00);
|
||||||
Silver = Color.FromRGBAByte(0xC0, 0xC0, 0xC0);
|
Silver = Color.FromRGBAByte(0xC0, 0xC0, 0xC0);
|
||||||
Teal = Color.FromRGBAByte(0x00, 0x80, 0x80);
|
Teal = Color.FromRGBAByte(0x00, 0x80, 0x80);
|
||||||
Yellow = Color.FromRGBAByte(0xFF, 0xFF, 0x00);
|
Yellow = Color.FromRGBAByte(0xFF, 0xFF, 0x00);
|
||||||
White = Color.FromRGBAByte(0xFF, 0xFF, 0xFF);
|
White = Color.FromRGBAByte(0xFF, 0xFF, 0xFF);
|
||||||
AliceBlue = Color.FromRGBAByte(0xF0, 0xF8, 0xFF);
|
AliceBlue = Color.FromRGBAByte(0xF0, 0xF8, 0xFF);
|
||||||
AntiqueWhite = Color.FromRGBAByte(0xFA, 0xEB, 0xD7);
|
AntiqueWhite = Color.FromRGBAByte(0xFA, 0xEB, 0xD7);
|
||||||
Aquamarine = Color.FromRGBAByte(0x7F, 0xFF, 0xD4);
|
Aquamarine = Color.FromRGBAByte(0x7F, 0xFF, 0xD4);
|
||||||
Azure = Color.FromRGBAByte(0xF0, 0xFF, 0xFF);
|
Azure = Color.FromRGBAByte(0xF0, 0xFF, 0xFF);
|
||||||
Beige = Color.FromRGBAByte(0xF5, 0xF5, 0xDC);
|
Beige = Color.FromRGBAByte(0xF5, 0xF5, 0xDC);
|
||||||
Bisque = Color.FromRGBAByte(0xFF, 0xE4, 0xC4);
|
Bisque = Color.FromRGBAByte(0xFF, 0xE4, 0xC4);
|
||||||
BlanchedAlmond = Color.FromRGBAByte(0xFF, 0xEB, 0xCD);
|
BlanchedAlmond = Color.FromRGBAByte(0xFF, 0xEB, 0xCD);
|
||||||
BlueViolet = Color.FromRGBAByte(0x8A, 0x2B, 0xE2);
|
BlueViolet = Color.FromRGBAByte(0x8A, 0x2B, 0xE2);
|
||||||
Brown = Color.FromRGBAByte(0xA5, 0x2A, 0x2A);
|
Brown = Color.FromRGBAByte(0xA5, 0x2A, 0x2A);
|
||||||
BurlyWood = Color.FromRGBAByte(0xDE, 0xB8, 0x87);
|
BurlyWood = Color.FromRGBAByte(0xDE, 0xB8, 0x87);
|
||||||
CadetBlue = Color.FromRGBAByte(0x5F, 0x9E, 0xA0);
|
CadetBlue = Color.FromRGBAByte(0x5F, 0x9E, 0xA0);
|
||||||
Chartreuse = Color.FromRGBAByte(0x7F, 0xFF, 0x00);
|
Chartreuse = Color.FromRGBAByte(0x7F, 0xFF, 0x00);
|
||||||
Chocolate = Color.FromRGBAByte(0xD2, 0x69, 0x1E);
|
Chocolate = Color.FromRGBAByte(0xD2, 0x69, 0x1E);
|
||||||
Coral = Color.FromRGBAByte(0xFF, 0x7F, 0x50);
|
Coral = Color.FromRGBAByte(0xFF, 0x7F, 0x50);
|
||||||
CornflowerBlue = Color.FromRGBAByte(0x64, 0x95, 0xED);
|
CornflowerBlue = Color.FromRGBAByte(0x64, 0x95, 0xED);
|
||||||
Cornsilk = Color.FromRGBAByte(0xFF, 0xF8, 0xDC);
|
Cornsilk = Color.FromRGBAByte(0xFF, 0xF8, 0xDC);
|
||||||
Crimson = Color.FromRGBAByte(0xDC, 0x14, 0x3C);
|
Crimson = Color.FromRGBAByte(0xDC, 0x14, 0x3C);
|
||||||
Cyan = Color.FromRGBAByte(0x00, 0xFF, 0xFF);
|
Cyan = Color.FromRGBAByte(0x00, 0xFF, 0xFF);
|
||||||
DarkBlue = Color.FromRGBAByte(0x00, 0x00, 0x8B);
|
DarkBlue = Color.FromRGBAByte(0x00, 0x00, 0x8B);
|
||||||
DarkCyan = Color.FromRGBAByte(0x00, 0x8B, 0x8B);
|
DarkCyan = Color.FromRGBAByte(0x00, 0x8B, 0x8B);
|
||||||
DarkGoldenrod = Color.FromRGBAByte(0xB8, 0x86, 0x0B);
|
DarkGoldenrod = Color.FromRGBAByte(0xB8, 0x86, 0x0B);
|
||||||
DarkGray = Color.FromRGBAByte(0xA9, 0xA9, 0xA9);
|
DarkGray = Color.FromRGBAByte(0xA9, 0xA9, 0xA9);
|
||||||
DarkGreen = Color.FromRGBAByte(0x00, 0x64, 0x00);
|
DarkGreen = Color.FromRGBAByte(0x00, 0x64, 0x00);
|
||||||
DarkKhaki = Color.FromRGBAByte(0xBD, 0xB7, 0x6B);
|
DarkKhaki = Color.FromRGBAByte(0xBD, 0xB7, 0x6B);
|
||||||
DarkMagenta = Color.FromRGBAByte(0x8B, 0x00, 0x8B);
|
DarkMagenta = Color.FromRGBAByte(0x8B, 0x00, 0x8B);
|
||||||
DarkOliveGreen = Color.FromRGBAByte(0x55, 0x6B, 0x2F);
|
DarkOliveGreen = Color.FromRGBAByte(0x55, 0x6B, 0x2F);
|
||||||
DarkOrange = Color.FromRGBAByte(0xFF, 0x8C, 0x00);
|
DarkOrange = Color.FromRGBAByte(0xFF, 0x8C, 0x00);
|
||||||
DarkOrchid = Color.FromRGBAByte(0x99, 0x32, 0xCC);
|
DarkOrchid = Color.FromRGBAByte(0x99, 0x32, 0xCC);
|
||||||
DarkRed = Color.FromRGBAByte(0x8B, 0x00, 0x00);
|
DarkRed = Color.FromRGBAByte(0x8B, 0x00, 0x00);
|
||||||
DarkSalmon = Color.FromRGBAByte(0xE9, 0x96, 0x7A);
|
DarkSalmon = Color.FromRGBAByte(0xE9, 0x96, 0x7A);
|
||||||
DarkSeaGreen = Color.FromRGBAByte(0x8F, 0xBC, 0x8F);
|
DarkSeaGreen = Color.FromRGBAByte(0x8F, 0xBC, 0x8F);
|
||||||
DarkSlateBlue = Color.FromRGBAByte(0x48, 0x3D, 0x8B);
|
DarkSlateBlue = Color.FromRGBAByte(0x48, 0x3D, 0x8B);
|
||||||
DarkSlateGray = Color.FromRGBAByte(0x2F, 0x4F, 0x4F);
|
DarkSlateGray = Color.FromRGBAByte(0x2F, 0x4F, 0x4F);
|
||||||
DarkTurquoise = Color.FromRGBAByte(0x00, 0xCE, 0xD1);
|
DarkTurquoise = Color.FromRGBAByte(0x00, 0xCE, 0xD1);
|
||||||
|
|
||||||
DarkViolet = Color.FromRGBAByte(0x94, 0x00, 0xD3);
|
DarkViolet = Color.FromRGBAByte(0x94, 0x00, 0xD3);
|
||||||
DeepPink = Color.FromRGBAByte(0xFF, 0x14, 0x93);
|
DeepPink = Color.FromRGBAByte(0xFF, 0x14, 0x93);
|
||||||
DeepSkyBlue = Color.FromRGBAByte(0x00, 0xBF, 0xFF);
|
DeepSkyBlue = Color.FromRGBAByte(0x00, 0xBF, 0xFF);
|
||||||
DimGray = Color.FromRGBAByte(0x69, 0x69, 0x69);
|
DimGray = Color.FromRGBAByte(0x69, 0x69, 0x69);
|
||||||
DodgerBlue = Color.FromRGBAByte(0x1E, 0x90, 0xFF);
|
DodgerBlue = Color.FromRGBAByte(0x1E, 0x90, 0xFF);
|
||||||
Firebrick = Color.FromRGBAByte(0xB2, 0x22, 0x22);
|
Firebrick = Color.FromRGBAByte(0xB2, 0x22, 0x22);
|
||||||
FloralWhite = Color.FromRGBAByte(0xFF, 0xFA, 0xF0);
|
FloralWhite = Color.FromRGBAByte(0xFF, 0xFA, 0xF0);
|
||||||
ForestGreen = Color.FromRGBAByte(0x22, 0x8B, 0x22);
|
ForestGreen = Color.FromRGBAByte(0x22, 0x8B, 0x22);
|
||||||
Gainsboro = Color.FromRGBAByte(0xDC, 0xDC, 0xDC);
|
Gainsboro = Color.FromRGBAByte(0xDC, 0xDC, 0xDC);
|
||||||
GhostWhite = Color.FromRGBAByte(0xF8, 0xF8, 0xFF);
|
GhostWhite = Color.FromRGBAByte(0xF8, 0xF8, 0xFF);
|
||||||
Gold = Color.FromRGBAByte(0xFF, 0xD7, 0x00);
|
Gold = Color.FromRGBAByte(0xFF, 0xD7, 0x00);
|
||||||
Goldenrod = Color.FromRGBAByte(0xDA, 0xA5, 0x20);
|
Goldenrod = Color.FromRGBAByte(0xDA, 0xA5, 0x20);
|
||||||
GreenYellow = Color.FromRGBAByte(0xAD, 0xFF, 0x2F);
|
GreenYellow = Color.FromRGBAByte(0xAD, 0xFF, 0x2F);
|
||||||
Honeydew = Color.FromRGBAByte(0xF0, 0xFF, 0xF0);
|
Honeydew = Color.FromRGBAByte(0xF0, 0xFF, 0xF0);
|
||||||
HotPink = Color.FromRGBAByte(0xFF, 0x69, 0xB4);
|
HotPink = Color.FromRGBAByte(0xFF, 0x69, 0xB4);
|
||||||
IndianRed = Color.FromRGBAByte(0xCD, 0x5C, 0x5C);
|
IndianRed = Color.FromRGBAByte(0xCD, 0x5C, 0x5C);
|
||||||
Indigo = Color.FromRGBAByte(0x4B, 0x00, 0x82);
|
Indigo = Color.FromRGBAByte(0x4B, 0x00, 0x82);
|
||||||
Ivory = Color.FromRGBAByte(0xFF, 0xFF, 0xF0);
|
Ivory = Color.FromRGBAByte(0xFF, 0xFF, 0xF0);
|
||||||
Khaki = Color.FromRGBAByte(0xF0, 0xE6, 0x8C);
|
Khaki = Color.FromRGBAByte(0xF0, 0xE6, 0x8C);
|
||||||
Lavender = Color.FromRGBAByte(0xE6, 0xE6, 0xFA);
|
Lavender = Color.FromRGBAByte(0xE6, 0xE6, 0xFA);
|
||||||
LavenderBlush = Color.FromRGBAByte(0xFF, 0xF0, 0xF5);
|
LavenderBlush = Color.FromRGBAByte(0xFF, 0xF0, 0xF5);
|
||||||
LawnGreen = Color.FromRGBAByte(0x7C, 0xFC, 0x00);
|
LawnGreen = Color.FromRGBAByte(0x7C, 0xFC, 0x00);
|
||||||
LemonChiffon = Color.FromRGBAByte(0xFF, 0xFA, 0xCD);
|
LemonChiffon = Color.FromRGBAByte(0xFF, 0xFA, 0xCD);
|
||||||
LightBlue = Color.FromRGBAByte(0xAD, 0xD8, 0xE6);
|
LightBlue = Color.FromRGBAByte(0xAD, 0xD8, 0xE6);
|
||||||
LightCoral = Color.FromRGBAByte(0xF0, 0x80, 0x80);
|
LightCoral = Color.FromRGBAByte(0xF0, 0x80, 0x80);
|
||||||
LightCyan = Color.FromRGBAByte(0xE0, 0xFF, 0xFF);
|
LightCyan = Color.FromRGBAByte(0xE0, 0xFF, 0xFF);
|
||||||
LightGoldenrodYellow = Color.FromRGBAByte(0xFA, 0xFA, 0xD2);
|
LightGoldenrodYellow = Color.FromRGBAByte(0xFA, 0xFA, 0xD2);
|
||||||
LightGreen = Color.FromRGBAByte(0x90, 0xEE, 0x90);
|
LightGreen = Color.FromRGBAByte(0x90, 0xEE, 0x90);
|
||||||
LightGray = Color.FromRGBAByte(0xD3, 0xD3, 0xD3);
|
LightGray = Color.FromRGBAByte(0xD3, 0xD3, 0xD3);
|
||||||
LightPink = Color.FromRGBAByte(0xFF, 0xB6, 0xC1);
|
LightPink = Color.FromRGBAByte(0xFF, 0xB6, 0xC1);
|
||||||
LightSalmon = Color.FromRGBAByte(0xFF, 0xA0, 0x7A);
|
LightSalmon = Color.FromRGBAByte(0xFF, 0xA0, 0x7A);
|
||||||
LightSeaGreen = Color.FromRGBAByte(0x20, 0xB2, 0xAA);
|
LightSeaGreen = Color.FromRGBAByte(0x20, 0xB2, 0xAA);
|
||||||
LightSkyBlue = Color.FromRGBAByte(0x87, 0xCE, 0xFA);
|
LightSkyBlue = Color.FromRGBAByte(0x87, 0xCE, 0xFA);
|
||||||
LightSlateGray = Color.FromRGBAByte(0x77, 0x88, 0x99);
|
LightSlateGray = Color.FromRGBAByte(0x77, 0x88, 0x99);
|
||||||
LightSteelBlue = Color.FromRGBAByte(0xB0, 0xC4, 0xDE);
|
LightSteelBlue = Color.FromRGBAByte(0xB0, 0xC4, 0xDE);
|
||||||
LightYellow = Color.FromRGBAByte(0xFF, 0xFF, 0xE0);
|
LightYellow = Color.FromRGBAByte(0xFF, 0xFF, 0xE0);
|
||||||
LimeGreen = Color.FromRGBAByte(0x32, 0xCD, 0x32);
|
LimeGreen = Color.FromRGBAByte(0x32, 0xCD, 0x32);
|
||||||
|
|
||||||
Linen = Color.FromRGBAByte(0xFA, 0xF0, 0xE6);
|
Linen = Color.FromRGBAByte(0xFA, 0xF0, 0xE6);
|
||||||
Magenta = Color.FromRGBAByte(0xFF, 0x00, 0xFF);
|
Magenta = Color.FromRGBAByte(0xFF, 0x00, 0xFF);
|
||||||
MediumAquamarine = Color.FromRGBAByte(0x66, 0xCD, 0xAA);
|
MediumAquamarine = Color.FromRGBAByte(0x66, 0xCD, 0xAA);
|
||||||
MediumBlue = Color.FromRGBAByte(0x00, 0x00, 0xCD);
|
MediumBlue = Color.FromRGBAByte(0x00, 0x00, 0xCD);
|
||||||
MediumOrchid = Color.FromRGBAByte(0xBA, 0x55, 0xD3);
|
MediumOrchid = Color.FromRGBAByte(0xBA, 0x55, 0xD3);
|
||||||
MediumPurple = Color.FromRGBAByte(0x93, 0x70, 0xDB);
|
MediumPurple = Color.FromRGBAByte(0x93, 0x70, 0xDB);
|
||||||
MediumSeaGreen = Color.FromRGBAByte(0x3C, 0xB3, 0x71);
|
MediumSeaGreen = Color.FromRGBAByte(0x3C, 0xB3, 0x71);
|
||||||
MediumSlateBlue = Color.FromRGBAByte(0x7B, 0x68, 0xEE);
|
MediumSlateBlue = Color.FromRGBAByte(0x7B, 0x68, 0xEE);
|
||||||
MediumSpringGreen = Color.FromRGBAByte(0x00, 0xFA, 0x9A);
|
MediumSpringGreen = Color.FromRGBAByte(0x00, 0xFA, 0x9A);
|
||||||
MediumTurquoise = Color.FromRGBAByte(0x48, 0xD1, 0xCC);
|
MediumTurquoise = Color.FromRGBAByte(0x48, 0xD1, 0xCC);
|
||||||
MediumVioletRed = Color.FromRGBAByte(0xC7, 0x15, 0x85);
|
MediumVioletRed = Color.FromRGBAByte(0xC7, 0x15, 0x85);
|
||||||
MidnightBlue = Color.FromRGBAByte(0x19, 0x19, 0x70);
|
MidnightBlue = Color.FromRGBAByte(0x19, 0x19, 0x70);
|
||||||
MintCream = Color.FromRGBAByte(0xF5, 0xFF, 0xFA);
|
MintCream = Color.FromRGBAByte(0xF5, 0xFF, 0xFA);
|
||||||
MistyRose = Color.FromRGBAByte(0xFF, 0xE4, 0xE1);
|
MistyRose = Color.FromRGBAByte(0xFF, 0xE4, 0xE1);
|
||||||
Moccasin = Color.FromRGBAByte(0xFF, 0xE4, 0xB5);
|
Moccasin = Color.FromRGBAByte(0xFF, 0xE4, 0xB5);
|
||||||
NavajoWhite = Color.FromRGBAByte(0xFF, 0xDE, 0xAD);
|
NavajoWhite = Color.FromRGBAByte(0xFF, 0xDE, 0xAD);
|
||||||
OldLace = Color.FromRGBAByte(0xFD, 0xF5, 0xE6);
|
OldLace = Color.FromRGBAByte(0xFD, 0xF5, 0xE6);
|
||||||
OliveDrab = Color.FromRGBAByte(0x6B, 0x8E, 0x23);
|
OliveDrab = Color.FromRGBAByte(0x6B, 0x8E, 0x23);
|
||||||
Orange = Color.FromRGBAByte(0xFF, 0xA5, 0x00);
|
Orange = Color.FromRGBAByte(0xFF, 0xA5, 0x00);
|
||||||
OrangeRed = Color.FromRGBAByte(0xFF, 0x45, 0x00);
|
OrangeRed = Color.FromRGBAByte(0xFF, 0x45, 0x00);
|
||||||
Orchid = Color.FromRGBAByte(0xDA, 0x70, 0xD6);
|
Orchid = Color.FromRGBAByte(0xDA, 0x70, 0xD6);
|
||||||
PaleGoldenrod = Color.FromRGBAByte(0xEE, 0xE8, 0xAA);
|
PaleGoldenrod = Color.FromRGBAByte(0xEE, 0xE8, 0xAA);
|
||||||
PaleTurquoise = Color.FromRGBAByte(0xAF, 0xEE, 0xEE);
|
PaleTurquoise = Color.FromRGBAByte(0xAF, 0xEE, 0xEE);
|
||||||
PaleVioletRed = Color.FromRGBAByte(0xDB, 0x70, 0x93);
|
PaleVioletRed = Color.FromRGBAByte(0xDB, 0x70, 0x93);
|
||||||
PapayaWhip = Color.FromRGBAByte(0xFF, 0xEF, 0xD5);
|
PapayaWhip = Color.FromRGBAByte(0xFF, 0xEF, 0xD5);
|
||||||
PeachPuff = Color.FromRGBAByte(0xFF, 0xDA, 0xB9);
|
PeachPuff = Color.FromRGBAByte(0xFF, 0xDA, 0xB9);
|
||||||
Peru = Color.FromRGBAByte(0xCD, 0x85, 0x3F);
|
Peru = Color.FromRGBAByte(0xCD, 0x85, 0x3F);
|
||||||
Pink = Color.FromRGBAByte(0xFF, 0xC0, 0xCB);
|
Pink = Color.FromRGBAByte(0xFF, 0xC0, 0xCB);
|
||||||
Plum = Color.FromRGBAByte(0xDD, 0xA0, 0xDD);
|
Plum = Color.FromRGBAByte(0xDD, 0xA0, 0xDD);
|
||||||
PowderBlue = Color.FromRGBAByte(0xB0, 0xE0, 0xE6);
|
PowderBlue = Color.FromRGBAByte(0xB0, 0xE0, 0xE6);
|
||||||
RosyBrown = Color.FromRGBAByte(0xBC, 0x8F, 0x8F);
|
RosyBrown = Color.FromRGBAByte(0xBC, 0x8F, 0x8F);
|
||||||
RoyalBlue = Color.FromRGBAByte(0x41, 0x69, 0xE1);
|
RoyalBlue = Color.FromRGBAByte(0x41, 0x69, 0xE1);
|
||||||
SaddleBrown = Color.FromRGBAByte(0x8B, 0x45, 0x13);
|
SaddleBrown = Color.FromRGBAByte(0x8B, 0x45, 0x13);
|
||||||
Salmon = Color.FromRGBAByte(0xFA, 0x80, 0x72);
|
Salmon = Color.FromRGBAByte(0xFA, 0x80, 0x72);
|
||||||
SandyBrown = Color.FromRGBAByte(0xF4, 0xA4, 0x60);
|
SandyBrown = Color.FromRGBAByte(0xF4, 0xA4, 0x60);
|
||||||
SeaGreen = Color.FromRGBAByte(0x2E, 0x8B, 0x57);
|
SeaGreen = Color.FromRGBAByte(0x2E, 0x8B, 0x57);
|
||||||
|
|
||||||
Seashell = Color.FromRGBAByte(0xFF, 0xF5, 0xEE);
|
Seashell = Color.FromRGBAByte(0xFF, 0xF5, 0xEE);
|
||||||
Sienna = Color.FromRGBAByte(0xA0, 0x52, 0x2D);
|
Sienna = Color.FromRGBAByte(0xA0, 0x52, 0x2D);
|
||||||
SkyBlue = Color.FromRGBAByte(0x87, 0xCE, 0xEB);
|
SkyBlue = Color.FromRGBAByte(0x87, 0xCE, 0xEB);
|
||||||
SlateBlue = Color.FromRGBAByte(0x6A, 0x5A, 0xCD);
|
SlateBlue = Color.FromRGBAByte(0x6A, 0x5A, 0xCD);
|
||||||
SlateGray = Color.FromRGBAByte(0x70, 0x80, 0x90);
|
SlateGray = Color.FromRGBAByte(0x70, 0x80, 0x90);
|
||||||
Snow = Color.FromRGBAByte(0xFF, 0xFA, 0xFA);
|
Snow = Color.FromRGBAByte(0xFF, 0xFA, 0xFA);
|
||||||
SpringGreen = Color.FromRGBAByte(0x00, 0xFF, 0x7F);
|
SpringGreen = Color.FromRGBAByte(0x00, 0xFF, 0x7F);
|
||||||
SteelBlue = Color.FromRGBAByte(0x46, 0x82, 0xB4);
|
SteelBlue = Color.FromRGBAByte(0x46, 0x82, 0xB4);
|
||||||
|
|
||||||
Tan = Color.FromRGBAByte(0xD2, 0xB4, 0x8C);
|
Tan = Color.FromRGBAByte(0xD2, 0xB4, 0x8C);
|
||||||
Thistle = Color.FromRGBAByte(0xD8, 0xBF, 0xD8);
|
Thistle = Color.FromRGBAByte(0xD8, 0xBF, 0xD8);
|
||||||
Tomato = Color.FromRGBAByte(0xFF, 0x63, 0x47);
|
Tomato = Color.FromRGBAByte(0xFF, 0x63, 0x47);
|
||||||
Transparent = Color.FromRGBAByte(0x00, 0x00, 0x00, 0x00);
|
Transparent = Color.FromRGBAByte(0x00, 0x00, 0x00, 0x00);
|
||||||
Turquoise = Color.FromRGBAByte(0x40, 0xE0, 0xD0);
|
Turquoise = Color.FromRGBAByte(0x40, 0xE0, 0xD0);
|
||||||
Violet = Color.FromRGBAByte(0xEE, 0x82, 0xEE);
|
Violet = Color.FromRGBAByte(0xEE, 0x82, 0xEE);
|
||||||
Wheat = Color.FromRGBAByte(0xF5, 0xDE, 0xB3);
|
Wheat = Color.FromRGBAByte(0xF5, 0xDE, 0xB3);
|
||||||
WhiteSmoke = Color.FromRGBAByte(0xF5, 0xF5, 0xF5);
|
WhiteSmoke = Color.FromRGBAByte(0xF5, 0xF5, 0xF5);
|
||||||
YellowGreen = Color.FromRGBAByte(0x9A, 0xCD, 0x32);
|
YellowGreen = Color.FromRGBAByte(0x9A, 0xCD, 0x32);
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTML Standard Colors
|
// HTML Standard Colors
|
||||||
public static Color Aqua { get; private set; }
|
public static Color Aqua { get; private set; }
|
||||||
public static Color Black { get; private set; }
|
public static Color Black { get; private set; }
|
||||||
public static Color Blue { get; private set; }
|
public static Color Blue { get; private set; }
|
||||||
public static Color Fuchsia { get; private set; }
|
public static Color Fuchsia { get; private set; }
|
||||||
public static Color Gray { get; private set; }
|
public static Color Gray { get; private set; }
|
||||||
public static Color Green { get; private set; }
|
public static Color Green { get; private set; }
|
||||||
public static Color Lime { get; private set; }
|
public static Color Lime { get; private set; }
|
||||||
public static Color Maroon { get; private set; }
|
public static Color Maroon { get; private set; }
|
||||||
public static Color Navy { get; private set; }
|
public static Color Navy { get; private set; }
|
||||||
public static Color Olive { get; private set; }
|
public static Color Olive { get; private set; }
|
||||||
public static Color Purple { get; private set; }
|
public static Color Purple { get; private set; }
|
||||||
public static Color Red { get; private set; }
|
public static Color Red { get; private set; }
|
||||||
public static Color Silver { get; private set; }
|
public static Color Silver { get; private set; }
|
||||||
public static Color Teal { get; private set; }
|
public static Color Teal { get; private set; }
|
||||||
public static Color Yellow { get; private set; }
|
public static Color Yellow { get; private set; }
|
||||||
public static Color White { get; private set; }
|
public static Color White { get; private set; }
|
||||||
|
|
||||||
// HTML Extended Colors
|
// HTML Extended Colors
|
||||||
|
|
||||||
public static Color AliceBlue { get; private set; }
|
public static Color AliceBlue { get; private set; }
|
||||||
public static Color AntiqueWhite { get; private set; }
|
public static Color AntiqueWhite { get; private set; }
|
||||||
public static Color Aquamarine { get; private set; }
|
public static Color Aquamarine { get; private set; }
|
||||||
public static Color Azure { get; private set; }
|
public static Color Azure { get; private set; }
|
||||||
public static Color Beige { get; private set; }
|
public static Color Beige { get; private set; }
|
||||||
public static Color Bisque { get; private set; }
|
public static Color Bisque { get; private set; }
|
||||||
public static Color BlanchedAlmond { get; private set; }
|
public static Color BlanchedAlmond { get; private set; }
|
||||||
public static Color BlueViolet { get; private set; }
|
public static Color BlueViolet { get; private set; }
|
||||||
public static Color Brown { get; private set; }
|
public static Color Brown { get; private set; }
|
||||||
public static Color BurlyWood { get; private set; }
|
public static Color BurlyWood { get; private set; }
|
||||||
public static Color CadetBlue { get; private set; }
|
public static Color CadetBlue { get; private set; }
|
||||||
public static Color Chartreuse { get; private set; }
|
public static Color Chartreuse { get; private set; }
|
||||||
public static Color Chocolate { get; private set; }
|
public static Color Chocolate { get; private set; }
|
||||||
public static Color Coral { get; private set; }
|
public static Color Coral { get; private set; }
|
||||||
public static Color CornflowerBlue { get; private set; }
|
public static Color CornflowerBlue { get; private set; }
|
||||||
public static Color Cornsilk { get; private set; }
|
public static Color Cornsilk { get; private set; }
|
||||||
public static Color Crimson { get; private set; }
|
public static Color Crimson { get; private set; }
|
||||||
public static Color Cyan { get; private set; }
|
public static Color Cyan { get; private set; }
|
||||||
public static Color DarkBlue { get; private set; }
|
public static Color DarkBlue { get; private set; }
|
||||||
public static Color DarkCyan { get; private set; }
|
public static Color DarkCyan { get; private set; }
|
||||||
public static Color DarkGoldenrod { get; private set; }
|
public static Color DarkGoldenrod { get; private set; }
|
||||||
public static Color DarkGray { get; private set; }
|
public static Color DarkGray { get; private set; }
|
||||||
public static Color DarkGreen { get; private set; }
|
public static Color DarkGreen { get; private set; }
|
||||||
public static Color DarkKhaki { get; private set; }
|
public static Color DarkKhaki { get; private set; }
|
||||||
public static Color DarkMagenta { get; private set; }
|
public static Color DarkMagenta { get; private set; }
|
||||||
public static Color DarkOliveGreen { get; private set; }
|
public static Color DarkOliveGreen { get; private set; }
|
||||||
public static Color DarkOrange { get; private set; }
|
public static Color DarkOrange { get; private set; }
|
||||||
public static Color DarkOrchid { get; private set; }
|
public static Color DarkOrchid { get; private set; }
|
||||||
public static Color DarkRed { get; private set; }
|
public static Color DarkRed { get; private set; }
|
||||||
public static Color DarkSalmon { get; private set; }
|
public static Color DarkSalmon { get; private set; }
|
||||||
public static Color DarkSeaGreen { get; private set; }
|
public static Color DarkSeaGreen { get; private set; }
|
||||||
public static Color DarkSlateBlue { get; private set; }
|
public static Color DarkSlateBlue { get; private set; }
|
||||||
public static Color DarkSlateGray { get; private set; }
|
public static Color DarkSlateGray { get; private set; }
|
||||||
public static Color DarkTurquoise { get; private set; }
|
public static Color DarkTurquoise { get; private set; }
|
||||||
|
|
||||||
public static Color DarkViolet { get; private set; }
|
public static Color DarkViolet { get; private set; }
|
||||||
public static Color DeepPink { get; private set; }
|
public static Color DeepPink { get; private set; }
|
||||||
public static Color DeepSkyBlue { get; private set; }
|
public static Color DeepSkyBlue { get; private set; }
|
||||||
public static Color DimGray { get; private set; }
|
public static Color DimGray { get; private set; }
|
||||||
public static Color DodgerBlue { get; private set; }
|
public static Color DodgerBlue { get; private set; }
|
||||||
public static Color Firebrick { get; private set; }
|
public static Color Firebrick { get; private set; }
|
||||||
public static Color FloralWhite { get; private set; }
|
public static Color FloralWhite { get; private set; }
|
||||||
public static Color ForestGreen { get; private set; }
|
public static Color ForestGreen { get; private set; }
|
||||||
public static Color Gainsboro { get; private set; }
|
public static Color Gainsboro { get; private set; }
|
||||||
public static Color GhostWhite { get; private set; }
|
public static Color GhostWhite { get; private set; }
|
||||||
public static Color Gold { get; private set; }
|
public static Color Gold { get; private set; }
|
||||||
public static Color Goldenrod { get; private set; }
|
public static Color Goldenrod { get; private set; }
|
||||||
public static Color GreenYellow { get; private set; }
|
public static Color GreenYellow { get; private set; }
|
||||||
public static Color Honeydew { get; private set; }
|
public static Color Honeydew { get; private set; }
|
||||||
public static Color HotPink { get; private set; }
|
public static Color HotPink { get; private set; }
|
||||||
public static Color IndianRed { get; private set; }
|
public static Color IndianRed { get; private set; }
|
||||||
public static Color Indigo { get; private set; }
|
public static Color Indigo { get; private set; }
|
||||||
public static Color Ivory { get; private set; }
|
public static Color Ivory { get; private set; }
|
||||||
public static Color Khaki { get; private set; }
|
public static Color Khaki { get; private set; }
|
||||||
public static Color Lavender { get; private set; }
|
public static Color Lavender { get; private set; }
|
||||||
public static Color LavenderBlush { get; private set; }
|
public static Color LavenderBlush { get; private set; }
|
||||||
public static Color LawnGreen { get; private set; }
|
public static Color LawnGreen { get; private set; }
|
||||||
public static Color LemonChiffon { get; private set; }
|
public static Color LemonChiffon { get; private set; }
|
||||||
public static Color LightBlue { get; private set; }
|
public static Color LightBlue { get; private set; }
|
||||||
public static Color LightCoral { get; private set; }
|
public static Color LightCoral { get; private set; }
|
||||||
public static Color LightCyan { get; private set; }
|
public static Color LightCyan { get; private set; }
|
||||||
public static Color LightGoldenrodYellow { get; private set; }
|
public static Color LightGoldenrodYellow { get; private set; }
|
||||||
public static Color LightGreen { get; private set; }
|
public static Color LightGreen { get; private set; }
|
||||||
public static Color LightGray { get; private set; }
|
public static Color LightGray { get; private set; }
|
||||||
public static Color LightPink { get; private set; }
|
public static Color LightPink { get; private set; }
|
||||||
public static Color LightSalmon { get; private set; }
|
public static Color LightSalmon { get; private set; }
|
||||||
public static Color LightSeaGreen { get; private set; }
|
public static Color LightSeaGreen { get; private set; }
|
||||||
public static Color LightSkyBlue { get; private set; }
|
public static Color LightSkyBlue { get; private set; }
|
||||||
public static Color LightSlateGray { get; private set; }
|
public static Color LightSlateGray { get; private set; }
|
||||||
public static Color LightSteelBlue { get; private set; }
|
public static Color LightSteelBlue { get; private set; }
|
||||||
public static Color LightYellow { get; private set; }
|
public static Color LightYellow { get; private set; }
|
||||||
public static Color LimeGreen { get; private set; }
|
public static Color LimeGreen { get; private set; }
|
||||||
|
|
||||||
public static Color Linen { get; private set; }
|
public static Color Linen { get; private set; }
|
||||||
public static Color Magenta { get; private set; }
|
public static Color Magenta { get; private set; }
|
||||||
public static Color MediumAquamarine { get; private set; }
|
public static Color MediumAquamarine { get; private set; }
|
||||||
public static Color MediumBlue { get; private set; }
|
public static Color MediumBlue { get; private set; }
|
||||||
public static Color MediumOrchid { get; private set; }
|
public static Color MediumOrchid { get; private set; }
|
||||||
public static Color MediumPurple { get; private set; }
|
public static Color MediumPurple { get; private set; }
|
||||||
public static Color MediumSeaGreen { get; private set; }
|
public static Color MediumSeaGreen { get; private set; }
|
||||||
public static Color MediumSlateBlue { get; private set; }
|
public static Color MediumSlateBlue { get; private set; }
|
||||||
public static Color MediumSpringGreen { get; private set; }
|
public static Color MediumSpringGreen { get; private set; }
|
||||||
public static Color MediumTurquoise { get; private set; }
|
public static Color MediumTurquoise { get; private set; }
|
||||||
public static Color MediumVioletRed { get; private set; }
|
public static Color MediumVioletRed { get; private set; }
|
||||||
public static Color MidnightBlue { get; private set; }
|
public static Color MidnightBlue { get; private set; }
|
||||||
public static Color MintCream { get; private set; }
|
public static Color MintCream { get; private set; }
|
||||||
public static Color MistyRose { get; private set; }
|
public static Color MistyRose { get; private set; }
|
||||||
public static Color Moccasin { get; private set; }
|
public static Color Moccasin { get; private set; }
|
||||||
public static Color NavajoWhite { get; private set; }
|
public static Color NavajoWhite { get; private set; }
|
||||||
public static Color OldLace { get; private set; }
|
public static Color OldLace { get; private set; }
|
||||||
public static Color OliveDrab { get; private set; }
|
public static Color OliveDrab { get; private set; }
|
||||||
public static Color Orange { get; private set; }
|
public static Color Orange { get; private set; }
|
||||||
public static Color OrangeRed { get; private set; }
|
public static Color OrangeRed { get; private set; }
|
||||||
public static Color Orchid { get; private set; }
|
public static Color Orchid { get; private set; }
|
||||||
public static Color PaleGoldenrod { get; private set; }
|
public static Color PaleGoldenrod { get; private set; }
|
||||||
public static Color PaleTurquoise { get; private set; }
|
public static Color PaleTurquoise { get; private set; }
|
||||||
public static Color PaleVioletRed { get; private set; }
|
public static Color PaleVioletRed { get; private set; }
|
||||||
public static Color PapayaWhip { get; private set; }
|
public static Color PapayaWhip { get; private set; }
|
||||||
public static Color PeachPuff { get; private set; }
|
public static Color PeachPuff { get; private set; }
|
||||||
public static Color Peru { get; private set; }
|
public static Color Peru { get; private set; }
|
||||||
public static Color Pink { get; private set; }
|
public static Color Pink { get; private set; }
|
||||||
public static Color Plum { get; private set; }
|
public static Color Plum { get; private set; }
|
||||||
public static Color PowderBlue { get; private set; }
|
public static Color PowderBlue { get; private set; }
|
||||||
public static Color RosyBrown { get; private set; }
|
public static Color RosyBrown { get; private set; }
|
||||||
public static Color RoyalBlue { get; private set; }
|
public static Color RoyalBlue { get; private set; }
|
||||||
public static Color SaddleBrown { get; private set; }
|
public static Color SaddleBrown { get; private set; }
|
||||||
public static Color Salmon { get; private set; }
|
public static Color Salmon { get; private set; }
|
||||||
public static Color SandyBrown { get; private set; }
|
public static Color SandyBrown { get; private set; }
|
||||||
public static Color SeaGreen { get; private set; }
|
public static Color SeaGreen { get; private set; }
|
||||||
|
|
||||||
public static Color Seashell { get; private set; }
|
public static Color Seashell { get; private set; }
|
||||||
public static Color Sienna { get; private set; }
|
public static Color Sienna { get; private set; }
|
||||||
public static Color SkyBlue { get; private set; }
|
public static Color SkyBlue { get; private set; }
|
||||||
public static Color SlateBlue { get; private set; }
|
public static Color SlateBlue { get; private set; }
|
||||||
public static Color SlateGray { get; private set; }
|
public static Color SlateGray { get; private set; }
|
||||||
public static Color Snow { get; private set; }
|
public static Color Snow { get; private set; }
|
||||||
public static Color SpringGreen { get; private set; }
|
public static Color SpringGreen { get; private set; }
|
||||||
public static Color SteelBlue { get; private set; }
|
public static Color SteelBlue { get; private set; }
|
||||||
|
|
||||||
public static Color Tan { get; private set; }
|
public static Color Tan { get; private set; }
|
||||||
public static Color Thistle { get; private set; }
|
public static Color Thistle { get; private set; }
|
||||||
public static Color Tomato { get; private set; }
|
public static Color Tomato { get; private set; }
|
||||||
public static Color Transparent { get; private set; }
|
public static Color Transparent { get; private set; }
|
||||||
public static Color Turquoise { get; private set; }
|
public static Color Turquoise { get; private set; }
|
||||||
public static Color Violet { get; private set; }
|
public static Color Violet { get; private set; }
|
||||||
public static Color Wheat { get; private set; }
|
public static Color Wheat { get; private set; }
|
||||||
public static Color WhiteSmoke { get; private set; }
|
public static Color WhiteSmoke { get; private set; }
|
||||||
public static Color YellowGreen { get; private set; }
|
public static Color YellowGreen { get; private set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,43 +27,40 @@ namespace MBS.Framework.Drawing
|
|||||||
/// Represents a tuple of a numeric value and a unit of measure.
|
/// Represents a tuple of a numeric value and a unit of measure.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public struct Measurement
|
public struct Measurement
|
||||||
{
|
{
|
||||||
public static readonly Measurement Empty;
|
public static readonly Measurement Empty;
|
||||||
|
|
||||||
public Measurement(double value, MeasurementUnit unit)
|
public Measurement(double value, MeasurementUnit unit)
|
||||||
{
|
{
|
||||||
mvarUnit = unit;
|
Unit = unit;
|
||||||
mvarValue = value;
|
Value = value;
|
||||||
mvarIsFull = true;
|
mvarIsFull = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private double mvarValue;
|
public double Value { get; set; }
|
||||||
public double Value { get { return mvarValue; } set { mvarValue = value; } }
|
public MeasurementUnit Unit { get; set; }
|
||||||
|
|
||||||
private MeasurementUnit mvarUnit;
|
private bool mvarIsFull;
|
||||||
public MeasurementUnit Unit { get { return mvarUnit; } set { mvarUnit = value; } }
|
public bool IsEmpty { get { return !mvarIsFull; } }
|
||||||
|
|
||||||
private bool mvarIsFull;
|
|
||||||
public bool IsEmpty { get { return !mvarIsFull; } }
|
|
||||||
|
|
||||||
public static Measurement Parse(string value)
|
public static Measurement Parse(string value)
|
||||||
{
|
{
|
||||||
DoubleStringSplitterResult dssr = NumericStringSplitter.SplitDoubleStringParts(value);
|
DoubleStringSplitterResult dssr = NumericStringSplitter.SplitDoubleStringParts(value);
|
||||||
double val = dssr.DoublePart;
|
double val = dssr.DoublePart;
|
||||||
MeasurementUnit unit;
|
MeasurementUnit unit;
|
||||||
switch (dssr.StringPart.ToLower())
|
switch (dssr.StringPart.ToLower())
|
||||||
{
|
{
|
||||||
case "cm": unit = MeasurementUnit.Cm; break;
|
case "cm": unit = MeasurementUnit.Cm; break;
|
||||||
case "em": unit = MeasurementUnit.Em; break;
|
case "em": unit = MeasurementUnit.Em; break;
|
||||||
case "ex": unit = MeasurementUnit.Ex; break;
|
case "ex": unit = MeasurementUnit.Ex; break;
|
||||||
case "in": unit = MeasurementUnit.Inch; break;
|
case "in": unit = MeasurementUnit.Inch; break;
|
||||||
case "mm": unit = MeasurementUnit.Mm; break;
|
case "mm": unit = MeasurementUnit.Mm; break;
|
||||||
case "%": unit = MeasurementUnit.Percentage; break;
|
case "%": unit = MeasurementUnit.Percentage; break;
|
||||||
case "pc": unit = MeasurementUnit.Pica; break;
|
case "pc": unit = MeasurementUnit.Pica; break;
|
||||||
case "px": unit = MeasurementUnit.Pixel; break;
|
case "px": unit = MeasurementUnit.Pixel; break;
|
||||||
case "pt": unit = MeasurementUnit.Point; break;
|
case "pt": unit = MeasurementUnit.Point; break;
|
||||||
default: unit = MeasurementUnit.Pixel; break;
|
default: unit = MeasurementUnit.Pixel; break;
|
||||||
}
|
}
|
||||||
return new Measurement(val, unit);
|
return new Measurement(val, unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,9 +121,9 @@ namespace MBS.Framework.Drawing
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MeasurementUnit.Em:
|
case MeasurementUnit.Em:
|
||||||
break;
|
break;
|
||||||
case MeasurementUnit.Ex:
|
case MeasurementUnit.Ex:
|
||||||
break;
|
break;
|
||||||
case MeasurementUnit.Inch:
|
case MeasurementUnit.Inch:
|
||||||
{
|
{
|
||||||
switch (unit2)
|
switch (unit2)
|
||||||
|
|||||||
@ -25,24 +25,24 @@ namespace MBS.Framework.Drawing
|
|||||||
/// Indicates the unit of a <see cref="Measurement" />.
|
/// Indicates the unit of a <see cref="Measurement" />.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum MeasurementUnit
|
public enum MeasurementUnit
|
||||||
{
|
{
|
||||||
/// <summary>Measurement is in pixels.</summary>
|
/// <summary>Measurement is in pixels.</summary>
|
||||||
Pixel = 1,
|
Pixel = 1,
|
||||||
/// <summary>Measurement is in points. A point represents 1/72 of an inch.</summary>
|
/// <summary>Measurement is in points. A point represents 1/72 of an inch.</summary>
|
||||||
Point,
|
Point,
|
||||||
/// <summary>Measurement is in picas. A pica represents 12 points.</summary>
|
/// <summary>Measurement is in picas. A pica represents 12 points.</summary>
|
||||||
Pica,
|
Pica,
|
||||||
/// <summary>Measurement is in inches.</summary>
|
/// <summary>Measurement is in inches.</summary>
|
||||||
Inch,
|
Inch,
|
||||||
/// <summary>Measurement is in millimeters.</summary>
|
/// <summary>Measurement is in millimeters.</summary>
|
||||||
Mm,
|
Mm,
|
||||||
/// <summary>Measurement is in centimeters.</summary>
|
/// <summary>Measurement is in centimeters.</summary>
|
||||||
Cm,
|
Cm,
|
||||||
/// <summary>Measurement is a percentage relative to the parent element.</summary>
|
/// <summary>Measurement is a percentage relative to the parent element.</summary>
|
||||||
Percentage,
|
Percentage,
|
||||||
/// <summary>Measurement is relative to the height of the parent element's font.</summary>
|
/// <summary>Measurement is relative to the height of the parent element's font.</summary>
|
||||||
Em,
|
Em,
|
||||||
/// <summary>Measurement is relative to the height of the lowercase letter x of the parent element's font.</summary>
|
/// <summary>Measurement is relative to the height of the lowercase letter x of the parent element's font.</summary>
|
||||||
Ex
|
Ex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,4 +59,4 @@ namespace MBS.Framework
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,4 +106,4 @@ namespace MBS.Framework
|
|||||||
return new DoubleStringSplitterResult(realintval, strval);
|
return new DoubleStringSplitterResult(realintval, strval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
// Author:
|
// Author:
|
||||||
// Michael Becker <alcexhim@gmail.com>
|
// Michael Becker <alcexhim@gmail.com>
|
||||||
//
|
//
|
||||||
// Copyright (c) 2019
|
// Copyright (c) 2019
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
@ -22,7 +22,7 @@ using System;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
// Information about this assembly is defined by the following attributes.
|
// Information about this assembly is defined by the following attributes.
|
||||||
// Change them to the values specific to your project.
|
// Change them to the values specific to your project.
|
||||||
|
|
||||||
[assembly: AssemblyTitle("MBS.Framework")]
|
[assembly: AssemblyTitle("MBS.Framework")]
|
||||||
@ -40,9 +40,9 @@ using System.Runtime.CompilerServices;
|
|||||||
|
|
||||||
[assembly: AssemblyVersion("4.0.2020.08")]
|
[assembly: AssemblyVersion("4.0.2020.08")]
|
||||||
|
|
||||||
// The following attributes are used to specify the signing key for the assembly,
|
// The following attributes are used to specify the signing key for the assembly,
|
||||||
// if desired. See the Mono documentation for more information about signing.
|
// if desired. See the Mono documentation for more information about signing.
|
||||||
|
|
||||||
//[assembly: AssemblyDelaySign(false)]
|
//[assembly: AssemblyDelaySign(false)]
|
||||||
//[assembly: AssemblyKeyFile("")]
|
//[assembly: AssemblyKeyFile("")]
|
||||||
[assembly: CLSCompliant(true)]
|
[assembly: CLSCompliant(true)]
|
||||||
|
|||||||
@ -153,4 +153,3 @@ namespace MBS.Framework
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -152,4 +152,3 @@ namespace MBS.Framework
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -78,4 +78,3 @@ namespace MBS.Framework
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ namespace MBS.Framework
|
|||||||
Cut,
|
Cut,
|
||||||
Delete,
|
Delete,
|
||||||
DialogAuthentication, // not for buttons
|
DialogAuthentication, // not for buttons
|
||||||
DialogInfo,
|
DialogInfo,
|
||||||
DialogWarning,
|
DialogWarning,
|
||||||
DialogError,
|
DialogError,
|
||||||
DialogQuestion,
|
DialogQuestion,
|
||||||
@ -119,4 +119,3 @@ namespace MBS.Framework
|
|||||||
ZoomOut
|
ZoomOut
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user