예제 #1
0
 private void btnShowDialog_Click(object sender, EventArgs e)
 {
     frmOther frm = new frmOther();
     if (frm.ShowDialog() == DialogResult.OK)
         lblInfo.Text = frm.UserInput;
     else
         lblInfo.Text = "用户取消了输入。";
 }
예제 #2
0
파일: frmMain.cs 프로젝트: shouzhuo1/CSharp
        private void btnShowDialog_Click(object sender, EventArgs e)
        {
            frmOther frm = new frmOther();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                lblInfo.Text = frm.UserInput;
            }
            else
            {
                lblInfo.Text = "用户取消了输入。";
            }
        }