Browse Source

More readme

Miguel de Icaza 7 years ago
parent
commit
fc9029e057
2 changed files with 26 additions and 12 deletions
  1. 9 12
      README.md
  2. 17 0
      Terminal.Gui/Views/MessageBox.cs

+ 9 - 12
README.md

@@ -2,9 +2,7 @@
 
 This is a simple UI toolkit for .NET.
 
-It is an updated version of
-[gui.cs](http://tirania.org/blog/archive/2007/Apr-16.html) that
-I wrote for [mono-curses](https://github.com/mono/mono-curses) in 2007.
+![Sample app](https://raw.githubusercontent.com/migueldeicaza/gui.cs/master/docfx/sample.png)
 
 The toolkit contains various controls for building text user interfaces:
 
@@ -85,10 +83,6 @@ class Demo {
 }
 ```
 
-This shows a UI like this:
-
-![Sample app](https://raw.githubusercontent.com/migueldeicaza/gui.cs/master/docfx/sample.png)
-
 # Running and Building
 
 Open the solution and run the sample program.
@@ -125,10 +119,13 @@ tracked in the TODO.md file.
 
 # History
 
+This is an updated version of
+[gui.cs](http://tirania.org/blog/archive/2007/Apr-16.html) that
+I wrote for [mono-curses](https://github.com/mono/mono-curses) in 2007.
+
 The original gui.cs was a UI toolkit in a single file and tied to
-curses.  This version tries to be console-agnostic (but currently only
-has a curses backend, go figure) and instead of having a
-container/widget model, only uses Views (which can contain subviews)
-and changes the rendering model to rely on damage regions instead of 
-burderning each view with the details.
+curses.  This version tries to be console-agnostic and instead of
+having a container/widget model, only uses Views (which can contain
+subviews) and changes the rendering model to rely on damage regions
+instead of burderning each view with the details.
 

+ 17 - 0
Terminal.Gui/Views/MessageBox.cs

@@ -4,6 +4,23 @@ namespace Terminal.Gui {
 	/// <summary>
 	/// Message box displays a modal message to the user, with a title, a message and a series of options that the user can choose from.
 	/// </summary>
+	/// <para>
+	///   The difference between the Query and ErrorQuery method is the default set of colors used for the message box.
+	/// </para>
+	/// <para>
+	/// The following example pops up a Message Box with 50 columns, and 7 lines, with the specified title and text, plus two buttons.
+	/// The value -1 is returned when the user cancels the dialog by pressing the ESC key.
+	/// </para>
+	/// <example>
+	/// <code lang="c#">
+	/// var n = MessageBox.Query (50, 7, "Quit Demo", "Are you sure you want to quit this demo?", "Yes", "No");
+	/// if (n == 0)
+	///    quit = true;
+	/// else
+	///    quit = false;
+	/// 
+	/// </code>
+	/// </example>
 	public class MessageBox {
 		/// <summary>
 		/// Presents a message with the specified title and message and a list of buttons to show to the user.