public override void RegisterCallback(string strPropertyName, NFIProperty.PropertyEventHandler handler) { if (mhtProperty.ContainsKey(strPropertyName)) { NFIProperty xProperty = (NFCProperty)mhtProperty[strPropertyName]; xProperty.RegisterCallback(handler); } }
public override Int64 QueryPropertyInt(string strPropertyName) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null != property) { return(property.QueryInt()); } return(0); }
public override float QueryPropertyFloat(string strPropertyName) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null != property) { return(property.QueryFloat()); } return(0.0f); }
public override double QueryPropertyDouble(string strPropertyName) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null != property) { return(property.QueryDouble()); } return(0.0); }
public override NFIDENTID QueryObject(string strName) { NFIProperty xProperty = GetPropertyManager().GetProperty(strName); if (null != xProperty) { return(xProperty.QueryObject()); } return(new NFIDENTID()); }
public override double QueryDouble(string strName) { NFIProperty xProperty = GetPropertyManager().GetProperty(strName); if (null != xProperty) { return(xProperty.QueryDouble()); } return(0f); }
public override string QueryString(string strName) { NFIProperty xProperty = GetPropertyManager().GetProperty(strName); if (null != xProperty) { return(xProperty.QueryString()); } return(""); }
public override float QueryFloat(string strName) { NFIProperty xProperty = GetPropertyManager().GetProperty(strName); if (null != xProperty) { return(xProperty.QueryFloat()); } return(0f); }
public override Int64 QueryInt(string strName) { NFIProperty xProperty = GetPropertyManager().GetProperty(strName); if (null != xProperty) { return(xProperty.QueryInt()); } return(0); }
public override string QueryPropertyString(string strPropertyName) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null != property) { return(property.QueryString()); } return(""); }
public override NFIDENTID QueryPropertyObject(string strPropertyName) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null != property) { return(property.QueryObject()); } return(new NFIDENTID()); }
public override NFIProperty AddProperty(string strPropertyName, NFIDataList varData) { NFIProperty xProperty = null; if (!mhtProperty.ContainsKey(strPropertyName)) { xProperty = new NFCProperty(mSelf, strPropertyName, varData); mhtProperty[strPropertyName] = xProperty; } return(xProperty); }
public override NFIProperty GetProperty(string strPropertyName) { NFIProperty xProperty = null; if (mhtProperty.ContainsKey(strPropertyName)) { xProperty = (NFCProperty)mhtProperty[strPropertyName]; return(xProperty); } return(xProperty); }
public override bool SetProperty(string strPropertyName, NFIDataList varData) { if (mhtProperty.ContainsKey(strPropertyName)) { NFIProperty xProperty = (NFCProperty)mhtProperty[strPropertyName]; if (null != xProperty) { xProperty.SetValue(varData); } } return(true); }
public override bool SetPropertyString(string strPropertyName, string strValue) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { NFIDataList valueList = new NFCDataList(); valueList.AddString(""); property = mPropertyManager.AddProperty(strPropertyName, valueList); } property.SetString(strValue); return(true); }
public override bool SetPropertyObject(string strPropertyName, NFIDENTID obj) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { NFIDataList valueList = new NFCDataList(); valueList.AddObject(new NFIDENTID()); property = mPropertyManager.AddProperty(strPropertyName, valueList); } property.SetObject(obj); return(true); }
public override bool SetPropertyDouble(string strPropertyName, double dwValue) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { NFIDataList valueList = new NFCDataList(); valueList.AddDouble(0); property = mPropertyManager.AddProperty(strPropertyName, valueList); } property.SetDouble(dwValue); return(true); }
public override bool SetPropertyFloat(string strPropertyName, float fValue) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { NFIDataList valueList = new NFCDataList(); valueList.AddFloat(0.0f); property = mPropertyManager.AddProperty(strPropertyName, valueList); } property.SetFloat(fValue); return(true); }
public override bool SetPropertyInt(string strPropertyName, Int64 nValue) { NFIProperty property = mPropertyManager.GetProperty(strPropertyName); if (null == property) { NFIDataList valueList = new NFCDataList(); valueList.AddInt(0); property = mPropertyManager.AddProperty(strPropertyName, valueList); } property.SetInt(nValue); return(true); }
void AddBasePropertyFormOther(string strName, string strOther) { NFILogicClass xOtherClass = GetElement(strOther); NFILogicClass xLogicClass = GetElement(strName); if (null != xLogicClass && null != xOtherClass) { NFIDataList xValue = xOtherClass.GetPropertyManager().GetPropertyList(); for (int i = 0; i < xValue.Count(); ++i) { NFIProperty xProperty = xOtherClass.GetPropertyManager().GetProperty(xValue.StringVal(i)); xLogicClass.GetPropertyManager().AddProperty(xValue.StringVal(i), xProperty.GetValue()); } } }
void InitProperty(NFIDENTID self, string strClassName) { NFILogicClass xLogicClass = NFCLogicClassManager.Instance.GetElement(strClassName); NFIDataList xDataList = xLogicClass.GetPropertyManager().GetPropertyList(); for (int i = 0; i < xDataList.Count(); ++i) { string strPropertyName = xDataList.StringVal(i); NFIProperty xProperty = xLogicClass.GetPropertyManager().GetProperty(strPropertyName); NFIObject xObject = GetObject(self); NFIPropertyManager xPropertyManager = xObject.GetPropertyManager(); xPropertyManager.AddProperty(strPropertyName, xProperty.GetValue()); } }
private void LoadInstanceElement(NFILogicClass xLogicClass) { string strLogicPath = mstrRootPath; strLogicPath += xLogicClass.GetInstance(); XmlDocument xmldoc = new XmlDocument(); xmldoc.Load(strLogicPath); XmlNode xRoot = xmldoc.SelectSingleNode("XML"); XmlNodeList xNodeList = xRoot.SelectNodes("Object"); for (int i = 0; i < xNodeList.Count; ++i) { //NFCLog.Instance.Log("Class:" + xLogicClass.GetName()); XmlNode xNodeClass = xNodeList.Item(i); XmlAttribute strID = xNodeClass.Attributes["ID"]; //NFCLog.Instance.Log("ClassID:" + strID.Value); NFIElement xElement = GetElement(strID.Value); if (null == xElement) { xElement = new NFCElement(); AddElement(strID.Value, xElement); xLogicClass.AddConfigName(strID.Value); XmlAttributeCollection xCollection = xNodeClass.Attributes; for (int j = 0; j < xCollection.Count; ++j) { XmlAttribute xAttribute = xCollection[j]; NFIProperty xProperty = xLogicClass.GetPropertyManager().GetProperty(xAttribute.Name); if (null != xProperty) { NFIDataList.VARIANT_TYPE eType = xProperty.GetType(); switch (eType) { case NFIDataList.VARIANT_TYPE.VTYPE_INT: { NFIDataList xValue = new NFCDataList(); xValue.AddInt(int.Parse(xAttribute.Value)); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case NFIDataList.VARIANT_TYPE.VTYPE_FLOAT: { NFIDataList xValue = new NFCDataList(); xValue.AddFloat(float.Parse(xAttribute.Value)); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case NFIDataList.VARIANT_TYPE.VTYPE_DOUBLE: { NFIDataList xValue = new NFCDataList(); xValue.AddDouble(double.Parse(xAttribute.Value)); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case NFIDataList.VARIANT_TYPE.VTYPE_STRING: { NFIDataList xValue = new NFCDataList(); xValue.AddString(xAttribute.Value); NFIProperty xTestProperty = xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case NFIDataList.VARIANT_TYPE.VTYPE_OBJECT: { NFIDataList xValue = new NFCDataList(); xValue.AddObject(new NFIDENTID(0, int.Parse(xAttribute.Value))); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; default: break; } } } } } }
public override void RegisterPropertyCallback(NFIDENTID self, string strPropertyName, NFIProperty.PropertyEventHandler handler) { NFIObject xGameObject = GetObject(self); if (null != xGameObject) { xGameObject.GetPropertyManager().RegisterCallback(strPropertyName, handler); } }
private void LoadInstanceElement(NFILogicClass xLogicClass) { string strLogicPath = mstrRootPath; strLogicPath += xLogicClass.GetInstance(); XmlDocument xmldoc = new XmlDocument(); /////////////////////////////////////////////////////////////////////////////////////// if (NFCLogicClassManager.Instance.GetCepher()) { StreamReader cepherReader = new StreamReader(strLogicPath);; string strContent = cepherReader.ReadToEnd(); cepherReader.Close(); byte[] data = Convert.FromBase64String(strContent); MemoryStream stream = new MemoryStream(data); XmlReader x = XmlReader.Create(stream); x.MoveToContent(); string res = x.ReadOuterXml(); xmldoc.LoadXml(res); } else { xmldoc.Load(strLogicPath); } ///////////////////////////////////////////////////////////////// XmlNode xRoot = xmldoc.SelectSingleNode("XML"); XmlNodeList xNodeList = xRoot.SelectNodes("Object"); for (int i = 0; i < xNodeList.Count; ++i) { //NFCLog.Instance.Log("Class:" + xLogicClass.GetName()); XmlNode xNodeClass = xNodeList.Item(i); XmlAttribute strID = xNodeClass.Attributes["Id"]; //NFCLog.Instance.Log("ClassID:" + strID.Value); NFIElement xElement = GetElement(strID.Value); if (null == xElement) { xElement = new NFCElement(); AddElement(strID.Value, xElement); xLogicClass.AddConfigName(strID.Value); XmlAttributeCollection xCollection = xNodeClass.Attributes; for (int j = 0; j < xCollection.Count; ++j) { XmlAttribute xAttribute = xCollection[j]; NFIProperty xProperty = xLogicClass.GetPropertyManager().GetProperty(xAttribute.Name); if (null != xProperty) { NFIDataList.VARIANT_TYPE eType = xProperty.GetType(); switch (eType) { case NFIDataList.VARIANT_TYPE.VTYPE_INT: { NFIDataList xValue = new NFCDataList(); xValue.AddInt(int.Parse(xAttribute.Value)); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case NFIDataList.VARIANT_TYPE.VTYPE_FLOAT: { NFIDataList xValue = new NFCDataList(); xValue.AddFloat(float.Parse(xAttribute.Value)); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case NFIDataList.VARIANT_TYPE.VTYPE_DOUBLE: { NFIDataList xValue = new NFCDataList(); xValue.AddDouble(double.Parse(xAttribute.Value)); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case NFIDataList.VARIANT_TYPE.VTYPE_STRING: { NFIDataList xValue = new NFCDataList(); xValue.AddString(xAttribute.Value); NFIProperty xTestProperty = xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; case NFIDataList.VARIANT_TYPE.VTYPE_OBJECT: { NFIDataList xValue = new NFCDataList(); xValue.AddObject(new NFIDENTID(0, int.Parse(xAttribute.Value))); xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue); } break; default: break; } } } } } }
public abstract void RegisterCallback(string strPropertyName, NFIProperty.PropertyEventHandler handler);
///////////////////////////////////////////////////////////// public abstract void RegisterPropertyCallback(NFIDENTID self, string strPropertyName, NFIProperty.PropertyEventHandler handler);