private void FormPrincipal_Load(object sender, EventArgs e) { form_login = new FormLogin(); form_login.MdiParent=this; form_login.Show(); //MessageBox.Show(Environment.MachineName); }
private void btnCerrarSesion_Click(object sender, EventArgs e) { UserCache.idUsuario = 0; UserCache.nombre = null; UserCache.apellido = null; UserCache.direccion = null; UserCache.dni = null; UserCache.telefono = null; UserCache.correo = null; UserCache.sexo = null; UserCache.idRol = 0; UserCache.usuario = null; UserCache.password = null; UserCache.foto = null; FormLogin login = FormLogin.ObtenerInstanciaLogin(); login.Show(); this.Close(); Instancia = null; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(FormLogin.ObtenerInstanciaLogin()); }