Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void _1_1_Click(object sender, RoutedEventArgs e)
- {
- if (radar.IsChecked == true)
- {
- if (gridarray[0,0] == 1)
- {
- Random rnd = new Random();
- int r = rnd.Next(0,3);
- _1_1.Content = images[r];
- streak.Content = streakn++;
- }
- if (gridarray[0,0] == 2 || gridarray[0,1] == 2)
- {
- Random rnd = new Random();
- int r = rnd.Next(3, 5);
- _1_1.Content = images[r];
- streak.Content = streakn++;
- }
- if (gridarray[0,0] == 3 || gridarray[0,1] == 3 || gridarray[0,2] == 3)
- {
- Random rnd = new Random();
- int r = rnd.Next(5, 7);
- _1_1.Content = images[r];
- streak.Content = streakn++;
- }
- }
- private void defineImages()
- {
- images[0].Source = new BitmapImage(new Uri("Resources/small1.png", UriKind.Relative));
- images[1].Source = new BitmapImage(new Uri("Resources/small2.jpg", UriKind.Relative));
- images[2].Source = new BitmapImage(new Uri("Resources/small3.png", UriKind.Relative));
- images[3].Source = new BitmapImage(new Uri("Resources/medium-1.jpg", UriKind.Relative));
- images[4].Source = new BitmapImage(new Uri("Resources/medium2.jpg", UriKind.Relative));
- images[5].Source = new BitmapImage(new Uri("Resources/large1.png", UriKind.Relative));
- images[6].Source = new BitmapImage(new Uri("Resources/large2.jpg", UriKind.Relative));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement