mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Add About Page.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user