2014-12-16 23:29:25 +08:00
|
|
|
|
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;
|
2015-01-11 21:52:30 +08:00
|
|
|
|
using Wox.Core.Version;
|
2014-12-16 23:29:25 +08:00
|
|
|
|
|
|
|
|
|
namespace Wox.Update
|
|
|
|
|
{
|
|
|
|
|
public partial class NewVersionWindow : Window
|
|
|
|
|
{
|
|
|
|
|
public NewVersionWindow()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
2015-01-11 21:52:30 +08:00
|
|
|
|
tbCurrentVersion.Text = VersionManager.Instance.CurrentVersion.ToString();
|
2014-12-16 23:29:25 +08:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|