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);
     }
 }
Beispiel #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()));
            }
        }
		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);
			}
		}
Beispiel #4
0
 private void btnOk_Click(object sender, RoutedEventArgs e)
 {
     if (lbVersions.SelectedItems.Count == 0)
     {
         Legacy.Tools.ShowMessage("A PCSX2 version must be selected", Legacy.MessageType.Error);
     }
     else
     {
         pcsx2_ini.Write("Additional Executables", "Default",
                         Extensions.IsEmpty(selectedExe) ? original : selectedExe);
         Close();
     }
 }
Beispiel #5
0
 private void btnOk_Click(object sender, RoutedEventArgs e)
 {
     if (lbShaders.SelectedItems.Count == 0)
     {
         Legacy.Tools.ShowMessage("A shader must be selected!", Legacy.MessageType.Error);
     }
     else
     {
         pcsx2_ini.Read("Shader", "Default");
         var selectedItem = (ListViewItem)lbShaders.SelectedItem;
         pcsx2_ini.Write("Shader", "Default", selectedItem.Tag.ToString());
         Close();
     }
 }