Exemplo n.º 1
0
 //public abstract int FindRow( int nRow );
 public abstract int FindColValue(int nCol, NFIDataList var, ref NFIDataList varResult);
Exemplo n.º 2
0
 public abstract int FindInt(int nCol, Int64 value, ref NFIDataList varResult);
Exemplo n.º 3
0
 public abstract int AddRow(int nRow, NFIDataList var);
Exemplo n.º 4
0
 // set data
 public abstract int SetValue(int nRow, NFIDataList var);
Exemplo n.º 5
0
 public abstract void DoEvent(NFGUID self, int nEventID, NFIDataList valueList);
Exemplo n.º 6
0
 public abstract void DoEvent(NFIDataList valueList);
Exemplo n.º 7
0
        public override void RegisterCallback(NFGUID self, int nEventID, NFIEvent.EventHandler handler, NFIDataList valueList)
        {
            Dictionary <int, NFIEvent> xData = mhtEvent[self];

            if (!mhtEvent.ContainsKey(self) || null == xData)
            {
                xData = new Dictionary <int, NFIEvent>();
                xData.Add(nEventID, new NFCEvent(self, nEventID, valueList));

                mhtEvent.Add(self, xData);
                return;
            }

            if (!xData.ContainsKey(nEventID))
            {
                xData.Add(nEventID, new NFCEvent(self, nEventID, valueList));
                return;
            }

            NFIEvent identEvent = (NFIEvent)mhtEvent[self][nEventID];

            identEvent.RegisterCallback(handler);
        }
Exemplo n.º 8
0
 public abstract int FindObject(int nCol, NFGUID value, ref NFIDataList varResult);
 public abstract NFIProperty AddProperty(string strPropertyName, NFIDataList varData);
Exemplo n.º 10
0
 public abstract bool SetProperty(string strPropertyName, NFIDataList varData);
Exemplo n.º 11
0
 public abstract int FindRecordRow(NFGUID self, string strRecordName, int nCol, NFVector3 nValue, ref NFIDataList xDatalist);
Exemplo n.º 12
0
 public abstract NFIObject CreateObject(NFGUID self, int nContainerID, int nGroupID, string strClassName, string strConfigIndex, NFIDataList arg);
Exemplo n.º 13
0
 public NFCEvent(NFGUID self, int nEventID, NFIDataList valueList)
 {
     mSelf         = self;
     mnEventID     = nEventID;
     mArgValueList = valueList;
 }
Exemplo n.º 14
0
 public abstract int FindFloat(int nCol, double value, ref NFIDataList varResult);
Exemplo n.º 15
0
        public override int FindRecordRow(NFGUID self, string strRecordName, int nCol, NFVector3 nValue, ref NFIDataList xDatalist)
        {
            if (mhtObject.ContainsKey(self))
            {
                NFIObject xGameObject = (NFIObject)mhtObject[self];
                NFIRecord xRecord     = xGameObject.GetRecordManager().GetRecord(strRecordName);
                if (null != xRecord)
                {
                    return(xRecord.FindVector3(nCol, nValue, ref xDatalist));
                }
            }

            return(-1);
        }
Exemplo n.º 16
0
 public abstract int FindString(int nCol, string value, ref NFIDataList varResult);
Exemplo n.º 17
0
        public override NFIObject CreateObject(NFGUID self, int nContainerID, int nGroupID, string strClassName,
                                               string strConfigIndex, NFIDataList arg)
        {
            if (!mhtObject.ContainsKey(self))
            {
                NFIObject xNewObject = new NFCObject(self, nContainerID, nGroupID, strClassName, strConfigIndex);
                mhtObject.Add(self, xNewObject);

                NFCDataList varConfigID = new NFCDataList();
                varConfigID.AddString(strConfigIndex);
                xNewObject.GetPropertyManager().AddProperty("ConfigID", varConfigID);

                NFCDataList varConfigClass = new NFCDataList();
                varConfigClass.AddString(strClassName);
                xNewObject.GetPropertyManager().AddProperty("ClassName", varConfigClass);

                if (arg.Count() % 2 == 0)
                {
                    for (int i = 0; i < arg.Count() - 1; i += 2)
                    {
                        string strPropertyName         = arg.StringVal(i);
                        NFIDataList.VARIANT_TYPE eType = arg.GetType(i + 1);
                        switch (eType)
                        {
                        case NFIDataList.VARIANT_TYPE.VTYPE_INT: {
                            NFIDataList xDataList = new NFCDataList();
                            xDataList.AddInt(arg.IntVal(i + 1));
                            xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
                        }
                        break;

                        case NFIDataList.VARIANT_TYPE.VTYPE_FLOAT: {
                            NFIDataList xDataList = new NFCDataList();
                            xDataList.AddFloat(arg.FloatVal(i + 1));
                            xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
                        }
                        break;

                        case NFIDataList.VARIANT_TYPE.VTYPE_STRING: {
                            NFIDataList xDataList = new NFCDataList();
                            xDataList.AddString(arg.StringVal(i + 1));
                            xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
                        }
                        break;

                        case NFIDataList.VARIANT_TYPE.VTYPE_OBJECT: {
                            NFIDataList xDataList = new NFCDataList();
                            xDataList.AddObject(arg.ObjectVal(i + 1));
                            xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
                        }
                        break;

                        case NFIDataList.VARIANT_TYPE.VTYPE_VECTOR2: {
                            NFIDataList xDataList = new NFCDataList();
                            xDataList.AddVector2(arg.Vector2Val(i + 1));
                            xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
                        }
                        break;

                        case NFIDataList.VARIANT_TYPE.VTYPE_VECTOR3: {
                            NFIDataList xDataList = new NFCDataList();
                            xDataList.AddVector3(arg.Vector3Val(i + 1));
                            xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
                        }
                        break;

                        default:
                            break;
                        }
                    }
                }

                InitProperty(self, strClassName);
                InitRecord(self, strClassName);

                ClassHandleDel xHandleDel = (ClassHandleDel)mhtClassHandleDel[strClassName];
                if (null != xHandleDel && null != xHandleDel.GetHandler())
                {
                    NFIObject.ClassEventHandler xHandlerList = xHandleDel.GetHandler();
                    xHandlerList(self, nContainerID, nGroupID, NFIObject.CLASS_EVENT_TYPE.OBJECT_CREATE, strClassName,
                                 strConfigIndex);
                    xHandlerList(self, nContainerID, nGroupID, NFIObject.CLASS_EVENT_TYPE.OBJECT_LOADDATA, strClassName,
                                 strConfigIndex);
                    xHandlerList(self, nContainerID, nGroupID, NFIObject.CLASS_EVENT_TYPE.OBJECT_CREATE_FINISH,
                                 strClassName, strConfigIndex);
                }

                //NFCLog.Instance.Log(NFCLog.LOG_LEVEL.DEBUG, "Create object: " + self.ToString() + " ClassName: " + strClassName + " SceneID: " + nContainerID + " GroupID: " + nGroupID);
                return(xNewObject);
            }

            return(null);
        }
Exemplo n.º 18
0
 public abstract int FindVector3(int nCol, NFVector3 value, ref NFIDataList varResult);
Exemplo n.º 19
0
 public abstract void RegisterCallback(NFGUID self, int nEventID, NFIEvent.EventHandler handler, NFIDataList valueList);