public NFCProperty( NFGUID self, string strPropertyName, NFIDataList varData) { mSelf = self; msPropertyName = strPropertyName; mxData = new NFIDataList.TData(varData.GetType(0)); switch (varData.GetType(0)) { case NFIDataList.VARIANT_TYPE.VTYPE_INT: mxData.Set(varData.IntVal(0)); break; case NFIDataList.VARIANT_TYPE.VTYPE_FLOAT: mxData.Set(varData.FloatVal(0)); break; case NFIDataList.VARIANT_TYPE.VTYPE_DOUBLE: mxData.Set(varData.DoubleVal(0)); break; case NFIDataList.VARIANT_TYPE.VTYPE_OBJECT: mxData.Set(varData.ObjectVal(0)); break; case NFIDataList.VARIANT_TYPE.VTYPE_STRING: mxData.Set(varData.StringVal(0)); break; default: break; } }
public NFCProperty(NFGUID self, string strPropertyName, NFIDataList varData) { mSelf = self; msPropertyName = strPropertyName; mxData = new NFIDataList.TData(varData.GetType(0)); switch (varData.GetType(0)) { case NFIDataList.VARIANT_TYPE.VTYPE_INT: mxData.Set(varData.IntVal(0)); break; case NFIDataList.VARIANT_TYPE.VTYPE_FLOAT: mxData.Set(varData.FloatVal(0)); break; case NFIDataList.VARIANT_TYPE.VTYPE_DOUBLE: mxData.Set(varData.DoubleVal(0)); break; case NFIDataList.VARIANT_TYPE.VTYPE_OBJECT: mxData.Set(varData.ObjectVal(0)); break; case NFIDataList.VARIANT_TYPE.VTYPE_STRING: mxData.Set(varData.StringVal(0)); break; default: break; } }
public override bool SetObject(int nRow, int nCol, NFGUID value) { if (nRow >= 0 && nRow < mnRow) { if (!mhtRecordVec.ContainsKey(nRow)) { AddRow(nRow); } NFIDataList valueList = (NFIDataList)mhtRecordVec[nRow]; if (valueList.GetType(nCol) == NFIDataList.VARIANT_TYPE.VTYPE_OBJECT) { if (valueList.ObjectVal(nCol) != value) { NFIDataList.TData oldValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_OBJECT); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_OBJECT); oldValue.Set(valueList.ObjectVal(nCol)); newValue.Set(value); valueList.SetObject(nCol, value); if (null != doHandleDel) { doHandleDel(mSelf, mstrRecordName, eRecordOptype.Updata, nRow, nCol, oldValue, newValue); } } } return(true); } return(false); }
public override bool SetDouble(int nRow, int nCol, double value) { if (nRow >= 0 && nRow < mnRow) { if (!mhtRecordVec.ContainsKey(nRow)) { AddRow(nRow); } NFIDataList valueList = (NFIDataList)mhtRecordVec[nRow]; if (valueList.GetType(nCol) == NFIDataList.VARIANT_TYPE.VTYPE_DOUBLE) { if (valueList.DoubleVal(nCol) - value > NFIDataList.EPS_DOUBLE || valueList.DoubleVal(nCol) - value < -NFIDataList.EPS_DOUBLE) { NFIDataList.TData oldValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_DOUBLE); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_DOUBLE); oldValue.Set(valueList.DoubleVal(nCol)); newValue.Set(value); valueList.SetDouble(nCol, value); if (null != doHandleDel) { doHandleDel(mSelf, mstrRecordName, eRecordOptype.Updata, nRow, nCol, oldValue, newValue); } } } return(true); } return(false); }
public override bool SetVector3(NFVector3 value) { if (mxData.Vector3Val() != value) { NFIDataList.TData oldValue = new NFIDataList.TData(mxData); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_VECTOR3); newValue.Set(value); mxData.Set(value); if (null != doHandleDel) { doHandleDel(mSelf, msPropertyName, oldValue, newValue); } } return(true); }
public override bool SetObject(NFGUID value) { if (mxData.ObjectVal() != value) { NFIDataList.TData oldValue = new NFIDataList.TData(mxData); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_OBJECT); newValue.Set(value); mxData.Set(value); if (null != doHandleDel) { doHandleDel(mSelf, msPropertyName, oldValue, newValue); } } return(true); }
public override bool SetString(string value) { if (mxData.StringVal() != value) { NFIDataList.TData oldValue = new NFIDataList.TData(mxData); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_STRING); newValue.Set(value); mxData.Set(value); if (null != doHandleDel) { doHandleDel(mSelf, msPropertyName, oldValue, newValue); } } return(true); }
public override bool SetFloat(double value) { if (mxData.FloatVal() - value > NFIDataList.EPS_DOUBLE || mxData.FloatVal() - value < -NFIDataList.EPS_DOUBLE) { NFIDataList.TData oldValue = new NFIDataList.TData(mxData); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_FLOAT); newValue.Set(value); mxData.Set(value); if (null != doHandleDel) { doHandleDel(mSelf, msPropertyName, oldValue, newValue); } } return(true); }
public override bool SetString(string value) { if (mxData.StringVal() != value) { NFIDataList.TData oldValue = new NFIDataList.TData(mxData); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_STRING); newValue.Set(value); mxData.Set(value); if (null != doHandleDel) { doHandleDel(mSelf, msPropertyName, oldValue, newValue); } } return true; }
public override bool SetObject(NFGUID value) { if (mxData.ObjectVal() != value) { NFIDataList.TData oldValue = new NFIDataList.TData(mxData); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_OBJECT); newValue.Set(value); mxData.Set(value); if (null != doHandleDel) { doHandleDel(mSelf, msPropertyName, oldValue, newValue); } } return true; }
public override bool SetFloat(float value) { if (mxData.DoubleVal() - value > NFIDataList.EPS_DOUBLE || mxData.DoubleVal() - value < -NFIDataList.EPS_DOUBLE) { NFIDataList.TData oldValue = new NFIDataList.TData(mxData); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_FLOAT); newValue.Set(value); mxData.Set(value); if (null != doHandleDel) { doHandleDel(mSelf, msPropertyName, oldValue, newValue); } } return true; }
public override bool SetVector3(int nRow, int nCol, NFVector3 value) { if (nRow >= 0 && nRow < mnRow) { if (!mhtRecordVec.ContainsKey(nRow)) { AddRow(nRow); } NFIDataList valueList = (NFIDataList)mhtRecordVec[nRow]; if (valueList.GetType(nCol) == NFIDataList.VARIANT_TYPE.VTYPE_VECTOR3) { if (valueList.Vector3Val(nCol) != value) { NFIDataList.TData oldValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_VECTOR3); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_VECTOR3); oldValue.Set(valueList.Vector3Val(nCol)); newValue.Set(value); valueList.SetVector3(nCol, value); if (null != doHandleDel) { doHandleDel(mSelf, mstrRecordName, eRecordOptype.Update, nRow, nCol, oldValue, newValue); } } } return true; } return false; }
public override bool SetFloat(int nRow, int nCol, double value) { if(nRow >= 0 && nRow < mnRow) { if (!mhtRecordVec.ContainsKey(nRow)) { AddRow(nRow); } NFIDataList valueList = (NFIDataList)mhtRecordVec[nRow]; if (valueList.GetType(nCol) == NFIDataList.VARIANT_TYPE.VTYPE_FLOAT) { if (valueList.FloatVal(nCol) - value > NFIDataList.EPS_DOUBLE || valueList.FloatVal(nCol) - value < -NFIDataList.EPS_DOUBLE) { NFIDataList.TData oldValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_FLOAT); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_FLOAT); oldValue.Set(valueList.FloatVal(nCol)); newValue.Set(value); valueList.SetFloat(nCol, value); if (null != doHandleDel) { doHandleDel(mSelf, mstrRecordName, eRecordOptype.Update, nRow, nCol, oldValue, newValue); } } } return true; } return false; }
public override bool SetVector3(NFVector3 value) { if (mxData.Vector3Val() != value) { NFIDataList.TData oldValue = new NFIDataList.TData(mxData); NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_VECTOR3); newValue.Set(value); mxData.Set(value); if (null != doHandleDel) { doHandleDel(mSelf, msPropertyName, oldValue, newValue); } } return true; }