Fix issues with AppDomain.CurrentDomain.BaseDirectory

This commit is contained in:
Yeechan Lu
2014-03-23 16:33:05 +08:00
parent 3dbef1400c
commit 19ec14e4c2
4 changed files with 10 additions and 10 deletions

View File

@@ -41,7 +41,7 @@ namespace Wox
Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(TopProperty));
fadeOutStoryboard.Children.Add(fadeOutAnimation);
imgClose.Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "\\Images\\close.png"));
imgClose.Source = new BitmapImage(new Uri(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Images\\close.png"));
imgClose.MouseUp += imgClose_MouseUp;
}
@@ -65,7 +65,7 @@ namespace Wox
tbSubTitle.Text = subTitle;
if (!File.Exists(icopath))
{
icopath = AppDomain.CurrentDomain.BaseDirectory + "Images\\app.png";
icopath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "Images\\app.png";
}
imgIco.Source = new BitmapImage(new Uri(icopath));
Show();