Hi
I am using following function to read and generate PointSymbolType at runtime.
It works absolutely fine.
private PointSymbolType GetPointSymbolType(string sAccessPointSymbolType)
{
string[] sEnums = sAccessPointSymbolType.Split('.'); //PointSymbolType.Circle
string typeName = sEnums[0];
string enumValue = sEnums[1];
Type type = core.GetType(String.Format("{0}.{1}", nameSpaceForCore, typeName));
PointSymbolType returnType = (PointSymbolType)Enum.Parse(type, enumValue);
return returnType;
}
How do I read and generate TextStyles.City1("LABEL"); at runtime.
I tried following code but not getting any idea how to get right one.
private TextStyle GetTextStyle(string sTextStyleType, string sDisplayColumnName)
{
string[] sEnums = sTextStyleType.Split('.'); //TextStyles.City1("Label");
string typeName = sEnums[0];
string enumValue = sEnums[1];
Type type = core.GetType(String.Format("{0}.{1}", nameSpaceForCore, typeName));
TextStyle returnType = (TextStyle)Enum.Parse(type, enumValue);
return returnType;
}
City1 and Display Column name needs do be read at runtime. As user can change this value
Thanks
Hiren