Exemplo n.º 1
0
 public void SetLangObjectValue(Type LangType, WebObject.Base CurrentObject, string PropName, string PropValue)
 {
     foreach (FieldInfo LocalProp in CurrentObject.GetType().GetRuntimeFields())
     {
         if (LocalProp.GetValue(CurrentObject).GetType() == LangType)
         {
             object LangObject = LocalProp.GetValue(CurrentObject);
             foreach (FieldInfo LocalLangProp in LangObject.GetType().GetRuntimeFields())
             {
                 if (LocalLangProp.Name == PropName)
                 {
                     LocalLangProp.SetValue(LangObject, PropValue);
                 }
             }
             LocalProp.SetValue(CurrentObject, LangObject);
         }
     }
 }
Exemplo n.º 2
0
 public string GetLangObjectValue(Type LangType, WebObject.Base CurrentObject, string PropName)
 {
     foreach (FieldInfo LocalProp in CurrentObject.GetType().GetRuntimeFields())
     {
         if (LocalProp.GetValue(CurrentObject).GetType() == LangType)
         {
             object LangObject = LocalProp.GetValue(CurrentObject);
             foreach (FieldInfo LocalLangProp in LangObject.GetType().GetRuntimeFields())
             {
                 if (LocalLangProp.Name == PropName)
                 {
                     LocalLangProp.GetValue(LangObject);
                     return(LocalLangProp.GetValue(LangObject).ToString());
                 }
             }
         }
     }
     return("error");
 }