public ContainerInitForm() { InitializeComponent(); SetFatherComponents(); ListDataGridView(); BpTypeComboBoxInit(); base._yesBtn.Click += new EventHandler((s, e) => { var ctn = new Models.Container(); RefreshContainer(ctn); ctn.SaveXmlByName(); this.DialogResult = DialogResult.Yes; }); }