public void SetAllProp(WebObject.Base MasterObject, List <FieldInfo> PropList) { FieldInfo[] CSSProps = this.GetType().GetFields(); foreach (FieldInfo LocalProp in PropList) { CSSProps[PropList.IndexOf(LocalProp)].SetValue(this, LocalProp.GetValue(MasterObject.CSS)); } }
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); } } }
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"); }
public void SetAllProp(WebObject.Base MasterObject, List <FieldInfo> PropList) { FieldInfo[] HTMLProps = this.GetType().GetFields(); foreach (FieldInfo LocalProp in PropList) { if (LocalProp.Name == "PropertiesValue") { string[] MasterPropValueList = (string[])LocalProp.GetValue(MasterObject.HTML); for (int i = 0; i < MasterPropValueList.Length; i++) { this.PropertiesValue[i] = MasterPropValueList[i]; } } else { HTMLProps[PropList.IndexOf(LocalProp)].SetValue(this, LocalProp.GetValue(MasterObject.HTML)); } } }