public LearningPage() { Animals animals = new Animals(); InitializeComponent(); for (int i = 0; i < animals.getSize(); i++) { PivotItem pivotItem = new PivotItem(); Image image = new Image(); image.Source = new BitmapImage(animals.getAnimalIndex(i).getAnimalImage()); pivotItem.Header = animals.getAnimalIndex(i).getAnimalName(); pivotItem.Content = image; AnimalLearningPivot.Items.Add(pivotItem); } //on animal selection take them to a seperate scene with animal name, animal facts, and animal sounds. //need to research animal facts and add them to xml files //create image view with each animal in it //add event when animal is clicked update thread // }
public LearningPage() { Animals animals = new Animals(); InitializeComponent(); for (int i = 0; i < animals.getSize(); i++) { PivotItem pivotItem = new PivotItem(); Image image = new Image(); image.Source = new BitmapImage(animals.getAnimalIndex(i).getAnimalImage()); pivotItem.Header = animals.getAnimalIndex(i).getAnimalName(); pivotItem.Content = image; AnimalLearningPivot.Items.Add(pivotItem); } //on animal selection take them to a seperate scene with animal name, animal facts, and animal sounds. //need to research animal facts and add them to xml files //create image view with each animal in it //add event when animal is clicked update thread // }
// Returns the current animal public Animal GetCurrentAnimal() { if (currentIndex < 0 || currentIndex >= animals.getSize()) { return(null); } return(animals.getAnimalIndex(animalIndexes[currentIndex])); }
private void AnimalLearningPivot_Tap_1(object sender, System.Windows.Input.GestureEventArgs e) { SoundLoader soundLoader = new SoundLoader(); int selectedItem = AnimalLearningPivot.SelectedIndex; Animals animals = new Animals(); Animal animal = animals.getAnimalIndex(selectedItem); soundLoader.playSoundFromURI(animal.getAnimalSound()); }
public LearningPage() { Animals animals = new Animals(); InitializeComponent(); for (int i = 0; i < animals.getSize(); i++) { PivotItem pivotItem = new PivotItem(); Image image = new Image(); image.Source = new BitmapImage(animals.getAnimalIndex(i).getAnimalImage()); pivotItem.Header = animals.getAnimalIndex(i).getAnimalName(); pivotItem.Content = image; AnimalLearningPivot.Items.Add(pivotItem); } }
private void AnimalLearningPivot_Tap_1(object sender, System.Windows.Input.GestureEventArgs e) { SoundLoader soundLoader = new SoundLoader(); int selectedItem = AnimalLearningPivot.SelectedIndex; Animals animals = new Animals(); Animal animal = animals.getAnimalIndex(selectedItem); soundLoader.playSoundFromURI(animal.getAnimalSound()); }
public LearningPage() { Animals animals = new Animals(); InitializeComponent(); for (int i = 0; i < animals.getSize(); i++) { PivotItem pivotItem = new PivotItem(); Image image = new Image(); image.Source = new BitmapImage(animals.getAnimalIndex(i).getAnimalImage()); pivotItem.Header = animals.getAnimalIndex(i).getAnimalName(); pivotItem.Content = image; AnimalLearningPivot.Items.Add(pivotItem); } }
BitmapImage chosenAnimal; //animal chosen to display //*************************************************************************************************** //chooses a random animal from the model, creates random positions and places images randomely void generateImagePlacement() { animalPath = animals.getAnimalIndex(AnimalMath.random.Next(animals.getSize())).getAnimalImage(); chosenAnimal = new BitmapImage(animalPath); //holds new image to be placed AnimalMath.GenerateRandomArrays(); //reset random generation for new unique numbers int position; //position for animal to be placed in for (int k = 0; k < AnimalMath.correctAnswer; k++) { position = AnimalMath.getRandomNum(); //get new unique random integer placeImage(position, chosenAnimal); //call function to place images within grid } }
void generateImagePlacement() { animalPath = animals.getAnimalIndex(random.Next(animals.getSize())).getAnimalImage(); chosenAnimal = new BitmapImage(animalPath); for (int i = 0; i < MAX_NUMBER; i++) { num_array[i] = i + 1; // initialise them to their indexes } //csize = MAX_CHOICES; // nsize = MAX_NUMBER; //used for array size in random # selection int position; // for (int k = 0; k < correctAnswer; k++) { //if ((position = getRandomNum()) != 0) //{ position = getRandomNum(); //position = 3; placeImage(position, chosenAnimal); //} } }
public SpellingPage() { InitializeComponent(); imageBox.Source = new BitmapImage(animals.getAnimalIndex(imageIndex).getAnimalImage()); }