private void lostTag(object sender, RoutedEventArgs e) { _mdl.onRemoved(); _mdls.Remove(_id); _views.Remove(_id); _mdl = null; updateAll(); }
private void gotTag(object sender, RoutedEventArgs e) { //On a récupéré un tag sur la table, on créée un MdlTag ++lastIDInsert; _id = lastIDInsert; _mdl = new MdlTag((int)VisualizedTag.Value); _mdls.Add(lastIDInsert, _mdl); _views.Add(lastIDInsert, this); _mdl.onTag(); //Si on a un antivirus, on le stocke if (_mdl.tag == (int)MdlTag.TagCorrespondance.ANTIVIRUS) antivirus = this; //On vérifie les catalyses (si des cartes s'activent automatiquement) catalyse(); // Affichage du bon Layout updateAll(); // Bruitage if (!_mdl.isPlayable()) Sounder.playSound(Sounder.FX_ERROR); else Sounder.playSound(Sounder.FX_TAGOK); }