Пример #1
0
        private void btnShowDialog_Click(object sender, EventArgs e)
        {
            var sub          = new ModeSampleSub();
            var dialogResult = sub.ShowDialog(sub);

            switch (dialogResult)
            {
            case DialogResult.OK:
                MessageBox.Show("DialogResult = OK");
                break;

            case DialogResult.Cancel:
                MessageBox.Show("DialogResult = Cancel");
                break;

            default:
                break;
            }
        }
Пример #2
0
        private void btnShow_Click(object sender, EventArgs e)
        {
            var sub = new ModeSampleSub();

            sub.Show();
        }