Browse Source

Merge pull request #1687 from tznind/shutdown-docs

Added calls to `Application.Shutdown ()` into docs
Tig Kindel 3 years ago
parent
commit
cc9a63c665
2 changed files with 7 additions and 1 deletions
  1. 2 0
      README.md
  2. 5 1
      docfx/articles/overview.md

+ 2 - 0
README.md

@@ -187,6 +187,7 @@ win.Add(
 );
 );
 
 
 Application.Run();
 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:
 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 ()
 	static void Main ()
 	{
 	{
 		Application.Run<App> ();
 		Application.Run<App> ();
+		Application.Shutdown ();
 	}
 	}
 }
 }
 ```
 ```

+ 5 - 1
docfx/articles/overview.md

@@ -26,7 +26,8 @@ class Demo {
 
 
         var n = MessageBox.Query (50, 7, 
         var n = MessageBox.Query (50, 7, 
             "Question", "Do you like console apps?", "Yes", "No");
             "Question", "Do you like console apps?", "Yes", "No");
-
+            
+		Application.Shutdown ();
         return n;
         return n;
     }
     }
 }
 }
@@ -62,6 +63,7 @@ class Demo {
         };
         };
         Application.Top.Add (label);
         Application.Top.Add (label);
         Application.Run ();
         Application.Run ();
+        Application.Shutdown ();
     }
     }
 }
 }
 ```
 ```
@@ -95,6 +97,7 @@ class Demo {
         // Add both menu and win in a single call
         // Add both menu and win in a single call
         Application.Top.Add (menu, win);
         Application.Top.Add (menu, win);
         Application.Run ();
         Application.Run ();
+        Application.Shutdown ();
     }
     }
 }
 }
 ```
 ```
@@ -277,6 +280,7 @@ class Demo {
         // Add both menu and win in a single call
         // Add both menu and win in a single call
         top.Add (win, menu);
         top.Add (win, menu);
         Application.Run (top);
         Application.Run (top);
+        Application.Shutdown ();
     }
     }
 }
 }
 ```
 ```