コード例 #1
0
		public async Task AddRandomBee()
		{
			await Application.Current.MainWindow.Dispatcher.InvokeAsync(() =>
			{
				var bee = new AnimatedImage(RandomInt, RandomInt);

				_beeNest.Children.Add(bee);

				AnimateBee(bee);
				bee.MoveImage(TimeSpan.FromMilliseconds(_random.Next(100, 10000)), _beeFlyHerePath);
				bee.PlaySummSummSumm();
			});
		}
コード例 #2
0
		public void AnimateBee(AnimatedImage bee)
		{
			bee.AnimateImage(ImageNames, TimeSpan.FromMilliseconds(RandomInt));
		}