public AppContext Setup()
        {
            // Setup logging
            var lf = new Log4NetLogFactory();

            lf.AddConsoleAppender().AddFileAppender().EndConfig();
            LogManager.SetLogFactory(lf);

            _log = LogManager.GetLogger(typeof(AppContext));
            _log.Debug("Starting setup of app context");

            // Setup GUI
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Register system stuff
            RegisterSystem();

            // Add stuff to the container
            RegisterWdc();

            // Register all of the forms
            RegisterWinForms();

            // Validate
            _container.Verify();

            return(this);
        }
Beispiel #2
0
        public static void SetupLogging()
        {
            if (LogManager.IsReady())
            {
                return;
            }

            Log4NetLogFactory lf = new Log4NetLogFactory();

            lf.AddConsoleAppender().SetLogLevel("debug").EndConfig();
            LogManager.SetLogFactory(lf);
        }