private void ClientDownloadFileCompleted(object sender, AsyncCompletedEventArgs e) { IsUpdateButtonEnable = true; PrValue = 0; YouHeader = $"{youheader} ({CommonExtensions.GetConsoleOutput(YouPath, "--version", true).Trim()})"; using (var webClient = sender as WebClient) { if (webClient == null) { return; } webClient.DownloadFileCompleted -= ClientDownloadFileCompleted; webClient.DownloadProgressChanged -= ClientDownloadProgressChanged; } }
private void FillYouHeader() { YouHeader = string.IsNullOrEmpty(YouPath) ? youheader : $"{youheader} ({CommonExtensions.GetConsoleOutput(YouPath, "--version", true).Trim()})"; }