ScreenToGif.Windows.Board.LightWindow_Closing C# (CSharp) Method

LightWindow_Closing() private method

private LightWindow_Closing ( object sender, System e ) : void
sender object
e System
return void
        private void LightWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            #region Save Settings

            Settings.Default.LastFps = Convert.ToInt32(FpsNumericUpDown.Value);
            Settings.Default.Width = (int)Width;
            Settings.Default.Height = (int)Height;

            Settings.Default.Save();

            #endregion

            if (Stage != (int)Stage.Stopped)
            {
                _capture.Stop();
                _capture.Dispose();
            }

            GC.Collect();
        }