From 0fbb2bc81a94c2f527152e6889624b56fe8aba6e Mon Sep 17 00:00:00 2001 From: Thomas Nind Date: Sat, 30 Apr 2022 19:58:46 +0100 Subject: [PATCH] Added calls to `Application.Shutdown ()` into docs --- README.md | 2 ++ docfx/articles/overview.md | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 20440a0b1..abef94d7d 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,7 @@ win.Add( ); Application.Run(); +Application.Shutdown(); ``` Alternatively, you can encapsulate the app behavior in a new `Window`-derived class, say `App.cs` containing the code above, and simplify your `Main` method to: @@ -198,6 +199,7 @@ class Demo { static void Main () { Application.Run (); + Application.Shutdown (); } } ``` diff --git a/docfx/articles/overview.md b/docfx/articles/overview.md index f92409759..cc755842e 100644 --- a/docfx/articles/overview.md +++ b/docfx/articles/overview.md @@ -26,7 +26,8 @@ class Demo { var n = MessageBox.Query (50, 7, "Question", "Do you like console apps?", "Yes", "No"); - + + Application.Shutdown (); return n; } } @@ -62,6 +63,7 @@ class Demo { }; Application.Top.Add (label); Application.Run (); + Application.Shutdown (); } } ``` @@ -95,6 +97,7 @@ class Demo { // Add both menu and win in a single call Application.Top.Add (menu, win); Application.Run (); + Application.Shutdown (); } } ``` @@ -277,6 +280,7 @@ class Demo { // Add both menu and win in a single call top.Add (win, menu); Application.Run (top); + Application.Shutdown (); } } ``` @@ -342,6 +346,7 @@ var entry = new TextField () { }; dialog.Add (entry); Application.Run (dialog); +Application.Shutdown (); if (okpressed) Console.WriteLine ("The user entered: " + entry.Text); ```