GetPropertyList() public abstract method

public abstract GetPropertyList ( ) : NFIDataList
return NFIDataList
示例#1
0
        public void OnClassHandler(NFGUID self, int nContainerID, int nGroupID, NFIObject.CLASS_EVENT_TYPE eType, string strClassName, string strConfigIndex)
        {
            if (eType == NFIObject.CLASS_EVENT_TYPE.OBJECT_CREATE)
            {
                NFIObject xObject = NFCKernelModule.Instance.GetObject(self);

                NFIPropertyManager xPropertyManager  = xObject.GetPropertyManager();
                NFDataList         xPropertyNameList = xPropertyManager.GetPropertyList();
                for (int i = 0; i < xPropertyNameList.Count(); i++)
                {
                    string      strPropertyName = xPropertyNameList.StringVal(i);
                    NFIProperty xProperty       = xPropertyManager.GetProperty(strPropertyName);
                    if (xProperty.GetUpload())
                    {
                        xProperty.RegisterCallback(OnPropertyHandler);
                    }
                }

                NFIRecordManager xRecordManager  = xObject.GetRecordManager();
                NFDataList       xRecordNameList = xRecordManager.GetRecordList();
                for (int i = 0; i < xRecordNameList.Count(); i++)
                {
                    string    strRecodeName = xRecordNameList.StringVal(i);
                    NFIRecord xRecord       = xRecordManager.GetRecord(strRecodeName);
                    if (xRecord.GetUpload())
                    {
                        xRecord.RegisterCallback(OnRecordHandler);
                    }
                }
            }
        }
示例#2
0
        private void OnClassPlayerEventHandler(NFGUID self, int nContainerID, int nGroupID, NFIObject.CLASS_EVENT_TYPE eType, string strClassName, string strConfigIndex)
        {
            if (eType == NFIObject.CLASS_EVENT_TYPE.OBJECT_CREATE_FINISH)
            {
                NFIClass           classObject     = mClassModule.GetElement(strClassName);
                NFIPropertyManager propertyManager = classObject.GetPropertyManager();
                NFIRecordManager   recordManager   = classObject.GetRecordManager();

                NFDataList propertyList = propertyManager.GetPropertyList();
                NFDataList recordList   = recordManager.GetRecordList();

                for (int i = 0; i < propertyList.Count(); ++i)
                {
                    NFIProperty propertyObject = propertyManager.GetProperty(propertyList.StringVal(i));
                    if (propertyObject.GetUpload())
                    {
                        mKernelModule.RegisterPropertyCallback(self, propertyObject.GetKey(), OnPropertyDataHandler);
                    }
                }

                for (int i = 0; i < recordList.Count(); ++i)
                {
                    NFIRecord recordObject = recordManager.GetRecord(recordList.StringVal(i));
                    if (recordObject.GetUpload())
                    {
                        mKernelModule.RegisterRecordCallback(self, recordObject.GetName(), RecordEventHandler);
                    }
                }
            }
        }