public FrmUserEditor(Entities.User user = null) { InitializeComponent(); this.lblName = new FormLabel(0, "lblName", true, "username"); this.lblLanguage = new FormLabel(2, "lblLanguage", true, "language"); this.lblPassword = new FormLabel(4, "lblPassword", true, "password"); this.lblRole = new FormLabel(6, "lblRole", true, "role_name"); this.tlpMain.Controls.Add(this.lblName, 0, 2); this.tlpMain.Controls.Add(this.lblPassword, 0, 3); this.tlpMain.Controls.Add(this.lblLanguage, 0, 4); this.tlpMain.Controls.Add(this.lblRole, 0, 5); this.tlpMain.BackColor = System.Drawing.Color.White; if (user == null) { this.user = new Entities.User(); } else { this.editUser = user; this.user = user.Clone(); } this.Load += new EventHandler(FrmUserEditor_Load); }