Yyqd_Window win = new Yyqd_Window() { CompanyID = textBox_companyId.Text.Trim(), CompanyName = textBox_work_unit.Text.Trim(), ImportName = "" }; win.Unloaded += (o, ae) => { if (win.SelectedValue != null) { this.Sign(win.SelectedValue); } }; DialogHelper.ShowDialog(win); this.Focus();