CairoExplorer.Properties.Window_Closing C# (CSharp) Метод

Window_Closing() приватный Метод

private Window_Closing ( object sender, System e ) : void
sender object
e System
Результат void
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (!_doingExitAnimation)
            {
                _doingExitAnimation = true;
                e.Cancel = true;
                var anim = new DoubleAnimation(0, (Duration)TimeSpan.FromSeconds(Settings.FadeInTime));
                anim.AccelerationRatio = 0.4;
                anim.DecelerationRatio = 0.6;
                anim.Completed += (s, _) => this.Close();
                this.BeginAnimation(UIElement.OpacityProperty, anim);
            }
        }