WPF Presentation Application failing to close the application once download is finished

Mar 14, 2013 at 9:49 PM
I got this working but the only issue I find myself having is I am running it in a WPF and it's failing to close the windows once the download is completed hence it opens a new instance while keeping the old one still running. Any ideas? Thanks
Coordinator
Mar 15, 2013 at 7:14 AM
Edited Mar 17, 2013 at 5:24 AM
This problem happens because of Application.Exit() method used to exit the app which doesn't work for wpf So download sourcecode and change ondownloadcomplete method in downloadupdatedialog.cs to following.
private void OnDownloadComplete(object sender, AsyncCompletedEventArgs e) 
{ 
var processStartInfo = new ProcessStartInfo {FileName = _tempPath, UseShellExecute = true}; Process.Start(processStartInfo); 
Environment.Exit(0);
}  
Mar 15, 2013 at 11:08 AM
Thanks, still new to visual studio and C#