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)));

View File

@ -1687,20 +1687,23 @@ namespace Volian.Controls.Library
_WatchThis=watchThis;
return;
}
if (RNOBelow) // Adjust substeps first
if (Visible) // Only Adjust Location if StepItem is visible
{
//Console.WriteLine("RNOBelow");
AdjustLocation();
MoveRNO();
}
else // Adjust RNO First
{
if (RNORight)
if (RNOBelow) // Adjust substeps first
{
//Console.WriteLine("RNORight");
//Console.WriteLine("RNOBelow");
AdjustLocation();
MoveRNO();
}
AdjustLocation();
else // Adjust RNO First
{
if (RNORight)
{
//Console.WriteLine("RNORight");
MoveRNO();
}
AdjustLocation();
}
}
Moving = false;
StepItem btm = BottomMostStepItem;