This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@@ -82,6 +83,32 @@ namespace VEPROMS.CSLA.Library
|
||||
OnPropertyChanged("Printing_Length");
|
||||
}
|
||||
}
|
||||
[Category("Printing")]
|
||||
[DisplayName("Color")]
|
||||
[Description("Color of Document Text")]
|
||||
public Color Printing_Color
|
||||
{
|
||||
get
|
||||
{
|
||||
string sColor = _Xp["Printing", "Color"];
|
||||
if (sColor == string.Empty) sColor = "Transparent";
|
||||
if (sColor[0] == '[')
|
||||
{
|
||||
string[] parts = sColor.Substring(1, sColor.Length - 2).Split(",".ToCharArray());
|
||||
return Color.FromArgb(Int32.Parse(parts[0]), Int32.Parse(parts[1]), Int32.Parse(parts[2]));
|
||||
}
|
||||
else return Color.FromName(sColor);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value.IsNamedColor) _Xp["Printing", "Color"] = value.Name;
|
||||
else
|
||||
{
|
||||
_Xp["Printing", "Color"] = string.Format("[{0},{1},{2}]", value.R, value.G, value.B);
|
||||
}
|
||||
OnPropertyChanged("Printing_Color");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region ToString
|
||||
public override string ToString()
|
||||
|
Reference in New Issue
Block a user