Example #1
0
        // contructor
        public ConfigImport()
        {
            // populate config info from database
            _Paths = Paths.GetPaths();
            _ConfigNetplaySettings = ConfigNetplaySettings.GetNetplay();
            _ConfigServerSettings  = new ConfigServerSettings(); // ConfigServerSettings.GetServer(100);

            _ConfigBaseSettings = ConfigBaseSettings.GetConfig(2000000000);

            _ConfigGbSettings         = ConfigBaseSettings.GetConfig(2000000001);
            _ConfigGbaSettings        = ConfigBaseSettings.GetConfig(2000000002);
            _ConfigLynxSettings       = ConfigBaseSettings.GetConfig(2000000003);
            _ConfigMdSettings         = ConfigBaseSettings.GetConfig(2000000004);
            _ConfigGgSettings         = ConfigBaseSettings.GetConfig(2000000005);
            _ConfigNgpSettings        = ConfigBaseSettings.GetConfig(2000000006);
            _ConfigPceSettings        = ConfigBaseSettings.GetConfig(2000000007);
            _ConfigPcfxSettings       = ConfigBaseSettings.GetConfig(2000000008);
            _ConfigPsxSettings        = ConfigBaseSettings.GetConfig(2000000009);
            _ConfigSmsSettings        = ConfigBaseSettings.GetConfig(2000000010);
            _ConfigNesSettings        = ConfigBaseSettings.GetConfig(2000000011);
            _ConfigSnesSettings       = ConfigBaseSettings.GetConfig(2000000012);
            _ConfigSsSettings         = ConfigBaseSettings.GetConfig(2000000013);
            _ConfigVbSettings         = ConfigBaseSettings.GetConfig(2000000014);
            _ConfigWswanSettings      = ConfigBaseSettings.GetConfig(2000000015);
            _ConfigSnes_faustSettings = ConfigBaseSettings.GetConfig(2000000016);
            _ConfigPce_fastSettings   = ConfigBaseSettings.GetConfig(2000000017);
        }
Example #2
0
        public void ImportSystemConfigFromDisk(ProgressDialogController controller, GSystem sys)
        {
            _ConfigBaseSettings = ConfigBaseSettings.GetConfig(2000000000 + sys.systemId);
            if (_ConfigBaseSettings == null)
            {
                // invalid config id
                return;
            }

            string configPath = _Paths.mednafenExe + @"\" + sys.systemCode + ".cfg";
            var    specCfg    = LoadConfigFromDisk(configPath);

            if (specCfg.Count == 0)
            {
                return;
            }
            // data was returned - begin import
            if (controller != null)
            {
                controller.SetMessage("Importing " + sys.systemCode + ".cfg");
            }
            ParseConfigIncoming(specCfg, 2000000000 + sys.systemId);

            // set to enabled
            //_ConfigBaseSettings.isEnabled = true;

            //ConfigBaseSettings.SetConfig(_ConfigBaseSettings);
        }
        // contructor
        public ConfigImport()
        {
            // populate config info from database
            _Paths = Paths.GetPaths();
            _ConfigNetplaySettings    = ConfigNetplaySettings.GetNetplay();
            _ConfigServerSettings     = new ConfigServerSettings(); // ConfigServerSettings.GetServer(100);
            _ConfigBaseSettings       = ConfigBaseSettings.GetConfig(2000000000);
            _ConfigGbSettings         = ConfigBaseSettings.GetConfig(2000000001);
            _ConfigGbaSettings        = ConfigBaseSettings.GetConfig(2000000002);
            _ConfigLynxSettings       = ConfigBaseSettings.GetConfig(2000000003);
            _ConfigMdSettings         = ConfigBaseSettings.GetConfig(2000000004);
            _ConfigGgSettings         = ConfigBaseSettings.GetConfig(2000000005);
            _ConfigNgpSettings        = ConfigBaseSettings.GetConfig(2000000006);
            _ConfigPceSettings        = ConfigBaseSettings.GetConfig(2000000007);
            _ConfigPcfxSettings       = ConfigBaseSettings.GetConfig(2000000008);
            _ConfigPsxSettings        = ConfigBaseSettings.GetConfig(2000000009);
            _ConfigSmsSettings        = ConfigBaseSettings.GetConfig(2000000010);
            _ConfigNesSettings        = ConfigBaseSettings.GetConfig(2000000011);
            _ConfigSnesSettings       = ConfigBaseSettings.GetConfig(2000000012);
            _ConfigSsSettings         = ConfigBaseSettings.GetConfig(2000000013);
            _ConfigVbSettings         = ConfigBaseSettings.GetConfig(2000000014);
            _ConfigWswanSettings      = ConfigBaseSettings.GetConfig(2000000015);
            _ConfigSnes_faustSettings = ConfigBaseSettings.GetConfig(2000000016);
            _ConfigPce_fastSettings   = ConfigBaseSettings.GetConfig(2000000017);

            if (VersionChecker.Instance.CurrentMedVerDesc.MajorINT > 0)
            {
                MednafenConfigName = @"mednafen.cfg";
            }
            else
            {
                MednafenConfigName = @"\mednafen-09x.cfg";
            }
        }
Example #4
0
        // constructor
        public SettingsHandler()
        {
            VH = new SettingsVisualHandler();
            AllSettingsPanels = VH.AllSettingPanels;

            /* Load all settings from database */
            // Paths Table
            Paths = Paths.GetPaths();
            // Global Settings Table
            GSettings = GlobalSettings.GetGlobals();
            // Config Table
            ConfigSettings = ConfigBaseSettings.GetConfig(2000000000);
            // Netplay Table
            NPSettings = ConfigNetplaySettings.GetNetplay();
            // Servers Table
            ServerSettings = ConfigServerSettings.GetServers();
        }
        // Methods

        public void ActivateEnabledSystems()
        {
            foreach (RadioButton rb in FilterButtons)
            {
                // if button is enabled in the database then make sure it is enabled in the UI

                string name = rb.Name.Replace("btnConfig", "");
                if (name == "Base")
                {
                    continue;
                }

                int configId = ConfigBaseSettings.GetConfigIdFromButtonName(name);

                // check whether this system is enabled
                if (ConfigBaseSettings.GetConfig(configId).isEnabled == true)
                {
                    rb.IsEnabled = true;
                }
            }
        }
Example #6
0
 public void ImportBaseConfig()
 {
     _ConfigBaseSettings = ConfigBaseSettings.GetConfig(2000000000);
 }