Beispiel #1
0
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //if ANYONE puts code before those two winforms config lines they will be declared a drunky. - Michael
            SkinEngine.SetPostProcessor(new DitheringSkinPostProcessor());
            LoginManager.Init(new GUILoginFrontend());
            CrashHandler.SetGameMetadata(Assembly.GetExecutingAssembly());
            SkinEngine.SetIconProber(new ShiftOSIconProvider());
            TerminalBackend.TerminalRequested += () =>
            {
                AppearanceManager.SetupWindow(new Applications.Terminal());
            };
            Localization.RegisterProvider(new WFLanguageProvider());
            Infobox.Init(new Dialog());
            LoginManager.Init(new WinForms.GUILoginFrontend());
            FileSkimmerBackend.Init(new WinformsFSFrontend());
            var desk = new WinformsDesktop();

            Desktop.Init(desk);
            OutOfBoxExperience.Init(new Oobe());
            AppearanceManager.Initiate(new WinformsWindowManager());
#if OLD
            SaveSystem.PreDigitalSocietyConnection += () =>
            {
                Action completed = null;
                completed = () =>
                {
                    SaveSystem.Ready.Set();
                    Engine.AudioManager.PlayCompleted -= completed;
                    AudioManager.StartAmbientLoop();
                };
                Engine.AudioManager.PlayCompleted += completed;
                Engine.AudioManager.PlayStream(Properties.Resources.dial_up_modem_02);
            };

            Application.Run(desk);
#else
            Application.Run(new MainMenu.MainMenu(desk));
#endif
        }