Beispiel #1
0
        private static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(LogUnhandledException);

            Base.Program.LogInfo();

            #if DEBUG
            var server = new HttpServer(ApplicationInfo.CurrentDirectory + @"..\..\Http\Views\");
            #else
            var server = new HttpServer(ApplicationInfo.CurrentDirectory + @"views\");
            #endif
            Server = server;

            port = server.Port;

            //			foreach (string resource in EmbeddedResource.GetAllResources())
            //			{
            //				System.Diagnostics.Debug.WriteLine(resource);
            //			}

            string root = IO.CheckRoot(@".\");
            root = IO.CheckRoot(@"..\");
            root = IO.CheckRoot(@"..\..\");
            root = IO.CheckRoot(@"\");

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Menu());

            Server.Stop();
            System.Threading.Thread.Sleep(500);
            //throw new ApplicationException("testing unhandled exception");
            // Program.Log("shutting down");
            // Application.Exit();
        }