示例#1
0
        private void pruevaLogingToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            Loging log = new Loging();

            log.StartPosition = FormStartPosition.CenterScreen;
            log.MdiParent     = this;
            log.Show();
        }
示例#2
0
        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));
            }
        }
示例#3
0
        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;
            }
        }