Example #1
0
 private void lstCheats_DoubleClick(object sender, EventArgs e)
 {
     if (lstCheats.SelectedItems.Count == 1)
     {
         frmCheat frm = new frmCheat((CheatInfo)lstCheats.SelectedItems[0].Tag);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             UpdateGameList();
         }
     }
 }
Example #2
0
        private void btnCreateCheat_Click(object sender, EventArgs e)
        {
            RomInfo   romInfo  = InteropEmu.GetRomInfo();
            CheatInfo newCheat = new CheatInfo {
                GameCrc   = romInfo.GetPrgCrcString(),
                GameName  = romInfo.GetRomName(),
                Address   = (uint)lstAddresses.CurrentAddress,
                CheatType = CheatType.Custom
            };

            frmCheat frm = new frmCheat(newCheat);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                OnAddCheat?.Invoke(newCheat, new EventArgs());
            }
        }
Example #3
0
        private void mnuAddCheat_Click(object sender, EventArgs e)
        {
            CheatInfo newCheat = new CheatInfo {
                GameCrc  = _selectedItem?.Crc,
                GameName = _selectedItem?.Text
            };

            using (frmCheat frm = new frmCheat(newCheat)) {
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    AddCheats(new List <CheatInfo>()
                    {
                        newCheat
                    });
                }
            }
        }
Example #4
0
 private void lstCheats_DoubleClick(object sender, EventArgs e)
 {
     if (lstCheats.SelectedItems.Count == 1)
     {
         Configuration configBackup = ConfigManager.Config.Clone();
         using (frmCheat frm = new frmCheat((CheatInfo)lstCheats.SelectedItems[0].Tag)) {
             if (frm.ShowDialog() == DialogResult.OK)
             {
                 UpdateGameList();
                 CheatInfo.ApplyCheats(_cheats, chkDisableCheats.Checked);
             }
             else
             {
                 ConfigManager.RevertDirtyToBackup(configBackup);
             }
         }
     }
 }