From fc9029e057f00d066d3a50aacb5118b1f24c6284 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Thu, 8 Feb 2018 22:56:54 -0500 Subject: [PATCH] More readme --- README.md | 23 ++++++++++------------- Terminal.Gui/Views/MessageBox.cs | 17 +++++++++++++++++ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 68ad672e8..541377702 100644 --- a/README.md +++ b/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 -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. +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 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. diff --git a/Terminal.Gui/Views/MessageBox.cs b/Terminal.Gui/Views/MessageBox.cs index cda529967..485b92a60 100644 --- a/Terminal.Gui/Views/MessageBox.cs +++ b/Terminal.Gui/Views/MessageBox.cs @@ -4,6 +4,23 @@ namespace Terminal.Gui { /// /// 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. /// + /// + /// The difference between the Query and ErrorQuery method is the default set of colors used for the message box. + /// + /// + /// 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. + /// + /// + /// + /// 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; + /// + /// + /// public class MessageBox { /// /// Presents a message with the specified title and message and a list of buttons to show to the user.