public void Populate(nHydrate.Generator.Models.Table table)
		{
			_table = table;
			_table.PropertyChanged += new PropertyChangedEventHandler(_table_PropertyChanged);
			this.LoadControls();

			#region Hook events
			txtCodeFacade.Leave += new EventHandler(txtCodeFacade_Leave);
			txtCodeFacade.Enter += new EventHandler(txtCodeFacade_Enter);
			txtCodeFacade.KeyDown += new KeyEventHandler(txtCodeFacade_KeyDown);

			txtDatabaseSchema.Leave += new EventHandler(txtDatabaseSchema_Leave);
			txtDatabaseSchema.Enter += new EventHandler(txtDatabaseSchema_Enter);
			txtDatabaseSchema.KeyDown += new KeyEventHandler(txtDatabaseSchema_KeyDown);

			txtDescription.Leave += new EventHandler(txtDescription_Leave);
			txtDescription.Enter += new EventHandler(txtDescription_Enter);
			txtDescription.KeyDown += new KeyEventHandler(txtDescription_KeyDown);

			txtName.Leave += new EventHandler(txtName_Leave);
			txtName.Enter += new EventHandler(txtName_Enter);
			txtName.KeyDown += new KeyEventHandler(txtName_KeyDown);

			chkAllowAuditTracking.CheckedChanged += new EventHandler(chkAllowAuditTracking_CheckedChanged);
			chkAllowCreateAudit.CheckedChanged += new EventHandler(chkAllowCreateAudit_CheckedChanged);
			chkAllowModifyAudit.CheckedChanged += new EventHandler(chkAllowModifyAudit_CheckedChanged);
			chkAllowTimestamp.CheckedChanged += new EventHandler(chkAllowTimestamp_CheckedChanged);
			chkEnforcePrimaryKey.CheckedChanged += new EventHandler(chkEnforcePrimaryKey_CheckedChanged);
			chkGenerated.CheckedChanged += new EventHandler(chkGenerated_CheckedChanged);
			chkImmutable.CheckedChanged += new EventHandler(chkImmutable_CheckedChanged);
			chkIsAssociative.CheckedChanged += new EventHandler(chkIsAssociative_CheckedChanged);
			chkIsTypeTable.CheckedChanged += new EventHandler(chkIsTypeTable_CheckedChanged);

			#endregion

			#region Setup Tooltips
			toolTip1.SetToolTip(txtName, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "Name"));
			toolTip1.SetToolTip(txtDescription, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "Description"));
			toolTip1.SetToolTip(txtCodeFacade, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "CodeFacade"));
			toolTip1.SetToolTip(txtDatabaseSchema, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "DBSchema"));
			toolTip1.SetToolTip(chkAllowAuditTracking, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "AllowAuditTracking"));
			toolTip1.SetToolTip(chkAllowCreateAudit, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "AllowCreateAudit"));
			toolTip1.SetToolTip(chkAllowModifyAudit, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "AllowModifiedAudit"));
			toolTip1.SetToolTip(chkAllowTimestamp, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "AllowTimestamp"));
			toolTip1.SetToolTip(chkEnforcePrimaryKey, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "EnforcePrimaryKey"));
			toolTip1.SetToolTip(chkGenerated, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "Generated"));
			toolTip1.SetToolTip(chkImmutable, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "Immutable"));
			toolTip1.SetToolTip(chkIsAssociative, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "AssociativeTable"));
			toolTip1.SetToolTip(chkIsTypeTable, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "IsTypeTable"));
			#endregion

		}
        public void Populate(nHydrate.Generator.Models.Table table)
        {
            _table = table;
            _table.PropertyChanged += new PropertyChangedEventHandler(_table_PropertyChanged);
            this.LoadControls();

            #region Hook events
            txtCodeFacade.Leave   += new EventHandler(txtCodeFacade_Leave);
            txtCodeFacade.Enter   += new EventHandler(txtCodeFacade_Enter);
            txtCodeFacade.KeyDown += new KeyEventHandler(txtCodeFacade_KeyDown);

            txtDatabaseSchema.Leave   += new EventHandler(txtDatabaseSchema_Leave);
            txtDatabaseSchema.Enter   += new EventHandler(txtDatabaseSchema_Enter);
            txtDatabaseSchema.KeyDown += new KeyEventHandler(txtDatabaseSchema_KeyDown);

            txtDescription.Leave   += new EventHandler(txtDescription_Leave);
            txtDescription.Enter   += new EventHandler(txtDescription_Enter);
            txtDescription.KeyDown += new KeyEventHandler(txtDescription_KeyDown);

            txtName.Leave   += new EventHandler(txtName_Leave);
            txtName.Enter   += new EventHandler(txtName_Enter);
            txtName.KeyDown += new KeyEventHandler(txtName_KeyDown);

            chkAllowAuditTracking.CheckedChanged += new EventHandler(chkAllowAuditTracking_CheckedChanged);
            chkAllowCreateAudit.CheckedChanged   += new EventHandler(chkAllowCreateAudit_CheckedChanged);
            chkAllowModifyAudit.CheckedChanged   += new EventHandler(chkAllowModifyAudit_CheckedChanged);
            chkAllowTimestamp.CheckedChanged     += new EventHandler(chkAllowTimestamp_CheckedChanged);
            chkEnforcePrimaryKey.CheckedChanged  += new EventHandler(chkEnforcePrimaryKey_CheckedChanged);
            chkGenerated.CheckedChanged          += new EventHandler(chkGenerated_CheckedChanged);
            chkImmutable.CheckedChanged          += new EventHandler(chkImmutable_CheckedChanged);
            chkIsAssociative.CheckedChanged      += new EventHandler(chkIsAssociative_CheckedChanged);
            chkIsTypeTable.CheckedChanged        += new EventHandler(chkIsTypeTable_CheckedChanged);

            #endregion

            #region Setup Tooltips
            toolTip1.SetToolTip(txtName, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "Name"));
            toolTip1.SetToolTip(txtDescription, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "Description"));
            toolTip1.SetToolTip(txtCodeFacade, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "CodeFacade"));
            toolTip1.SetToolTip(txtDatabaseSchema, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "DBSchema"));
            toolTip1.SetToolTip(chkAllowAuditTracking, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "AllowAuditTracking"));
            toolTip1.SetToolTip(chkAllowCreateAudit, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "AllowCreateAudit"));
            toolTip1.SetToolTip(chkAllowModifyAudit, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "AllowModifiedAudit"));
            toolTip1.SetToolTip(chkAllowTimestamp, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "AllowTimestamp"));
            toolTip1.SetToolTip(chkEnforcePrimaryKey, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "EnforcePrimaryKey"));
            toolTip1.SetToolTip(chkGenerated, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "Generated"));
            toolTip1.SetToolTip(chkImmutable, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "Immutable"));
            toolTip1.SetToolTip(chkIsAssociative, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "AssociativeTable"));
            toolTip1.SetToolTip(chkIsTypeTable, ReflectionHelper.GetPropertyAttributeDescriptionValue(_table, "IsTypeTable"));
            #endregion
        }