コード例 #1
0
        // SQL Server Studio
        public static async Task SQLServerStudioAsync(Action <DownloadProgressChangedEventArgs, double> callback)
        {
            var installationPath = MainWindowViewModel.InstallationPath;
            var servicePath      = CreateServicePath.ServicePath;

            var url  = DownloadParameters.AppList.SQLServerStudio.Url;
            var hash = DownloadParameters.AppList.SQLServerStudio.Hash;

            var downloadFileName = Path.GetFileName(url);
            var file             = Path.Combine(servicePath, downloadFileName);

            await DownloadFileInBackgroundAsync(url, file, hash, callback);

            await Task.Run(() => Install.SQLServerStudio(file));
        }
コード例 #2
0
        // VCRedist
        public static async Task VcRedistAsync(string systemType, Action <DownloadProgressChangedEventArgs, double> callback)
        {
            var installationPath = MainWindowViewModel.InstallationPath;
            var servicePath      = CreateServicePath.ServicePath;

            var url  = DownloadParameters.AppList.VcRedistX86.Url;
            var hash = DownloadParameters.AppList.VcRedistX86.Hash;

            if (systemType == "x64")
            {
                url  = DownloadParameters.AppList.VcRedistX64.Url;
                hash = DownloadParameters.AppList.VcRedistX64.Hash;
            }

            var downloadFileName = Path.GetFileName(url);
            var file             = Path.Combine(servicePath, downloadFileName);

            await DownloadFileInBackgroundAsync(url, file, hash, callback);

            await Task.Run(() => Install.VCRedist(file));
        }