aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Installer/Code/DownloadAnimation.xaml.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-15 17:38:24 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-15 17:38:24 -0400
commitb4c06b76c139c79fac33c05699ae3bbc0124ffdf (patch)
tree29edc51be480df4d59e74170324c00ae8a57cf53 /MediaBrowser.Installer/Code/DownloadAnimation.xaml.cs
parent3a1317fd4fd0030c50ff7011a329ce689583d1b6 (diff)
parentc37825aa123ecc4e9b06a3c108f2cc1ee144a392 (diff)
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Installer/Code/DownloadAnimation.xaml.cs')
-rw-r--r--MediaBrowser.Installer/Code/DownloadAnimation.xaml.cs68
1 files changed, 0 insertions, 68 deletions
diff --git a/MediaBrowser.Installer/Code/DownloadAnimation.xaml.cs b/MediaBrowser.Installer/Code/DownloadAnimation.xaml.cs
deleted file mode 100644
index 8fa890816..000000000
--- a/MediaBrowser.Installer/Code/DownloadAnimation.xaml.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Threading;
-
-namespace MediaBrowser.Installer.Code
-{
- /// <summary>
- /// Interaction logic for DownloadAnimation.xaml
- /// </summary>
- public partial class DownloadAnimation : UserControl
- {
- private int _i;
- private readonly double _startPos;
- private readonly DispatcherTimer _timer;
-
- public DownloadAnimation()
- {
- _i = 0;
- InitializeComponent();
-
- // Store start position of sliding canvas
- _startPos = Canvas.GetLeft(SlidingCanvas);
-
- // Create animation timer
- _timer = new DispatcherTimer {Interval = TimeSpan.FromMilliseconds(100)};
- _timer.Tick += TimerTick;
- }
-
- public void StartAnimation()
- {
- _timer.Start();
- }
-
- public void StopAnimation()
- {
- _timer.Stop();
- }
-
- private void TimerTick(object sender, EventArgs e)
- {
- _i++;
-
- if (_i < 16)
- {
- // Move SlidingCanvas containing the three colored dots 14 units to the right
- Canvas.SetLeft(SlidingCanvas, Canvas.GetLeft(SlidingCanvas) + 14);
- }
- else
- {
- // Move SlidingCanvas back to its starting position and reset counter
- _i = 0;
- Canvas.SetLeft(SlidingCanvas, _startPos);
- }
- }
- }
-}