private static int getIndexInView(Card card, MtgLayoutView view) { var handle = view.FindRow(card); var index = view.GetVisibleIndex(handle); return(index); }
public Card GetCard(MtgLayoutView view, int rowHandle) { if (view == _layoutViewCards) { return((Card)view.FindRow(rowHandle)); } if (view != _layoutViewDeck) { throw new ArgumentOutOfRangeException(); } int visibleIndex = view.GetVisibleIndex(rowHandle); if (visibleIndex < 0) { return(null); } return(_deckEditorModel.GetVisibleCards()[visibleIndex]); }