Terminal.Gui.MessageBox.html 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class MessageBox
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class MessageBox
  11. ">
  12. <meta name="generator" content="docfx 2.18.2.0">
  13. <link rel="shortcut icon" href="../../favicon.ico">
  14. <link rel="stylesheet" href="../../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../../styles/docfx.css">
  16. <link rel="stylesheet" href="../../styles/main.css">
  17. <meta property="docfx:navrel" content="">
  18. <meta property="docfx:tocrel" content="../toc.html">
  19. </head>
  20. <body data-spy="scroll" data-target="#affix">
  21. <div id="wrapper">
  22. <header>
  23. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  24. <div class="container">
  25. <div class="navbar-header">
  26. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  27. <span class="sr-only">Toggle navigation</span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. </button>
  32. <a class="navbar-brand" href="../../index.html">
  33. <img id="logo" class="svg" src="../../logo.svg" alt="">
  34. </a>
  35. </div>
  36. <div class="collapse navbar-collapse" id="navbar">
  37. <form class="navbar-form navbar-right" role="search" id="search">
  38. <div class="form-group">
  39. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </nav>
  45. <div class="subnav navbar navbar-default">
  46. <div class="container hide-when-search" id="breadcrumb">
  47. <ul class="breadcrumb">
  48. <li></li>
  49. </ul>
  50. </div>
  51. </div>
  52. </header>
  53. <div role="main" class="container body-content hide-when-search">
  54. <div class="sidenav hide-when-search">
  55. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  56. <div class="sidetoggle collapse" id="sidetoggle">
  57. <div id="sidetoc"></div>
  58. </div>
  59. </div>
  60. <div class="article row grid-right">
  61. <div class="col-md-10">
  62. <article class="content wrap" id="_content" data-uid="Terminal.Gui.MessageBox">
  63. <h1 id="Terminal_Gui_MessageBox" data-uid="Terminal.Gui.MessageBox">Class MessageBox
  64. </h1>
  65. <div class="markdown level0 summary"><p>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.</p>
  66. </div>
  67. <div class="markdown level0 conceptual"></div>
  68. <div class="inheritance">
  69. <h5>Inheritance</h5>
  70. <div class="level0"><span class="xref">System.Object</span></div>
  71. <div class="level1"><span class="xref">MessageBox</span></div>
  72. </div>
  73. <h6><strong>Namespace</strong>: <a class="xref" href="../Terminal.Gui.html">Terminal.Gui</a></h6>
  74. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  75. <h5 id="Terminal_Gui_MessageBox_syntax">Syntax</h5>
  76. <div class="codewrapper">
  77. <pre><code class="lang-csharp hljs">public static class MessageBox</code></pre>
  78. </div>
  79. <h3 id="methods">Methods
  80. </h3>
  81. <a id="Terminal_Gui_MessageBox_ErrorQuery_" data-uid="Terminal.Gui.MessageBox.ErrorQuery*"></a>
  82. <h4 id="Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_System_String_System_String_System_String___" data-uid="Terminal.Gui.MessageBox.ErrorQuery(System.Int32,System.Int32,System.String,System.String,System.String[])">ErrorQuery(Int32, Int32, String, String, String[])</h4>
  83. <div class="markdown level1 summary"><p>Presents an error message box with the specified title and message and a list of buttons to show to the user.</p>
  84. </div>
  85. <div class="markdown level1 conceptual"></div>
  86. <h5 class="decalaration">Declaration</h5>
  87. <div class="codewrapper">
  88. <pre><code class="lang-csharp hljs">public static int ErrorQuery (int width, int height, string title, string message, string[] buttons);</code></pre>
  89. </div>
  90. <h5 class="parameters">Parameters</h5>
  91. <table class="table table-bordered table-striped table-condensed">
  92. <thead>
  93. <tr>
  94. <th>Type</th>
  95. <th>Name</th>
  96. <th>Description</th>
  97. </tr>
  98. </thead>
  99. <tbody>
  100. <tr>
  101. <td><span class="xref">System.Int32</span></td>
  102. <td><span class="parametername">width</span></td>
  103. <td><p>Width for the window.</p>
  104. </td>
  105. </tr>
  106. <tr>
  107. <td><span class="xref">System.Int32</span></td>
  108. <td><span class="parametername">height</span></td>
  109. <td><p>Height for the window.</p>
  110. </td>
  111. </tr>
  112. <tr>
  113. <td><span class="xref">System.String</span></td>
  114. <td><span class="parametername">title</span></td>
  115. <td><p>Title for the query.</p>
  116. </td>
  117. </tr>
  118. <tr>
  119. <td><span class="xref">System.String</span></td>
  120. <td><span class="parametername">message</span></td>
  121. <td><p>Message to display, might contain multiple lines..</p>
  122. </td>
  123. </tr>
  124. <tr>
  125. <td><span class="xref">System.String</span>[]</td>
  126. <td><span class="parametername">buttons</span></td>
  127. <td><p>Array of buttons to add.</p>
  128. </td>
  129. </tr>
  130. </tbody>
  131. </table>
  132. <h5 class="returns">Returns</h5>
  133. <table class="table table-bordered table-striped table-condensed">
  134. <thead>
  135. <tr>
  136. <th>Type</th>
  137. <th>Description</th>
  138. </tr>
  139. </thead>
  140. <tbody>
  141. <tr>
  142. <td><span class="xref">System.Int32</span></td>
  143. <td><p>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</p>
  144. </td>
  145. </tr>
  146. </tbody>
  147. </table>
  148. <a id="Terminal_Gui_MessageBox_Query_" data-uid="Terminal.Gui.MessageBox.Query*"></a>
  149. <h4 id="Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_System_String_System_String_System_String___" data-uid="Terminal.Gui.MessageBox.Query(System.Int32,System.Int32,System.String,System.String,System.String[])">Query(Int32, Int32, String, String, String[])</h4>
  150. <div class="markdown level1 summary"><p>Presents a message with the specified title and message and a list of buttons to show to the user.</p>
  151. </div>
  152. <div class="markdown level1 conceptual"></div>
  153. <h5 class="decalaration">Declaration</h5>
  154. <div class="codewrapper">
  155. <pre><code class="lang-csharp hljs">public static int Query (int width, int height, string title, string message, string[] buttons);</code></pre>
  156. </div>
  157. <h5 class="parameters">Parameters</h5>
  158. <table class="table table-bordered table-striped table-condensed">
  159. <thead>
  160. <tr>
  161. <th>Type</th>
  162. <th>Name</th>
  163. <th>Description</th>
  164. </tr>
  165. </thead>
  166. <tbody>
  167. <tr>
  168. <td><span class="xref">System.Int32</span></td>
  169. <td><span class="parametername">width</span></td>
  170. <td><p>Width for the window.</p>
  171. </td>
  172. </tr>
  173. <tr>
  174. <td><span class="xref">System.Int32</span></td>
  175. <td><span class="parametername">height</span></td>
  176. <td><p>Height for the window.</p>
  177. </td>
  178. </tr>
  179. <tr>
  180. <td><span class="xref">System.String</span></td>
  181. <td><span class="parametername">title</span></td>
  182. <td><p>Title for the query.</p>
  183. </td>
  184. </tr>
  185. <tr>
  186. <td><span class="xref">System.String</span></td>
  187. <td><span class="parametername">message</span></td>
  188. <td><p>Message to display, might contain multiple lines..</p>
  189. </td>
  190. </tr>
  191. <tr>
  192. <td><span class="xref">System.String</span>[]</td>
  193. <td><span class="parametername">buttons</span></td>
  194. <td><p>Array of buttons to add.</p>
  195. </td>
  196. </tr>
  197. </tbody>
  198. </table>
  199. <h5 class="returns">Returns</h5>
  200. <table class="table table-bordered table-striped table-condensed">
  201. <thead>
  202. <tr>
  203. <th>Type</th>
  204. <th>Description</th>
  205. </tr>
  206. </thead>
  207. <tbody>
  208. <tr>
  209. <td><span class="xref">System.Int32</span></td>
  210. <td><p>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</p>
  211. </td>
  212. </tr>
  213. </tbody>
  214. </table>
  215. </article>
  216. </div>
  217. <div class="hidden-sm col-md-2" role="complementary">
  218. <div class="sideaffix">
  219. <div class="contribution">
  220. <ul class="nav">
  221. </ul>
  222. </div>
  223. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  224. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  225. </nav>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. <footer>
  231. <div class="grad-bottom"></div>
  232. <div class="footer">
  233. <div class="container">
  234. <span class="pull-right">
  235. <a href="#top">Back to top</a>
  236. </span>
  237. <span>Copyright © 2015-2017 Microsoft<br>Generated by <strong>DocFX</strong></span>
  238. </div>
  239. </div>
  240. </footer>
  241. </div>
  242. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  243. <script type="text/javascript" src="../../styles/docfx.js"></script>
  244. <script type="text/javascript" src="../../styles/main.js"></script>
  245. </body>
  246. </html>