Example #1
0
 protected override void OnDestroy()
 {
     //dl.cancelDownloads();
     base.OnDestroy();
     app.Dispose();
     this.killAppProcess();
 }
Example #2
0
        static void Main(string[] args)
        {
            WindowsRuntimePlatformInfo.Initialize();

            App app = null;

            try
            {
                app = new CoreApp(new Startup());
                app.run();
            }
            catch (Exception e)
            {
                Logging.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();
                }
            }
        }
 protected override void OnPause()
 {
     base.OnPause();
     _app.Dispose();
     _app = null;
 }