Ejemplo n.º 1
0
        /// <summary>
        /// Form is closing. Release resources
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="e">event args</param>
        private void MuteForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            _animationManager.Dispose();

            _animationManager = null;

            _widgetManager.Dispose();

            if (_windowOverlapWatchdog != null)
            {
                _windowOverlapWatchdog.Dispose();
            }
        }
Ejemplo n.º 2
0
 protected override void Dispose(bool disposing)
 {
     if (!disposedValue)
     {
         if (disposing)
         {
             widgetManager.Dispose();
             uiCamera.Dispose();
         }
         widgetManager = null;
         uiCamera      = null;
         disposedValue = true;
     }
     base.Dispose(disposing);
 }
Ejemplo n.º 3
0
        public void Dispose()
        {
            window.Resize  -= window_Resize;
            window.Closing -= window_Closing;

            ScreenLayerManager.Dispose();
            overlay.Dispose();
            overlayCamera.Dispose();

            InputManager.Dispose();
            drawContext.Dispose();

            Skin.Dispose();

            DrawState.Cleanup();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Disposer. Release resources and cleanup.
        /// </summary>
        /// <param name="disposing">true to dispose managed resources</param>
        protected virtual void Dispose(bool disposing)
        {
            // Check to see if Dispose has already been called.
            if (!_disposed)
            {
                Log.Debug();

                if (disposing)
                {
                    if (_windowOverlapWatchdog != null)
                    {
                        _windowOverlapWatchdog.Dispose();
                    }

                    // dispose all managed resources.
                    if (_widgetManager != null)
                    {
                        _widgetManager.Dispose();
                    }

                    if (_idleTimer != null)
                    {
                        _idleTimer.Elapsed -= idleTimer_Elapsed;
                        _idleTimer.Dispose();
                    }

                    if (_animationManager != null)
                    {
                        _animationManager.Dispose();
                    }
                }

                // Release unmanaged resources.
            }

            _disposed = true;
        }