public bool CheckCard(CardInfos infos) { if (cb_cardtype1.SelectedIndex != 0) { if (!infos.GetCardTypes().Contains((CardType)cb_cardtype1.SelectedItem)) { return(false); } } if (cb_cardtype2.SelectedIndex != 0) { if (!infos.GetCardTypes().Contains((CardType)cb_cardtype2.SelectedItem)) { return(false); } } if (cb_cardattribute.SelectedIndex != 0) { if (infos.Attribute != ((int)(CardAttribute)cb_cardattribute.SelectedItem)) { return(false); } } if (cb_cardrace.SelectedIndex != 0) { if (infos.Race != ((int)(CardRace)cb_cardrace.SelectedItem)) { return(false); } } if (cb_setnames.SelectedIndex != 0) { if (!infos.GetSetName().Contains(cb_setnames.SelectedItem.ToString())) { return(false); } } if (tb_level.Text != string.Empty) { if (infos.Level != Convert.ToInt32(tb_level.Text)) { return(false); } } if (tb_attack.Text != string.Empty) { if (infos.Atk != Convert.ToInt32(tb_attack.Text)) { return(false); } } if (tb_defence.Text != string.Empty) { if (infos.Def != Convert.ToInt32(tb_defence.Text)) { return(false); } } if (tb_name.Text != string.Empty) { if (!infos.Name.ToUpper().Contains(tb_name.Text.ToUpper())) { return(false); } } return(true); }