public MyInt64 GetProperty_Int64(int propertyID) { int index = 0; PropertyValue prop = GetPropertyByID(propertyID, ref index); if (prop != null && prop.m_type == (int)PropertySetValueType.enInt64) { PropertyValueInt64 val64 = prop.m_customObject as PropertyValueInt64; return(val64.m_value); } return(new MyInt64()); }
public long SetProperty_Int64(int propertyID, int vLow, int vHigh) { int index = 0; PropertyValue prop = GetPropertyByID(propertyID, ref index); if (prop != null && prop.m_type == (int)PropertySetValueType.enInt64) { PropertyValueInt64 val64 = prop.m_customObject as PropertyValueInt64; val64.SetInt64(vLow, vHigh); OnPropertyChanged(prop, index); } return(0); }
public int AddProperty_Int64(string name, int defaultVLow, int defaultVHigh, int propertyID = 0) { PropertyDef def = new PropertyDef(); def.m_name = name; def.m_type = (int)PropertySetValueType.enInt64; def.m_usedBufferBytes = 8; def.m_valueFactory = PropertyValueInt64Factory.Singleton; PropertyValue v = new PropertyValue(); PropertyValueInt64 value = PropertyValueInt64Factory.Singleton.CreateValue() as PropertyValueInt64; value.SetInt64(defaultVLow, defaultVHigh); v.m_customObject = value; v.m_customObjectFixLength = 8; OnPropertyAdded(def, v, propertyID); return(def.m_propertyID); }