ArtOfWords.Views.Main.MainWindowView.Window_Closing_1 C# (CSharp) Метод

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

private Window_Closing_1 ( object sender, System e ) : void
sender object
e System
Результат void
        private void Window_Closing_1(object sender, System.ComponentModel.CancelEventArgs e)
        {
            // CancelをTrueにするとクローズキャンセル
            e.Cancel = (!_model.TryClose());

            if (e.Cancel != true)
            {
                ClosingScreen closing = new ClosingScreen();
                closing.Owner = this;
                closing.Width = this.ActualWidth;
                closing.Height = this.ActualHeight;
                closing.Show();

                SaveState();

                Thread.Sleep(1000);
                closing.Close();
            }
        }