Banshee.Windows.VersionUpdater.DisplayUpdateFinishedDownloadingDialog C# (CSharp) Method

DisplayUpdateFinishedDownloadingDialog() private method

private DisplayUpdateFinishedDownloadingDialog ( ) : void
return void
        private void DisplayUpdateFinishedDownloadingDialog ()
        {
            bool update;
            using (var message_dialog = new MessageDialog (ServiceManager.Get<GtkElementsService> ().PrimaryWindow, 0,
                        MessageType.Question, ButtonsType.YesNo, String.Format (
                            Catalog.GetString ("The update finished downloading.{0}Do you want to shutdown Banshee and run the installer?"), Environment.NewLine))) {
                message_dialog.WindowPosition = WindowPosition.CenterOnParent;
                message_dialog.Title = Catalog.GetString ("Update finished downloading");
                update = (message_dialog.Run () == (int)ResponseType.Yes);
                message_dialog.Destroy ();
            }

            if (update) {
                // run the downloaded installer and shutdown the running instance of Banshee
                Process msiProcess = new Process ();
                msiProcess.StartInfo.FileName = "msiexec";
                msiProcess.StartInfo.Arguments = "/i " + temp_installer_path;
                msiProcess.Start ();

                Banshee.ServiceStack.Application.Shutdown ();
            } else {
                // delete the downloaded installer as the user does not want to update now
                File.Delete (temp_installer_path);
            }
        }