コード例 #1
0
        static void Main()
        {
            xFonts = new Fonts(); // Whohoo!
            xFonts.SetupFonts();  // Get the fonts up and running!

            Application.SetCompatibleTextRenderingDefault(false);
            SplashLoader.ShowSplashScreen(); // Run the method to display the splash screen.

            /// Enable for BIGUI
            //xMainWindow = new MainForm(); // Loading occurs here in the background.
            xSmallMainWindow = new MainFormSmall(); // Loading occurs here in the BG.

            Thread.Sleep(1000);
            // Sleep the thread for 1000ms, this MUST equal at least the animation speed of the circular progressbar(500ms), else you'd risk
            // exception as a form closes and the animation library attempts to change the visual value for the circle.
            SplashLoader.CloseForm();
            Application.Run(xSmallMainWindow);
        }
コード例 #2
0
        public void InitializeSystem()
        {
            SplashLoader.xSetPercentage(10);
            SplashLoader.xSetMessage("Loading 1/6...");

            Program.xSmallMainWindow = this;
            SplashLoader.xSetPercentage(15);
            Toolstrip_Bottom.Renderer = new MyToolStrip();                                                                            // Do not draw an outline on toolstrips!
            SplashLoader.xSetPercentage(20);
            this.Region = System.Drawing.Region.FromHrgn(WinAPIComponents.CreateRoundRectRgn(0, 0, this.Width, this.Height, 30, 30)); // Rounded edges!

            SplashLoader.xSetPercentage(30);
            SplashLoader.xSetMessage("Loading 2/6...");

            Program.xFonts.SetupMainWindow(this);            // Call SetupFonts in xFonts object.
            ButtonColour = Color.FromArgb(232, 234, 246);    // Set the button default colour to the background colour of the light control buttons.

            SplashLoader.xSetPercentage(40);
            SplashLoader.xSetMessage("Loading 3/6...");

            /// Set local theme overrides!
            RedirectThemeValues();                           // Must preceede following.
            ThemeMethods.DoThemeAssets(this);                // Automatically theme assets!

            SplashLoader.xSetPercentage(50);
            SplashLoader.xSetMessage("Loading 4/6...");

            SetupSwappableScreens();             // If using Swappable forms!
            ThemeMethods.AutoLoadCurrentTheme(); // Automatically theme the world!

            //ShowWelcomeScreen(); // Show the welcome screen!
            ShowOptionsMenu();                                                                // Show the default options menu.

            DirectInputDevicesHook.PlayerControllers = DirectInputDevicesHook.GetJoySticks(); // Setup Gamepads!
            DirectInputDevicesHook.SetupGamePadTick();                                        // Setup Gamepad Ticks!

            SplashLoader.xSetPercentage(70);
            SplashLoader.xSetMessage("Loading 5/6...");
            LoadHeroesSettings();

            SplashLoader.xSetMessage("Loading 6/6...");
            SplashLoader.xSetPercentage(100);
            SplashLoader.UpdateStatusCircleComplete = true;
        }