Пример #1
0
 private void EditCheat()
 {
     if (lstCheats.SelectedItems.Count == 1)
     {
         using (frmCheat frm = new frmCheat((CheatCode)lstCheats.SelectedItems[0].Tag)) {
             if (frm.ShowDialog(this) == DialogResult.OK)
             {
                 UpdateCheatList();
                 ApplyCheats();
             }
         }
     }
 }
Пример #2
0
        private void mnuAddCheat_Click(object sender, EventArgs e)
        {
            CheatCode newCheat = new CheatCode()
            {
                Enabled = true
            };

            using (frmCheat frm = new frmCheat(newCheat)) {
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    AddCheats(new List <CheatCode>()
                    {
                        newCheat
                    });
                }
            }
        }