예제 #1
0
 /// <summary>
 /// Copy constructor, it will create instance guid!!!!
 /// </summary>
 /// <param name="src"></param>
 public VisualControlInfo(VisualControlInfo src)
 {
     _name       = src._name;
     _version    = src._version;
     _dockStyle  = src._dockStyle;
     _GUID       = src._GUID;
     _classType  = src._classType;
     _allowMulti = src._allowMulti;
     // make new instance guid if we do coy from template
     _instance_GUID = Guid.NewGuid();
 }
예제 #2
0
		/// <summary>
		/// Copy constructor, it will create instance guid!!!!
		/// </summary>
		/// <param name="src"></param>
		public VisualControlInfo(VisualControlInfo src)
		{
			_name = src._name;
			_version = src._version;
			_dockStyle = src._dockStyle;
			_GUID = src._GUID;
			_classType = src._classType;
			_allowMulti = src._allowMulti;
			// make new instance guid if we do coy from template
			_instance_GUID = Guid.NewGuid();
		}
예제 #3
0
		public VisualControlInfo(string name, Type t)
		{
			Name = name;
			
			_GUID = Guid.Parse((string)t.GetField("GUID", BindingFlags.Static | BindingFlags.Public).GetValue(null));
			FieldInfo fi = t.GetField("ALLOW_MULTI", BindingFlags.Static | BindingFlags.Public);
			_allowMulti = fi != null ? (bool)fi.GetValue(false) : false;
			_version = (string)t.GetField("VERSION", BindingFlags.Static | BindingFlags.Public).GetValue(null);
			_dockStyle = (ControlDockStyle)t.GetField("DOCK_STYLE", BindingFlags.Static | BindingFlags.Public).GetValue(null);
			_classType = t;
			_instance_GUID = _GUID; // this is template info
		}
예제 #4
0
        public VisualControlInfo(string name, Type t)
        {
            Name = name;

            _GUID = Guid.Parse((string)t.GetField("GUID", BindingFlags.Static | BindingFlags.Public).GetValue(null));
            FieldInfo fi = t.GetField("ALLOW_MULTI", BindingFlags.Static | BindingFlags.Public);

            _allowMulti    = fi != null ? (bool)fi.GetValue(false) : false;
            _version       = (string)t.GetField("VERSION", BindingFlags.Static | BindingFlags.Public).GetValue(null);
            _dockStyle     = (ControlDockStyle)t.GetField("DOCK_STYLE", BindingFlags.Static | BindingFlags.Public).GetValue(null);
            _classType     = t;
            _instance_GUID = _GUID;             // this is template info
        }