Exemple #1
0
        public static void LoadGlobalSettings(CheckBox EnableNetplay, CheckBox EnableSnes_Faust, CheckBox EnablePce_Fast, ComboBox GuiZoom, CheckBox MinToTaskBar, CheckBox HideSidebar,
                                              CheckBox chkAllowBanners, CheckBox chkAllowBoxart, CheckBox chkAllowScreenshots, CheckBox chkAllowFanart, CheckBox chkPreferGenesis,
                                              CheckBox chkAllowManuals, CheckBox chkAllowMedia, CheckBox chkSecondaryScraperBackup, RadioButton rbGDB, RadioButton rbMoby, Slider slScreenshotsPerHost, Slider slFanrtsPerHost,
                                              CheckBox chkAllowUpdateCheck, CheckBox chkBackupMednafenConfig, CheckBox chkSaveSysConfigs, ComboBox comboImageTooltipSize, CheckBox chkLoadConfigsOnStart, CheckBox chkEnableConfigToolTips,
                                              CheckBox chkshowGLYear, CheckBox chkshowGLESRB, CheckBox chkshowGLCoop, CheckBox chkshowGLDeveloper, CheckBox chkshowGLPublisher, CheckBox chkshowGLPlayers, CheckBox chkEnableClearCacheOnExit,
                                              CheckBox chkrememberSysWinPositions, CheckBox chkHideCountryFilter, ComboBox cbFormatGameTitles)
        {
            GlobalSettings gs = GetGlobals();

            // update all checkboxes
            EnableNetplay.IsChecked    = gs.enableNetplay;
            EnablePce_Fast.IsChecked   = gs.enablePce_fast;
            EnableSnes_Faust.IsChecked = gs.enableSnes_faust;

            chkrememberSysWinPositions.IsChecked = gs.rememberSysWinPositions;

            //FullScreen.IsChecked = gs.fullScreen;
            //BypassConfig.IsChecked = gs.bypassConfig;

            // update comboboxes
            GuiZoom.SelectedValue  = gs.guiZoom.ToString();
            MinToTaskBar.IsChecked = gs.minToTaskBarOnGameLaunch;
            HideSidebar.IsChecked  = gs.hideSidebar;

            chkSaveSysConfigs.IsChecked       = gs.saveSystemConfigs;
            chkLoadConfigsOnStart.IsChecked   = gs.importConfigsOnStart;
            chkEnableConfigToolTips.IsChecked = gs.enableConfigToolTips;

            chkHideCountryFilter.IsChecked = gs.hideCountryFilters;

            chkEnableClearCacheOnExit.IsChecked = gs.enableClearCacheOnExit;

            comboImageTooltipSize.SelectedValue = gs.imageToolTipPercentage;

            cbFormatGameTitles.SelectedValue = gs.changeTitleCase;

            //chkAllBaseSettings.IsChecked = gs.showAllBaseSettings;
            //MessageBox.Show(gs.guiZoom.ToString());

            // game scraping options
            chkAllowBanners.IsChecked           = gs.scrapeBanners;
            chkAllowBoxart.IsChecked            = gs.scrapeBoxart;
            chkAllowFanart.IsChecked            = gs.scrapeFanart;
            chkAllowScreenshots.IsChecked       = gs.scrapeScreenshots;
            chkPreferGenesis.IsChecked          = gs.preferGenesis;
            chkAllowMedia.IsChecked             = gs.scrapeMedia;
            chkAllowManuals.IsChecked           = gs.scrapeManuals;
            chkSecondaryScraperBackup.IsChecked = gs.enabledSecondaryScraper;

            slScreenshotsPerHost.Value = gs.maxScreenshots;
            slFanrtsPerHost.Value      = gs.maxFanarts;

            chkAllowUpdateCheck.IsChecked = gs.checkUpdatesOnStart;

            chkBackupMednafenConfig.IsChecked = gs.backupMednafenConfig;

            chkshowGLYear.IsChecked      = gs.showGLYear;
            chkshowGLCoop.IsChecked      = gs.showGLCoop;
            chkshowGLDeveloper.IsChecked = gs.showGLDeveloper;
            chkshowGLESRB.IsChecked      = gs.showGLESRB;
            chkshowGLPlayers.IsChecked   = gs.showGLPlayers;
            chkshowGLPublisher.IsChecked = gs.showGLPublisher;

            chkshowGLYear.Visibility      = Visibility.Collapsed;
            chkshowGLCoop.Visibility      = Visibility.Collapsed;
            chkshowGLDeveloper.Visibility = Visibility.Collapsed;
            chkshowGLESRB.Visibility      = Visibility.Collapsed;
            chkshowGLPlayers.Visibility   = Visibility.Collapsed;
            chkshowGLPublisher.Visibility = Visibility.Collapsed;

            if (gs.primaryScraper == 1)
            {
                // thegamesdb
                rbGDB.IsChecked = true;
            }
            if (gs.primaryScraper == 2)
            {
                // moby
                rbMoby.IsChecked = true;
            }
        }
Exemple #2
0
        // get hidesidebar settings
        public static bool GetHideSidebar()
        {
            GlobalSettings g = GetGlobals();

            return(g.hideSidebar.Value);
        }
