Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
        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;
        }
Ejemplo n.º 6
0
 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);
 }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
        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);
        }