protected override void OnExit(ExitEventArgs e) { base.OnExit(e); if (!this.sessionEnding) { Script.Instance.Save(); if (this.runtime != null) { this.runtime.Shutdown(); } } }