Exemple #3
0
        // get mintotaskbar value
        public static bool Min2TaskBar()
        {
            GlobalSettings g = GetGlobals();

            return(g.minToTaskBarOnGameLaunch.Value);
        }
Exemple #4
0
        public static double GetSidebarWidth()
        {
            var gs = GlobalSettings.GetGlobals();

            return(gs.sidebarwidth);
        }
Exemple #5
0
        public static GlobalSettings GetGlobalDefaults()
        {
            GlobalSettings gs = new GlobalSettings
            {
                databaseGenerated        = false,
                fullGuiScreen            = false,
                fullScreen               = true,
                bypassConfig             = false,
                settingsId               = 1,
                enableNetplay            = false,
                serverSelected           = 1,
                enablePce_fast           = false,
                enableSnes_faust         = false,
                guiZoom                  = 1,
                minToTaskBarOnGameLaunch = true,
                hideSidebar              = false,
                showAllBaseSettings      = true,
                gdbLastUpdated           = DateTime.Now,
                glGameStats              = true,
                glGameInfo               = true,
                glFanart                 = true,
                glOverview               = true,
                glScrapingOptions        = true,
                glScreenshots            = true,
                glSystemInfo             = true,
                glManuals                = true,
                scrapeBanners            = true,
                scrapeBoxart             = true,
                scrapeFanart             = true,
                scrapeScreenshots        = true,
                scrapeManuals            = true,
                scrapeMedia              = true,
                enabledSecondaryScraper  = true,
                preferGenesis            = true,
                primaryScraper           = 1,
                maxScreenshots           = 4,
                maxFanarts               = 4,
                colorBackground          = "basedark",
                colorAccent              = "Emerald",
                checkUpdatesOnStart      = false,
                backupMednafenConfig     = true,
                saveSystemConfigs        = true,
                imageToolTipPercentage   = 0.9,
                importConfigsOnStart     = false,
                enableConfigToolTips     = true,
                enableClearCacheOnExit   = true,

                showGLCoop      = true,
                showGLDeveloper = true,
                showGLESRB      = true,
                showGLPlayers   = true,
                showGLPublisher = true,
                showGLYear      = true,

                changeTitleCase = 0,

                glFil01 = "3FFF",
                glFil02 = "3FFF",
                glFil03 = "3FFF",
                glFil04 = "3FFF",
                glFil05 = "3FFF",
                glFil06 = "3FFF",
                glFil07 = "3FFF",
                glFil08 = "3FFF",
                glFil09 = "3FFF",
                glFil10 = "3FFF",
                glFil11 = "3FFF",
                glFil12 = "3FFF",
                glFil13 = "3FFF",
                glFil14 = "3FFF",
                glFil15 = "3FFF",
                glFil16 = "3FFF",
                glFil17 = "3FFF",
                glFil18 = "3FFF",
                glFil19 = "3FFF",

                hideCountryFilters = false,

                coreVis1  = true,
                coreVis2  = true,
                coreVis3  = true,
                coreVis4  = true,
                coreVis5  = true,
                coreVis6  = true,
                coreVis7  = true,
                coreVis8  = true,
                coreVis9  = true,
                coreVis10 = true,
                coreVis11 = true,
                coreVis12 = true,
                coreVis13 = true,
                coreVis14 = true,
                coreVis15 = true,
                coreVis16 = true,
                coreVis17 = true,
                coreVis18 = true,

                sidebarwidth       = 350,
                bgImagePath        = @"Data\Graphics\medicon.png",
                bgImageDisplayType = 0,
                bgImageOpacity     = 0.1,

                rememberSysWinPositions = false
            };

            return(gs);
        }
Exemple #6
0
        public static void SaveWindowPosBySystem(int systemId, System.Drawing.Point point)
        {
            GlobalSettings gs = GlobalSettings.GetGlobals();

            string coords = ConvertPointToString(point);

            switch (systemId)
            {
            case 1:
                gs.sysWinPos1 = coords;
                break;

            case 2:
                gs.sysWinPos2 = coords;
                break;

            case 3:
                gs.sysWinPos3 = coords;
                break;

            case 4:
                gs.sysWinPos4 = coords;
                break;

            case 5:
                gs.sysWinPos5 = coords;
                break;

            case 6:
                gs.sysWinPos6 = coords;
                break;

            case 7:
                gs.sysWinPos7 = coords;
                break;

            case 8:
                gs.sysWinPos8 = coords;
                break;

            case 9:
                gs.sysWinPos9 = coords;
                break;

            case 10:
                gs.sysWinPos10 = coords;
                break;

            case 11:
                gs.sysWinPos11 = coords;
                break;

            case 12:
                gs.sysWinPos12 = coords;
                break;

            case 13:
                gs.sysWinPos13 = coords;
                break;

            case 14:
                gs.sysWinPos14 = coords;
                break;

            case 15:
                gs.sysWinPos15 = coords;
                break;

            case 16:
                gs.sysWinPos16 = coords;
                break;

            case 17:
                gs.sysWinPos17 = coords;
                break;

            case 18:
                gs.sysWinPos18 = coords;
                break;
            }

            SetGlobals(gs);
        }