Move update check to common

This commit is contained in:
2014-11-22 07:30:22 -05:00
parent 2eec143074
commit fba778679b
7 changed files with 10 additions and 125 deletions

View File

@@ -1,9 +1,9 @@
using Common.Debug;
using Common.Update;
using FeedCenter.Properties;
using System;
using System.ComponentModel;
using System.Windows;
using FeedCenter.Update;
using Application = System.Windows.Forms.Application;
namespace FeedCenter
@@ -12,13 +12,13 @@ namespace FeedCenter
{
public static async void DisplayUpdateInformation(bool showIfCurrent)
{
UpdateCheck.CheckForUpdate();
UpdateCheck.CheckForUpdate(Settings.Default.VersionLocation, Settings.Default.VersionFile);
// Check for an update
if (UpdateCheck.UpdateAvailable)
{
// Load the version string from the server
Version serverVersion = UpdateCheck.VersionFile.Version;
Version serverVersion = UpdateCheck.VersionInfo.Version;
// Format the check title
string updateCheckTitle = string.Format(Resources.UpdateCheckTitle, Resources.ApplicationDisplayName);
@@ -89,7 +89,7 @@ namespace FeedCenter
try
{
UpdateCheck.CheckForUpdate();
UpdateCheck.CheckForUpdate(Settings.Default.VersionLocation, Settings.Default.VersionFile);
// Get the update information and set it into the result
e.Result = UpdateCheck.UpdateAvailable;