Пример #1
0
        void SnowTimerTick(object sender, EventArgs e)
        {
            _currentSnowFlakes++;
            if (_currentSnowFlakes >= MaxSnowFlakes)
            {
                _snowTimer.Stop();
            }

            // Randomise which image gets used.
            var randomSnowFlake = RandomNumber.Next(_snowChoices.Count());
            var snowFlake       = new SnowFlake(_snowChoices[randomSnowFlake]);

            // Set height and width of phone
            snowFlake.SetInitialProperties(400, 800);
            SnowField.Children.Add(snowFlake);
        }
Пример #2
0
        void SnowTimerTick(object sender, EventArgs e)
        {
            _currentSnowFlakes++;
            if(_currentSnowFlakes >= MaxSnowFlakes)
                _snowTimer.Stop();

            // Randomise which image gets used.
            var randomSnowFlake = RandomNumber.Next(_snowChoices.Count());
            var snowFlake = new SnowFlake(_snowChoices[randomSnowFlake]);

            // Set height and width of phone
            snowFlake.SetInitialProperties(400, 800);
            SnowField.Children.Add(snowFlake);
        }