Generic Method For Text Library

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
daoa80
Posts: 44
Joined: Fri Aug 10, 2012 8:50 am

Generic Method For Text Library

Post by daoa80 »

In the past, I got a generic method to access or get Tags as seen below,

public GlobalDataItem GetGlobalDataItem(string propertyName)
{
PropertyInfo tagProperty = typeof(Neo.ApplicationFramework.Generated.Tags).GetProperty(propertyName);

if(tagProperty == null)
{
return null;
}
else
{
return tagProperty.GetValue(Globals.Tags, null) as GlobalDataItem;
}
}



Now I want to do the same but this time using the TextLibrary, in where I pass the name of the group so I can do the following comparisoon


for(int m = 0; m < Globals.TextLibrary.XXX.Messages.Count; m++)
{
if((xValue >= Globals.TextLibrary.XXX.Messages[m].StartValue) && (xValue <= Globals.TextLibrary.XXX.Messages[m].EndValue))
{
xMessage = Globals.TextLibrary.XXX.Messages[m].Message;
break;
}
else
{
xMessage = "Unrecognized -" + xValue;
}

}

User avatar
Jae V
Posts: 118
Joined: Wed Jan 15, 2020 11:00 am

Re: Generic Method For Text Library

Post by Jae V »

Hello,
We understand that this is a very old post. If there is anyone who is still experiencing this or similar issues and require assistance, please visit us at https://www.beijerelectronics.us/en-US/ ... ___support or give us call at 801.708.6690. Thank you.
Best regards,
Jason
(801) 708-6690
Technical Support
Contact Us



Beijer Electronics AB
http://www.beijerelectronics.us

Post Reply