public void SelectSlide(PictureViewModelM slide) { slide.PeekAtImage(); if (SelectedSlide1 == null) { SelectedSlide1 = slide; } else if (SelectedSlide2 == null) { SelectedSlide2 = slide; HideUnmatched(); } ControladorDeAudio.PlayCardFlip(); OnPropertyChanged("areSlidesActive"); }
public void CreateSlides(string imagesPath) { MemorySlides = new ObservableCollection <PictureViewModelM>(); var models = GetModelsFrom(@imagesPath); for (int i = 0; i < 6; i++) { var newSlide = new PictureViewModelM(models[i]); var newSlideMatch = new PictureViewModelM(models[i]); MemorySlides.Add(newSlide); MemorySlides.Add(newSlideMatch); newSlide.PeekAtImage(); newSlideMatch.PeekAtImage(); } ShuffleSlides(); OnPropertyChanged("MemorySlides"); }
private void ClearSelected() { SelectedSlide1 = null; SelectedSlide2 = null; canSelect = false; }