public void SelectSlide(ImageViewModel slide)
        {
            slide.PeekAtImage();

            if (this.SelectedSlide1 == null)
            {
                this.SelectedSlide1 = slide;
            }
            else if (this.SelectedSlide2 == null)
            {
                this.SelectedSlide2 = slide;
                this.HideUnmatched();
            }

            SoundManager.PlayCardFlip();
            OnPropertyChanged("AreSlidesActive");
        }
        public void CreateSlides(string imagesPath)
        {
            this.MemorySlides = new ObservableCollection <ImageViewModel>();
            List <Image> models = this.GetModelsFrom(imagesPath);

            for (int i = 0; i < Constants.slidesToMatch; i++)
            {
                var newSlide      = new ImageViewModel(models[i]);
                var newSlideMatch = new ImageViewModel(models[i]);
                this.MemorySlides.Add(newSlide);
                this.MemorySlides.Add(newSlideMatch);
                newSlide.PeekAtImage();
                newSlideMatch.PeekAtImage();
            }

            this.ShuffleSlides();
            OnPropertyChanged("MemorySlides");
        }
 private void ClearSelected()
 {
     this.SelectedSlide1 = null;
     this.SelectedSlide2 = null;
     this.CanSelect      = false;
 }