Beispiel #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var inicio_sesion = new formInicioSesion();

            inicio_sesion.Show();
            Application.Run();
            //Application.Run(new formInicioSesion());
        }
Beispiel #2
0
        public static void CerrarSesion(object sender, EventArgs e)
        {
            afiliado    = null;
            profesional = null;
            usuario     = null;
            FormCollection fc      = Application.OpenForms;
            List <Form>    acerrar = new List <Form>();

            foreach (Form frm in fc)
            {
                acerrar.Add(frm);
            }
            if (acerrar != null)
            {
                for (int i = 0; i < acerrar.Count; i++)
                {
                    acerrar[i].Close();
                }
            }
            var login = new formInicioSesion();

            login.Show();
        }