B2011-030 - ColorConfig.ColorFromString failed on an empty string.

B2010-004 - AdjustLocation should only be called for Visible StepItems
This commit is contained in:
Rich
2011-01-07 17:04:43 +00:00
parent 75ba1b2b2e
commit 37ffd45792
2 changed files with 14 additions and 10 deletions

View File

@@ -13,6 +13,7 @@ namespace VEPROMS.CSLA.Library
private static Regex byRGB = new Regex(@"[0-9]*,[0-9]*,[0-9]*");
public static Color ColorFromString(string sColor)
{
if (sColor == string.Empty) return Color.Empty;
Match myMatch = byARGB.Match(sColor); // New Format by ARGB
if (myMatch.Groups.Count == 5)
return FindKnownColor(Color.FromArgb(int.Parse(myMatch.Groups[1].Value), int.Parse(myMatch.Groups[2].Value), int.Parse(myMatch.Groups[3].Value), int.Parse(myMatch.Groups[4].Value)));