public CustomProperty(CustomClass parent, string strID, string sName, object value, bool bReadOnly, bool bVisible, enumValueType vtType) { m_combofieldhelper = new CombxHelper(this); m_parent = parent; this.m_strid = strID; this.sName = sName; this.m_objValue = value; this.bReadOnly = bReadOnly; this.bVisible = bVisible; this.m_vt = vtType; }
public static DBCustomProperty GetProperty(int nFieldID, CustomClass parent, string strID, string sName, object value, bool bReadOnly, bool bVisible, enumValueType vtType) { if (!m_bEnabled) return new DBCustomProperty(parent, strID, sName, value, bReadOnly, bVisible, vtType); string strkey = GetPropKey(nFieldID, strID, sName, value, bReadOnly, bVisible, vtType); DBCustomProperty prop = null; if (m_poolprop.ContainsKey(strkey)) { prop = m_poolprop[strkey]; m_poolprop.Remove(strkey); prop.Init(parent, value); } else prop = new DBCustomProperty(parent, strID, sName, value, bReadOnly, bVisible, vtType); prop.FieldID = nFieldID; return prop; }
public DBCustomProperty(CustomClass parent, string strID, string sName, object value, bool bReadOnly, bool bVisible, enumValueType vtType) :base(parent, strID, sName, value, bReadOnly, bVisible, vtType) { //DBCustomClass cls = parent as DBCustomClass; //m_lock = new RecordLock(cls.Conn, cls.MainTable, cls.DBPrimaryKey, cls.ModId); }
private static bool m_bEnabled = false; //关闭垃圾收集功能,此功能目前有问题,关闭还快一点? private static string GetPropKey(int nFieldID, string strID, string sName, object value, bool bReadOnly, bool bVisible, enumValueType vtType) { //string strkey = string.Format("id={0};sName={1};bReadOnly={2};bVisible={3};vtTtype={4}", strID, sName, bReadOnly.ToString(), bVisible.ToString(), vtType.ToString()); string strkey = nFieldID.ToString(); return strkey; }
public DBCustomProperty(CustomClass parent, string strID, string sName, object value, bool bReadOnly, bool bVisible, enumValueType vtType) : base(parent, strID, sName, value, bReadOnly, bVisible, vtType) { //DBCustomClass cls = parent as DBCustomClass; //m_lock = new RecordLock(cls.Conn, cls.MainTable, cls.DBPrimaryKey, cls.ModId); }
public static DBCustomProperty GetProperty(int nFieldID, CustomClass parent, string strID, string sName, object value, bool bReadOnly, bool bVisible, enumValueType vtType) { if (!m_bEnabled) { return(new DBCustomProperty(parent, strID, sName, value, bReadOnly, bVisible, vtType)); } string strkey = GetPropKey(nFieldID, strID, sName, value, bReadOnly, bVisible, vtType); DBCustomProperty prop = null; if (m_poolprop.ContainsKey(strkey)) { prop = m_poolprop[strkey]; m_poolprop.Remove(strkey); prop.Init(parent, value); } else { prop = new DBCustomProperty(parent, strID, sName, value, bReadOnly, bVisible, vtType); } prop.FieldID = nFieldID; return(prop); }
private static bool m_bEnabled = false; //关闭垃圾收集功能,此功能目前有问题,关闭还快一点? private static string GetPropKey(int nFieldID, string strID, string sName, object value, bool bReadOnly, bool bVisible, enumValueType vtType) { //string strkey = string.Format("id={0};sName={1};bReadOnly={2};bVisible={3};vtTtype={4}", strID, sName, bReadOnly.ToString(), bVisible.ToString(), vtType.ToString()); string strkey = nFieldID.ToString(); return(strkey); }