示例#1
0
        static void Main()
        {
            string proc = Process.GetCurrentProcess().ProcessName;
            Process[] processes = Process.GetProcessesByName(proc);
            LoginUI log = new LoginUI();
            log.StartPosition = FormStartPosition.CenterScreen;
            if (processes.Length > 1)
            {
                WinFormTelerikDS.WinForm.MensajeBox(log, "Sis Oxi", "La Aplicacion SisOxi ya se esta ejecutando", MensajeBox.informacion);
            }
            else
            {
                //Application.EnableVisualStyles();
                //Application.SetCompatibleTextRenderingDefault(false);



                if (log.ShowDialog() == DialogResult.OK)
                {

                    Application.EnableVisualStyles();
                    Application.Run(new PrincipalUI(log.GetCodigoEmpleado(), log.GetNombreEmpleado(), log.GetUsuario()));
                }

            }
        }
示例#2
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     
     LoginUI log = new LoginUI();
     //log.ShowDialog();
     if (log.ShowDialog() == DialogResult.OK)
     {
         Application.Run(new PrincipalUI(log.GetCodigoEmpleado()));
     }
 }