Пример #1
0
        private void tsbFechar_Click(object sender, EventArgs e)
        {
            Form login = new formLogin();

            login.MdiParent       = MDISingleton.instanciaMDI();
            login.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            login.Dock            = DockStyle.Fill;

            login.Show();
            this.Dispose();
        }
Пример #2
0
        private void mdiTelaInicial_Load(object sender, EventArgs e)
        {
            Form login = new formLogin();

            login.MdiParent       = MDISingleton.instanciaMDI();
            login.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            login.Dock            = DockStyle.Fill;

            login.Show();

            //new formLogin { MdiParent = MDISingleton.instanciaMDI() }.Show();
        }
        private void tsbSalvar_Click(object sender, EventArgs e)
        {
            Usuario novouser = new Usuario();

            novouser.Nome           = txtNome.Text;
            novouser.Sobrenome      = txtSobrenome.Text;
            novouser.Nacionalidade  = cbNacionalidade.SelectedItem.ToString();
            novouser.DataNascimento = dtNascimento.Value;
            novouser.Documento      = txtDocumento.Text;
            novouser.Nickname       = Text;
            novouser.Senha          = txtSenha.Text;

            novouser.Gravar();


            Form login = new formLogin();

            login.MdiParent       = MDISingleton.instanciaMDI();
            login.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            login.Dock            = DockStyle.Fill;
            login.Show();

            this.Dispose();
        }