示例#1
0
        /// <summary>
        /// Takes care of the actual startup of Pyxis
        /// </summary>
        static void BootProcess()
        {
            // Always set the boot logo
            AppearanceManager.SetBootLogo();

            // Display Boot Screen
            bAniBoot = true;
            Thread thBoot = new Thread(BootScreen);

            thBoot.Priority = ThreadPriority.Highest;
            thBoot.Start();

            // We only need to load settings outside the emulator
            if (API.ActiveDevice != PyxisAPI.DeviceType.Emulator)
            {
                // Check for null settings
                if (SettingsManager.LCDSettings == null && API.ActiveDevice == PyxisAPI.DeviceType.Cobra)
                {
                    bAniBoot = false;
                    API.SelectScreenSize();
                }

                // Calibrate if needed
                if (SettingsManager.LCDSettings.calibrateLCD == ScreenCalibration.Gather && API.ActiveDevice == PyxisAPI.DeviceType.Cobra)
                {
                    thBoot.Suspend();
                    API.CalibrateScreen();
                    thBoot.Resume();
                }
                else if (SettingsManager.LCDSettings.calibrateLCD == ScreenCalibration.Restore && API.ActiveDevice == PyxisAPI.DeviceType.Cobra)
                {
                    SettingsManager.RestoreLCDCalibration();
                }
            }

            // Allow drives time to load
            Thread.Sleep(1500);

            // Enable Network Devices
            if (SettingsManager.BootSettings.EnableDHCP)
            {
                API.MyNetwork.AutoConnect = NetworkManager.AutoConnectType.DHCP;
            }

            // Display Desktop
            bAniBoot = false;
            API.DisplayDesktop();
        }