protected override void OnDestroy() { //dl.cancelDownloads(); base.OnDestroy(); app.Dispose(); this.killAppProcess(); }
static void Main(string[] args) { WindowsRuntimePlatformInfo.Initialize(); GameApp app = null; try { app = new GameApp(new Startup()); app.PrimaryArchivePath = "C:\\Development\\Anomalous\\RpgArt"; app.run(); } catch (Exception e) { Log.Default.printException(e); if (app != null) { app.saveCrashLog(); } String errorMessage = e.Message + "\n" + e.StackTrace; while (e.InnerException != null) { e = e.InnerException; errorMessage += "\n" + e.Message + "\n" + e.StackTrace; } MessageDialog.showErrorDialog(errorMessage, "Exception"); } finally { if (app != null) { app.Dispose(); } } }