示例#1
0
 private void OnComplete(Version newVersion, bool isNew)
 {
     if(Complete != null)
     {
         var args = new VersionCheckCompleteEventArgs
                    	{
                    		Version = newVersion,
                    		IsNew = isNew
                    	};
         Complete(this, args);
     }
 }
示例#2
0
 private void OnComplete(Version newVersion, bool isNew)
 {
     if (Complete != null)
     {
         var args = new VersionCheckCompleteEventArgs
         {
             Version = newVersion,
             IsNew   = isNew
         };
         Complete(this, args);
     }
 }
		private void VersionCheckComplete(object sender, VersionCheckCompleteEventArgs args)
		{
			LatestVersion = args.Version;

			if(args.IsNew)
			{
				var extracter = new DownloadAndExtracter(args.Version);
				extracter.ExtractComplete += ExtractComplete;
				extracter.DownloadAndExtract();
				Status = STATUS_DOWNLOADING;
			}
			else
			{	
				Status = STATUS_UPTODATE;
			}
		}
 private void VersionCheckComplete(object sender, VersionCheckCompleteEventArgs args)
 {
     if(args.IsNew)
     {
         var extracter = new DownloadAndExtracter(args.Version);
         extracter.ExtractComplete += ExtractComplete;
         extracter.DownloadAndExtract();
     }
     else
     {
         new Thread(() =>
         {
             Thread.Sleep(5000); //Give the ui time to show that it was checking for updates
             Execute.OnUiThread(() => CheckingForUpdates = false);
         }).Start();
     }
 }