Exemplo n.º 1
0
        private void cmdRegister_Click(object sender, System.EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();

            var F = new RegistrationForm();
            F.ShowDialog();
        }
Exemplo n.º 2
0
        private void cmdRegister_Click(object sender, System.EventArgs e)
        {
            //If already registered...warn
            if (!string.IsNullOrEmpty(txtKey.Text))
            {
                if (MessageBox.Show("This machine has already been registered and you are logged-in. Are you sure that you want re-register or login as a different user?", "Already Registered", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != System.Windows.Forms.DialogResult.Yes)
                {
                    return;
                }
            }

            this.DialogResult = DialogResult.Cancel;
            this.Hide();
            Application.DoEvents();
            this.Close();

            var F = new RegistrationForm();
            F.ShowDialog();

        }