private void InternalApplyCodes()
        {
            IList <CheatCode> codes = new List <CheatCode>();

            foreach (CheckBox cb in Controls.OfType <GroupBox>().SelectMany(grp => grp.Controls.OfType <CheckBox>().Where(ctl => ctl.Checked)))
            {
                var amount = (short)numSupplyAmt.Value;
                var code   = cb.Tag?.ToString();

                if (cb.Parent is GroupBox && cb.Parent.Text.StartsWith("One"))
                {
                    amount = 1;
                }
                else if (cb.Text.StartsWith("XP"))
                {
                    amount = (short)numXPAmt.Value;
                }
                else if (cb.Text.StartsWith("Custom"))
                {
                    var custom = grpMisc.Controls[code];
                    var num    = (grpMisc.Controls[custom?.Tag.ToString()] as NumericUpDown);

                    code   = custom?.Text;
                    amount = (short)(num?.Value ?? 0);
                }

                if (string.IsNullOrEmpty(code) || amount <= 0)
                {
                    continue;
                }

                codes.Add(new CheatCode(cb.Text, code, amount));
            }

            CallBackMod.SubmitGameCheatCode(codes);
        }
 private bool GetValidGameHandle(bool bShowWindowTest = false)
 {
     return(CallBackMod.AttachToGameWindow(cboWindowTitle.Text, bShowWindowTest));
 }