Esempio n. 1
0
 private void btnOk_Click(object sender, RoutedEventArgs e)
 {
     if (!Extensions.IsEmpty(tbCardPath.Text))
     {
         if (lvMemCards.SelectedItems.Count == 0)
         {
             Legacy.Tools.ShowMessage("You must select a card to assign", Legacy.MessageType.Error);
         }
         else
         {
             _pcsx2Ui.Write("Folders", "UseDefaultMemoryCards", "disabled");
             var iNIPath      = Legacy.UserSettings.ConfigDir + @"\" + g.FileSafeTitle + @"\PCSX2_ui.ini";
             var selectedItem = (Legacy.MemoryCard)lvMemCards.SelectedItem;
             var file         = new Legacy.IniFile(iNIPath);
             file.Write("MemoryCards", "Slot1_Enable", "enabled");
             file.Write("MemoryCards", "Slot1_Filename", selectedItem.Name);
             file.Write("Folders", "MemoryCards", Extensions.Escape(tbCardPath.Text));
             Legacy.Tools.ShowMessage("Successfully assigned and enabled " + selectedItem.Name + " to slot 1\n for the game " + g.Title, Legacy.MessageType.Info);
             Close();
         }
     }
     else
     {
         Legacy.Tools.ShowMessage("The selected memory card cannot be null", Legacy.MessageType.Error);
     }
 }
Esempio n. 2
0
        private void SaveSettings()
        {
            var str  = cbNoGui.IsChecked.Value ? "true" : "false";
            var str2 = cbUseCd.IsChecked.Value ? "true" : "false";
            var str3 = cbNoHacks.IsChecked.Value ? "true" : "false";
            var str4 = cbFullBoot.IsChecked.Value ? "true" : "false";
            var str5 = cbEnableCheats.IsChecked.Value ? "enabled" : "disabled";

            pcsx2_ini.Write("Boot", "NoGUI", str);
            pcsx2_ini.Write("Boot", "UseCD", str2);
            pcsx2_ini.Write("Boot", "NoHacks", str3);
            pcsx2_ini.Write("Boot", "FullBoot", str4);
            pcsx2_ini.Write("Boot", "EnableCheats", str5);
            pcsx2_vm.Write("EmuCore", "EnableCheats", str5);
            if (lbBios.SelectedItem != null)
            {
                pcsx2_ui.Write("Filenames", "BIOS", Extensions.Escape(((Legacy.Bios)lbBios.SelectedItem).Tag.ToString()));
            }
        }