Add About Page.

This commit is contained in:
qianlifeng
2014-12-16 22:25:22 +08:00
parent 6a24794457
commit 6c94c3aa7b
4 changed files with 64 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Linq;
@@ -15,6 +16,7 @@ using Wox.Plugin;
using Wox.Helper;
using Wox.Plugin.SystemPlugins;
using Wox.PluginLoader;
using Wox.Update;
using Application = System.Windows.Forms.Application;
using File = System.IO.File;
using MessageBox = System.Windows.MessageBox;
@@ -221,6 +223,21 @@ namespace Wox
#endregion
#region About
tbVersion.Text = ConfigurationManager.AppSettings["version"];
Release newRelease = new UpdateChecker().CheckUpgrade();
if (newRelease == null)
{
tbNewVersionAvailable.Visibility = Visibility.Collapsed;
}
else
{
tbNewVersionAvailable.Text = newRelease.version + " available";
}
#endregion
settingsLoaded = true;
}
@@ -698,5 +715,19 @@ namespace Wox
MessageBox.Show("Proxy connect failed.");
}
}
private void tbWebsite_MouseUp(object sender, MouseButtonEventArgs e)
{
Process.Start("http://www.getwox.com");
}
private void tbNewVersionAvailable_MouseUp(object sender, MouseButtonEventArgs e)
{
Release newRelease = new UpdateChecker().CheckUpgrade();
if (newRelease != null)
{
Process.Start("http://www.getwox.com/release/" + newRelease.version);
}
}
}
}