예제 #1
0
        public override bool SetVector2(int nRow, int nCol, NFVector2 value)
        {
            if (nRow >= 0 && nRow < mnRow)
            {
                if (!mhtRecordVec.ContainsKey(nRow))
                {
                    AddRow(nRow);
                }
                NFDataList valueList = (NFDataList)mhtRecordVec[nRow];
                if (valueList.GetType(nCol) == NFDataList.VARIANT_TYPE.VTYPE_VECTOR2)
                {
                    if (valueList.Vector2Val(nCol) != value)
                    {
                        NFDataList.TData oldValue = new NFDataList.TData(NFDataList.VARIANT_TYPE.VTYPE_VECTOR2);
                        NFDataList.TData newValue = new NFDataList.TData(NFDataList.VARIANT_TYPE.VTYPE_VECTOR2);

                        oldValue.Set(valueList.Vector2Val(nCol));
                        newValue.Set(value);

                        valueList.SetVector2(nCol, value);

                        if (null != doHandleDel)
                        {
                            doHandleDel(mSelf, mstrRecordName, eRecordOptype.Update, nRow, nCol, oldValue, newValue);
                        }
                    }
                }

                return(true);
            }

            return(false);
        }