private UserInterface.Deck.ViewModel CreateReadonlyDeckVm(Deck deck) { var deckVm = ViewModels.Deck.Create(deck); deckVm.OnAdd = delegate { return(false); }; deckVm.OnRemove = delegate { return(false); }; return(deckVm); }
public ViewModel(List <CardInfo> library, Deck existing) { _library = library; _existing = existing; ButtonNames = new ButtonNames { Cancel = "Back", Continue = "Save deck" }; }
public override void Initialize() { IsSaved = true; if (_deck == null) { _deck = new Deck { Name = NewDeckName }; SelectedCard = null; IsNew = true; return; } SelectedCard = _deck[RandomEx.Next(_deck.CardCount)]; }
private UserInterface.Deck.ViewModel CreateReadonlyDeckVm(Deck deck) { var deckVm = ViewModels.Deck.Create(deck); deckVm.OnAdd = delegate { return false; }; deckVm.OnRemove = delegate { return false; }; return deckVm; }
public ViewModel(Deck deck) { _deck = deck; }
public void RemoveCard(LibraryItem libraryItem) { Deck.RemoveCard(libraryItem.Info); }
public void AddCard(LibraryItem libraryItem) { Deck.AddCard(libraryItem.Info); }
public override void Initialize() { IsSaved = true; if (_deck == null) { _deck = new Deck {Name = NewDeckName}; SelectedCard = null; IsNew = true; return; } SelectedCard = _deck[RandomEx.Next(_deck.CardCount)]; }