This commit is contained in:
Paul Betts
2014-09-24 11:36:03 -07:00
parent a0e355821f
commit 8615f99480
2 changed files with 16 additions and 3 deletions

View File

@@ -2,12 +2,14 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using WpfAnimatedGif;
@@ -19,16 +21,25 @@ namespace Squirrel.Update
{
var src = new BitmapImage();
src.BeginInit();
src.StreamSource = File.OpenRead("C:\\Users\\paul\\Desktop\\test.gif");
var source = Path.Combine(
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
"background.gif");
if (File.Exists(source)) {
src.StreamSource = File.OpenRead(source);
}
src.EndInit();
var img = new Image();
ImageBehavior.SetAnimatedSource(img, src);
this.Content = img;
this.Width = src.Width;
this.Height = src.Height;
this.AllowsTransparency = true;
this.Topmost = true;
this.WindowStyle = WindowStyle.None;
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
this.Background = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));

View File

@@ -45,7 +45,9 @@ namespace Squirrel.Update
// open will actually crash the uninstaller
bool isUninstalling = args.Any(x => x.Contains("uninstall"));
Thread.Sleep(60 * 1000);
// Uncomment to test Gifs
//AnimatedGifWindow.ShowWindow(TimeSpan.FromMilliseconds(0), animatedGifWindowToken.Token);
//Thread.Sleep(10 * 60 * 1000);
using (var logger = new SetupLogLogger(isUninstalling) { Level = Splat.LogLevel.Info }) {
Splat.Locator.CurrentMutable.Register(() => logger, typeof(Splat.ILogger));