public override void RegisterCallback(string strPropertyName, AFIProperty.PropertyEventHandler handler) { if (mhtProperty.ContainsKey(strPropertyName)) { AFIProperty xProperty = (AFCProperty)mhtProperty[strPropertyName]; xProperty.RegisterCallback(handler); } }
public override AFIDENTID QueryObject(string strName) { AFIProperty xProperty = GetPropertyManager().GetProperty(strName); if (null != xProperty) { return(xProperty.QueryObject()); } return(new AFIDENTID()); }
public override double QueryPropertyDouble(string strPropertyName) { AFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null != property) { return(property.QueryDouble()); } return(0.0); }
public override Int64 QueryPropertyInt(string strPropertyName) { AFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null != property) { return(property.QueryInt()); } return(0); }
public override float QueryPropertyFloat(string strPropertyName) { AFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null != property) { return(property.QueryFloat()); } return(0.0f); }
public override AFIDENTID QueryPropertyObject(string strPropertyName) { AFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null != property) { return(property.QueryObject()); } return(new AFIDENTID()); }
public override string QueryString(string strName) { AFIProperty xProperty = GetPropertyManager().GetProperty(strName); if (null != xProperty) { return(xProperty.QueryString()); } return(""); }
public override string QueryPropertyString(string strPropertyName) { AFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null != property) { return(property.QueryString()); } return(""); }
public override double QueryDouble(string strName) { AFIProperty xProperty = GetPropertyManager().GetProperty(strName); if (null != xProperty) { return(xProperty.QueryDouble()); } return(0f); }
public override float QueryFloat(string strName) { AFIProperty xProperty = GetPropertyManager().GetProperty(strName); if (null != xProperty) { return(xProperty.QueryFloat()); } return(0f); }
public override Int64 QueryInt(string strName) { AFIProperty xProperty = GetPropertyManager().GetProperty(strName); if (null != xProperty) { return(xProperty.QueryInt()); } return(0); }
public override AFIProperty AddProperty(string strPropertyName, AFIDataList varData) { AFIProperty xProperty = null; if (!mhtProperty.ContainsKey(strPropertyName)) { xProperty = new AFCProperty(mSelf, strPropertyName, varData); mhtProperty[strPropertyName] = xProperty; } return(xProperty); }
public override bool SetProperty(string strPropertyName, AFIDataList varData) { if (mhtProperty.ContainsKey(strPropertyName)) { AFIProperty xProperty = (AFCProperty)mhtProperty[strPropertyName]; if (null != xProperty) { xProperty.SetValue(varData); } } return(true); }
public override AFIProperty GetProperty(string strPropertyName) { AFIProperty xProperty = null; if (mhtProperty.ContainsKey(strPropertyName)) { xProperty = (AFCProperty)mhtProperty[strPropertyName]; return(xProperty); } return(xProperty); }
public override bool SetPropertyInt(string strPropertyName, Int64 nValue) { AFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { AFIDataList valueList = new AFCDataList(); valueList.AddInt64(0); property = mPropertyManager.AddProperty(strPropertyName, valueList); } property.SetInt(nValue); return(true); }
public override bool SetPropertyObject(string strPropertyName, AFIDENTID obj) { AFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { AFIDataList valueList = new AFCDataList(); valueList.AddObject(new AFIDENTID()); property = mPropertyManager.AddProperty(strPropertyName, valueList); } property.SetObject(obj); return(true); }
public override bool SetPropertyString(string strPropertyName, string strValue) { AFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { AFIDataList valueList = new AFCDataList(); valueList.AddString(""); property = mPropertyManager.AddProperty(strPropertyName, valueList); } property.SetString(strValue); return(true); }
public override bool SetPropertyDouble(string strPropertyName, double dwValue) { AFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { AFIDataList valueList = new AFCDataList(); valueList.AddDouble(0); property = mPropertyManager.AddProperty(strPropertyName, valueList); } property.SetDouble(dwValue); return(true); }
public override bool SetPropertyFloat(string strPropertyName, float fValue) { AFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { AFIDataList valueList = new AFCDataList(); valueList.AddFloat(0.0f); property = mPropertyManager.AddProperty(strPropertyName, valueList); } property.SetFloat(fValue); return(true); }
void AddBasePropertyFormOther(string strName, string strOther) { AFILogicClass xOtherClass = GetElement(strOther); AFILogicClass xLogicClass = GetElement(strName); if (null != xLogicClass && null != xOtherClass) { AFIDataList xValue = xOtherClass.GetPropertyManager().GetPropertyList(); for (int i = 0; i < xValue.Count(); ++i) { AFIProperty xProperty = xOtherClass.GetPropertyManager().GetProperty(xValue.StringVal(i)); xLogicClass.GetPropertyManager().AddProperty(xValue.StringVal(i), xProperty.GetValue()); } } }
void InitProperty(AFIDENTID self, string strClassName) { AFILogicClass xLogicClass = AFCLogicClassManager.Instance.GetElement(strClassName); if (null == xLogicClass) { return; } AFIDataList xDataList = xLogicClass.GetPropertyManager().GetPropertyList(); for (int i = 0; i < xDataList.Count(); ++i) { string strPropertyName = xDataList.StringVal(i); AFIProperty xProperty = xLogicClass.GetPropertyManager().GetProperty(strPropertyName); AFIObject xObject = GetObject(self); AFIPropertyManager xPropertyManager = xObject.GetPropertyManager(); xPropertyManager.AddProperty(strPropertyName, xProperty.GetValue()); } }
private void LoadInstanceElement(AFILogicClass xLogicClass) { string strLogicPath = mstrRootPath; strLogicPath += xLogicClass.GetInstance(); XmlDocument xmldoc = new XmlDocument(); xmldoc.Load(strLogicPath); ///////////////////////////////////////////////////////////////// XmlNode xRoot = xmldoc.SelectSingleNode("XML"); XmlNodeList xNodeList = xRoot.SelectNodes("Entry"); for (int i = 0; i < xNodeList.Count; ++i) { //AFCLog.Instance.Log("Class:" + xLogicClass.GetName()); XmlNode xNodeClass = xNodeList.Item(i); XmlAttribute strID = xNodeClass.Attributes["Id"]; //AFCLog.Instance.Log("ClassID:" + strID.Value); AFIElement xElement = GetElement(strID.Value); if (null == xElement) { xElement = new AFCElement(); AddElement(strID.Value, xElement); xLogicClass.AddConfigName(strID.Value); XmlAttributeCollection xCollection = xNodeClass.Attributes; for (int j = 0; j < xCollection.Count; ++j) { XmlAttribute xAttribute = xCollection[j]; AFIProperty xProperty = xLogicClass.GetPropertyManager().GetProperty(xAttribute.Name); if (null != xProperty) { AFIDataList.VARIANT_TYPE eType = xProperty.GetDataType(); switch (eType) { case AFIDataList.VARIANT_TYPE.VTYPE_INT: { AFIDataList xValue = new AFCDataList(); xValue.AddInt64(int.Parse(xAttribute.Value)); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case AFIDataList.VARIANT_TYPE.VTYPE_FLOAT: { AFIDataList xValue = new AFCDataList(); xValue.AddFloat(float.Parse(xAttribute.Value)); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case AFIDataList.VARIANT_TYPE.VTYPE_DOUBLE: { AFIDataList xValue = new AFCDataList(); xValue.AddDouble(double.Parse(xAttribute.Value)); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case AFIDataList.VARIANT_TYPE.VTYPE_STRING: { AFIDataList xValue = new AFCDataList(); xValue.AddString(xAttribute.Value); AFIProperty xTestProperty = xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case AFIDataList.VARIANT_TYPE.VTYPE_OBJECT: { AFIDataList xValue = new AFCDataList(); xValue.AddObject(new AFIDENTID(0, int.Parse(xAttribute.Value))); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; default: break; } } } } } }