Added to the User Interface

Settings for Builders Group Demo
Event handler for Search Results Report and Resolution User Interface
Added code to make DataLoader and PDF generation faster
Added ToolTip Property to ItemInfo
Added code to handle "AND Range" Transitions
Changed comment
Sorts ROs by value
This commit is contained in:
Rich
2010-09-06 19:35:11 +00:00
parent 90a7a6dbc0
commit d0ec2bab6f
10 changed files with 215 additions and 63 deletions

View File

@@ -297,12 +297,36 @@ namespace Volian.Controls.Library
{
tmp = new TreeNode(chld[i].title);
tmp.Tag = chld[i];
tn.Nodes.Add(tmp);
int index = FindIndex(tn.Nodes, tmp.Text);
tn.Nodes.Insert(index,tmp);
}
}
}
ProgressBar_Clear();
}
private int FindIndex(TreeNodeCollection nodes, string value)
{
int index = 0;
foreach (TreeNode node in nodes)
{
if (GreaterValue(node.Text, value)) return index;
index++;
}
return index;
}
private static Regex _RegExGetNumber = new Regex(@"^ *[+-]?[.,0-9]+(E[+-]?[0-9]+)?");
private bool GreaterValue(string value1, string value2)
{
Match match1 = _RegExGetNumber.Match(value1);
Match match2 = _RegExGetNumber.Match(value2);
if (match1.Success && match2.Success) // Compare the numeric value
{
double dbl1 = double.Parse(match1.ToString());
double dbl2 = double.Parse(match2.ToString());
return dbl1 > dbl2;
}
return String.Compare(value1, value2, true) > 0;
}
private void LoadTree()
{
if (_MyROFST == null) return;