From a9e090c45410072296cd6a2081c52c1f3d8ce71f Mon Sep 17 00:00:00 2001 From: bao-qian Date: Mon, 25 Apr 2016 22:09:39 +0100 Subject: [PATCH] Fix bug introduced in 7c2e2a01c24627d2b05e64b1a32349b8bb256e19 by @aaroncampf --- Wox/Msg.xaml | 7 ++++--- Wox/Msg.xaml.cs | 13 ++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Wox/Msg.xaml b/Wox/Msg.xaml index e8ebc1f29d..b077be8e07 100644 --- a/Wox/Msg.xaml +++ b/Wox/Msg.xaml @@ -23,9 +23,10 @@ - + + - + @@ -35,6 +36,6 @@ sdfdsf + HorizontalAlignment="Right" Grid.ColumnSpan="2" /> \ No newline at end of file diff --git a/Wox/Msg.xaml.cs b/Wox/Msg.xaml.cs index 3d0e8a14d5..689def37f6 100644 --- a/Wox/Msg.xaml.cs +++ b/Wox/Msg.xaml.cs @@ -6,6 +6,7 @@ using System.Windows.Input; using System.Windows.Media.Animation; using System.Windows.Media.Imaging; using Wox.Helper; +using Wox.Infrastructure; namespace Wox { @@ -36,9 +37,7 @@ namespace Wox Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(TopProperty)); fadeOutStoryboard.Children.Add(fadeOutAnimation); - - imgClose.Source = new BitmapImage(new Uri("Images\\close.pn", UriKind.Relative)); - //imgClose.Source = new BitmapImage(new Uri(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), "Images\\close.png"))); + imgClose.Source = App.ImageLoader.Load(Path.Combine(WoxDirectroy.Executable, "Images\\close.png")); imgClose.MouseUp += imgClose_MouseUp; } @@ -56,7 +55,7 @@ namespace Wox Close(); } - public void Show(string title, string subTitle, string icopath) + public void Show(string title, string subTitle, string iconPath) { tbTitle.Text = title; tbSubTitle.Text = subTitle; @@ -64,12 +63,12 @@ namespace Wox { tbSubTitle.Visibility = Visibility.Collapsed; } - if (!File.Exists(icopath)) + if (!File.Exists(iconPath)) { - imgIco.Source = new BitmapImage(new Uri("Images\\app.png", UriKind.Relative)); + imgIco.Source = App.ImageLoader.Load(Path.Combine(WoxDirectroy.Executable, "Images\\app.png")); } else { - imgIco.Source = new BitmapImage(new Uri(icopath)); + imgIco.Source = App.ImageLoader.Load(iconPath); } Show();