public void Stop()
        {
            if (!progressAnimatedBitmap.IsDisposed)
            {
                if (progressAnimatedBitmap.Running)
                {
                    progressAnimatedBitmap.Stop();
                }
            }

            SendToBack();
        }
Example #2
0
        protected override void OnClosing(CancelEventArgs e)
        {
            base.OnClosing(e);

            if (_okToClose)
            {
                progressAnimatedBitmap.Stop();
            }
            else
            {
                e.Cancel = true;
            }
        }