Ejemplo n.º 1
0
        private void SaveSystemsIni()
        {
            IniFileReader ini_file = new IniFileReader(ConfigPath);
            //ini_file.IniWriteValue("VisualPinball", "WorkingPath","");
            foreach (var item in Pinxsystem)
            {
                ini_file.IniWriteValue(item.ID, "Enabled", item.Enabled.ToString());
                ini_file.IniWriteValue(item.ID, "WorkingPath", item.WorkingPath);
                ini_file.IniWriteValue(item.ID, "TablePath", item.TablePath);
                ini_file.IniWriteValue(item.ID, "Executable", item.Executable);
                ini_file.IniWriteValue(item.ID, "Parameters", item.Parameters);

                ini_file.IniWriteValue(item.ID, "LaunchBeforeEnabled", item.LaunchBefore.ToString());
                ini_file.IniWriteValue(item.ID, "LaunchBeforeWorkingPath", item.LaunchBeforePath);
                ini_file.IniWriteValue(item.ID, "LaunchBeforeExecutable", item.LaunchBeforeexe);
                ini_file.IniWriteValue(item.ID, "LaunchBeforeParameters", item.LaunchBeforeParams);
                ini_file.IniWriteValue(item.ID, "LaunchBeforeWaitForExit", item.LaunchBeforeWaitForExit.ToString());
                ini_file.IniWriteValue(item.ID, "LaunchBeforeHideWindow", item.LaunchBeforeHideWindow.ToString());

                ini_file.IniWriteValue(item.ID, "LaunchAfterEnabled", item.LaunchAfter.ToString());
                ini_file.IniWriteValue(item.ID, "LaunchAfterWorkingPath", item.LaunchAfterWorkingPath);
                ini_file.IniWriteValue(item.ID, "LaunchAfterExecutable", item.LaunchAfterexe);
                ini_file.IniWriteValue(item.ID, "LaunchAfterParameters", item.LaunchAfterParams);
                ini_file.IniWriteValue(item.ID, "LaunchAfterWaitForExit", item.LaunchAfterWaitForExit.ToString());
                ini_file.IniWriteValue(item.ID, "LaunchAfterHideWindow", item.LaunchAfterHideWindow.ToString());

                if (item.ID == "VisualPinball")
                {
                    ini_file.IniWriteValue(item.ID, "NVRAMPath", item.NVRAMPATH);
                    ini_file.IniWriteValue(item.ID, "Bypass", "True");
                }

                if (item.ID == "FuturePinball")
                {
                    ini_file.IniWriteValue(item.ID, "FPRAMPath", item.NVRAMPATH);
                    ini_file.IniWriteValue(item.ID, "MouseClickFocus", "True");
                }

            }
        }