mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Fixups
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user