AvalonPatch.AvalonPatch.exitAndCleanup C# (CSharp) Method

exitAndCleanup() public method

public exitAndCleanup ( ) : void
return void
        void exitAndCleanup()
        {
            // Cleanup
            try
            {
                if (Directory.Exists(tempExtractPath))
                    Directory.Delete(tempExtractPath, true);
            }
            catch
            {
            }
            // Check and start Mediaportal if required
            if (restartMediaPortal)
            {
                ProcessStartInfo process = new ProcessStartInfo("mediaportal.exe");
                process.WorkingDirectory = SkinInfo.mpPaths.sMPbaseDir;
                process.UseShellExecute = true;
                Process.Start(process);
            }
            // Check and start Mediaportal if required
            if (restartConfiguration)
            {
                ProcessStartInfo process = new ProcessStartInfo("configuration.exe");
                process.WorkingDirectory = SkinInfo.mpPaths.sMPbaseDir;
                process.UseShellExecute = true;
                Process.Start(process);
            }
            if (skInfo.startFullScreen)
                Thread.Sleep(2000);
            Application.Exit();
        }