Exemplo n.º 1
0
        private void DownloadAndInstallSync(NetSparkleAppCastItem item)
        {
            // get the filename of the download link
            String[] segments = item.DownloadLink.Split('/');
            String   fileName = segments[segments.Length - 1];

            // download sync
            String _tempName = Environment.ExpandEnvironmentVariables("%temp%\\" + fileName);

            // start async download
            WebClient Client = new WebClient();
            Uri       url    = new Uri(item.DownloadLink);

            Client.DownloadFile(url, _tempName);

            if (NetSparkleCheckAndInstall.CheckDSA(this, item, _tempName))
            {
                NetSparkleCheckAndInstall.Install(this, _tempName);
            }
        }
 private void btnInstallAndReLaunch_Click(object sender, EventArgs e)
 {
     NetSparkleCheckAndInstall.Install(_sparkle, _tempName);
 }