コード例 #1
0
ファイル: App.cs プロジェクト: razluta/jazz2
        public static bool Terminate(bool byUser)
        {
            bool cancel = false;

            // ...

            // Did we cancel it? Return false.
            if (cancel)
            {
                return(false);
            }

            // Otherwise, actually start terminating.
            // From this point on, there's no return - need to re-init the editor afterwards.
            if (Terminating != null)
            {
                Terminating(null, EventArgs.Empty);
            }

            // Unregister events
            mainWindow.Activated  -= mainWindow_Activated;
            mainWindow.Deactivate -= mainWindow_Deactivate;
            Scene.Leaving         -= Scene_Leaving;
            Scene.Entered         -= Scene_Entered;
            Application.Idle      -= Application_Idle;

            // Shut down the editor backend
            DualityApp.ShutdownBackend(ref graphicsBack);

            // Shut down the plugin manager
            pluginManager.Terminate();

            // Terminate Duality
            DualityApp.Terminate();

            return(true);
        }
コード例 #2
0
ファイル: Preferences.cs プロジェクト: ozgun-kara/jazz2
        private static void OnDualityAppTerminating(object sender, EventArgs e)
        {
            DualityApp.Terminating -= OnDualityAppTerminating;

            DualityApp.ShutdownBackend(ref prefBack);
        }