private void btnShowDialog_Click(object sender, EventArgs e) { frmOther frm = new frmOther(); if (frm.ShowDialog() == DialogResult.OK) lblInfo.Text = frm.UserInput; else lblInfo.Text = "用户取消了输入。"; }
private void btnShowDialog_Click(object sender, EventArgs e) { frmOther frm = new frmOther(); if (frm.ShowDialog() == DialogResult.OK) { lblInfo.Text = frm.UserInput; } else { lblInfo.Text = "用户取消了输入。"; } }