Exemple #1
0
        private void workerUpdateNotification_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            var un       = new UpdateNotificationLibrary.UpdateNotification("amnonya", "Capture");
            var assembly = System.Reflection.Assembly.GetExecutingAssembly();
            var fvi      = FileVersionInfo.GetVersionInfo(assembly.Location);

            try
            {
                if (!un.IsLatestVersion(fvi.FileVersion))
                {
                    e.Result = un.Url;
                }
            }
            catch
            {
                // Failed to decide version.
                // No need to alert the user.
            }
        }
Exemple #2
0
 private void workerUpdateNotification_DoWork(object sender, DoWorkEventArgs e)
 {
     var un = new UpdateNotificationLibrary.UpdateNotification("amnonya", "Generals-Maps");
     var assembly = System.Reflection.Assembly.GetExecutingAssembly();
     var fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
     try
     {
         if (!un.IsLatestVersion(fvi.FileVersion))
         {
             e.Result = un.Url;
         }
     }
     catch
     {
         // Failed to decide version.
         // No need to alert the user.
     }
 }