diff --git a/Wox/MainWindow.xaml.cs b/Wox/MainWindow.xaml.cs
index 38c71fc5da..cfc220ff9b 100644
--- a/Wox/MainWindow.xaml.cs
+++ b/Wox/MainWindow.xaml.cs
@@ -203,7 +203,11 @@ namespace Wox
Release release = new UpdateChecker().CheckUpgrade();
if (release != null && !UserSettingStorage.Instance.DontPromptUpdateMsg)
{
- ShowMsg(string.Format("New version {0} available!",release.version),string.Empty,string.Empty);
+ Dispatcher.Invoke(new Action(() =>
+ {
+ NewVersionWindow newVersinoWindow = new NewVersionWindow();
+ newVersinoWindow.Show();
+ }));
}
}
diff --git a/Wox/SettingWindow.xaml.cs b/Wox/SettingWindow.xaml.cs
index e17b02d53a..6fa6b28410 100644
--- a/Wox/SettingWindow.xaml.cs
+++ b/Wox/SettingWindow.xaml.cs
@@ -726,7 +726,7 @@ namespace Wox
Release newRelease = new UpdateChecker().CheckUpgrade();
if (newRelease != null)
{
- Process.Start("http://www.getwox.com/release/" + newRelease.version);
+ Process.Start("http://www.getwox.com/release/version/" + newRelease.version);
}
}
}
diff --git a/Wox/Update/NewVersionWindow.xaml b/Wox/Update/NewVersionWindow.xaml
new file mode 100644
index 0000000000..924e61a202
--- /dev/null
+++ b/Wox/Update/NewVersionWindow.xaml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Wox/Update/NewVersionWindow.xaml.cs b/Wox/Update/NewVersionWindow.xaml.cs
new file mode 100644
index 0000000000..66fbaf88e4
--- /dev/null
+++ b/Wox/Update/NewVersionWindow.xaml.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+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.Shapes;
+
+namespace Wox.Update
+{
+ ///
+ /// NewVersionWindow.xaml 的交互逻辑
+ ///
+ public partial class NewVersionWindow : Window
+ {
+ public NewVersionWindow()
+ {
+ InitializeComponent();
+
+ tbCurrentVersion.Text = ConfigurationManager.AppSettings["version"];
+ Release newRelease = new UpdateChecker().CheckUpgrade();
+ if (newRelease == null)
+ {
+ tbNewVersion.Visibility = Visibility.Collapsed;
+ }
+ else
+ {
+ tbNewVersion.Text = newRelease.version;
+ }
+ }
+
+ private void tbNewVersion_MouseUp(object sender, MouseButtonEventArgs e)
+ {
+ Release newRelease = new UpdateChecker().CheckUpgrade();
+ if (newRelease != null)
+ {
+ Process.Start("http://www.getwox.com/release/version/" + newRelease.version);
+ }
+ }
+ }
+}
diff --git a/Wox/Wox.csproj b/Wox/Wox.csproj
index c4f5faca5e..0d571690fc 100644
--- a/Wox/Wox.csproj
+++ b/Wox/Wox.csproj
@@ -104,6 +104,9 @@
+
+ NewVersionWindow.xaml
+
@@ -237,6 +240,10 @@
Designer
PreserveNewest
+
+ Designer
+ MSBuild:Compile
+