示例#1
0
        private void btnGetName_Click(object sender, EventArgs e)
        {
            dlgName dialog = new dlgName();
            dialog.penguinName = "Type your penguin's name...";
            DialogResult dr = dialog.ShowDialog();

            if(dr==DialogResult.OK)
            {
                lblName.Text = dialog.penguinName;
            }
        }
示例#2
0
        private void btnGetName_Click(object sender, EventArgs e)
        {
            dlgName dialog = new dlgName();

            dialog.penguinName = "Type your penguin's name...";
            DialogResult dr = dialog.ShowDialog();

            if (dr == DialogResult.OK)
            {
                lblName.Text = dialog.penguinName;
            }
        }