Beispiel #1
0
        static void Main()
        {
            log4net.Config.XmlConfigurator.Configure();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            frmSaldoDevedor frmMain = new frmSaldoDevedor();

            RunApp();
        }
Beispiel #2
0
        private static void RunApp()
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);

            frmSaldoDevedor frmMain = new frmSaldoDevedor();

            frmLogin.FormularioDeLogin.Owner = frmMain;
            frmMain.Hide();

            if (frmLogin.FormularioDeLogin.ShowDialog().Equals(DialogResult.OK))
            {
                Application.Run(frmMain);
            }
            else
            {
                Application.Exit();
            }
        }