RegisterCallback() 공개 추상적인 메소드

public abstract RegisterCallback ( PropertyEventHandler handler ) : void
handler PropertyEventHandler
리턴 void
예제 #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
 public override void RegisterCallback(string strPropertyName, NFIProperty.PropertyEventHandler handler)
 {
     if (mhtProperty.ContainsKey(strPropertyName))
     {
         NFIProperty xProperty = (NFCProperty)mhtProperty[strPropertyName];
         xProperty.RegisterCallback(handler);
     }
 }