コード例 #1
0
        public void SelectSlide(PictureVM slide)
        {
            slide.PeekAtImage();

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

            OnPropertyChanged("areSlidesActive");
        }
コード例 #2
0
        public void CreateSlides(string imagesPath)
        {
            MemorySlides = new ObservableCollection <PictureVM>();
            var models = GetModelsFrom(imagesPath);


            for (int i = 0; i < 6; i++)
            {
                var newSlide      = new PictureVM(models[i]);
                var newSlideMatch = new PictureVM(models[i]);

                MemorySlides.Add(newSlide);
                MemorySlides.Add(newSlideMatch);

                newSlide.PeekAtImage();
                newSlideMatch.PeekAtImage();
            }

            ShuffleSlides();
            OnPropertyChanged("MemorySlides");
        }
コード例 #3
0
 private void ClearSelected()
 {
     SelectedSlide1 = null;
     SelectedSlide2 = null;
     canSelect      = false;
 }