public NewVersionEventArgs(Products products)
        {
            products.Sort((obj, obj1) => (new Version(obj.ProductVersion) < new Version(obj1.ProductVersion)) ? +1 : -1);

            this.Products = products;
            this.NewVersion = products.FirstOrDefault();
        }
예제 #2
0
 public void Update(Product product)
 {
     string url = product.DownloadLink;
     string filePath = Path.Combine(Path.GetTempPath(), Path.GetFileName(url));
     if (webClient.IsBusy)
     {
         webClient.CancelAsync();
     }
     webClient.DownloadFileAsync(new Uri(url), filePath);
 }