예제 #1
0
 public void btnTriangleOnCLick()
 {
     MemoryTrainCurrent = list[counter];
     lstDataEntity.Add(MemoryTrainServices.Validate(MemoryTrainCurrent, TypeQuestion, Shapes.Triangle, Colors.Yellow));
     UpdateImageAndTexts();
     counter++;
 }
예제 #2
0
 private void UpdateImageAndTexts()
 {
     MemoryTrainCurrent  = list[counter];
     ImageDisplay.sprite = GetSpriteToDisplay(MemoryTrainCurrent.Name);
     TypeQuestion        = TypeQuestion ? false : true;
     UpdateTexts(TypeQuestion);
 }
예제 #3
0
 public void btnStarOnCLick()
 {
     MemoryTrainCurrent = list[counter];
     lstDataEntity.Add(MemoryTrainServices.Validate(MemoryTrainCurrent, TypeQuestion, Shapes.Star, Colors.Green));
     UpdateImageAndTexts();
     counter++;
 }
예제 #4
0
        public static MemoryTrainDataEntity Validate(MemoryTrainViewModel model, bool typeOfQuestion, Shapes Selectedshapes, Colors Selectedcolors)
        {
            MemoryTrainDataEntity entity;

            if (typeOfQuestion) // true Check shapes
            {
                entity = new MemoryTrainDataEntity {
                    ID = model.ID, Color = model.Color, Shape = model.Shape, Name = model.Name
                };
                entity.Guessed = model.Shape == Selectedshapes ? true : false;
            }
            else
            {
                entity = new MemoryTrainDataEntity {
                    ID = model.ID, Color = model.Color, Shape = model.Shape, Name = model.Name
                };
                entity.Guessed = model.Color == Selectedcolors ? true : false;
            }
            return(entity);
        }