private void pruevaLogingToolStripMenuItem_Click_1(object sender, EventArgs e) { Loging log = new Loging(); log.StartPosition = FormStartPosition.CenterScreen; log.MdiParent = this; log.Show(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Loging login = new Loging(); Application.Run(login); if (login.DialogResult == DialogResult.OK) { Application.Run(new MainForm(login.UsuarioActual)); } }
private void cambiarDeUsuarioToolStripMenuItem_Click(object sender, EventArgs e) { Loging frm = new Loging(); frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { this.usuarioActual = frm.UsuarioActual; this.ActualizarPermisos(sistemaToolStripMenuItem); foreach (ToolStripMenuItem item in menuStrip1.Items) { this.ActualizarPermisos(item); } lblNombreUsuario.Text = this.usuarioActual.Nombre; } }