Fix incorrect way of checking UI Element names raised in issue #11
This commit is contained in:
Родитель
ffe7b5d536
Коммит
fa5f9c6cfa
|
@ -339,17 +339,16 @@ namespace CosmicCloneUI
|
|||
if (uiElement.GetType().Name == "TextBox")
|
||||
{
|
||||
TextBox tb = (TextBox) uiElement;
|
||||
string name = tb.Name.Substring(0, tb.Name.Length - 1);
|
||||
|
||||
if (name == "Filter")
|
||||
if (tb.Name.StartsWith("Filter"))
|
||||
{
|
||||
sr.FilterCondition = tb.Text.Trim();
|
||||
}
|
||||
else if (name == "ScrubAttribute")
|
||||
else if (tb.Name.StartsWith("ScrubAttribute"))
|
||||
{
|
||||
sr.PropertyName = tb.Text.Trim();
|
||||
}
|
||||
else if (name == "ScrubValue")
|
||||
else if (tb.Name.StartsWith("ScrubValue"))
|
||||
{
|
||||
sr.UpdateValue = tb.Text.Trim();
|
||||
}
|
||||
|
@ -358,8 +357,7 @@ namespace CosmicCloneUI
|
|||
if (uiElement.GetType().Name == "ComboBox")
|
||||
{
|
||||
ComboBox cb = (ComboBox) uiElement;
|
||||
string name = cb.Name.Substring(0, cb.Name.Length - 1);
|
||||
if (name == "ScrubType")
|
||||
if (cb.Name.StartsWith("ScrubType"))
|
||||
{
|
||||
//sr.Type = (RuleType) Enum.Parse(typeof(RuleType), cb.Text);
|
||||
RuleType rType;
|
||||
|
|
Загрузка…
Ссылка в новой задаче