MessageBox.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <Type Name="MessageBox" FullName="Terminal.Gui.MessageBox">
  2. <TypeSignature Language="C#" Value="public static class MessageBox" />
  3. <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit MessageBox extends System.Object" />
  4. <AssemblyInfo>
  5. <AssemblyName>Terminal.Gui</AssemblyName>
  6. <AssemblyVersion>1.0.0.0</AssemblyVersion>
  7. </AssemblyInfo>
  8. <Base>
  9. <BaseTypeName>System.Object</BaseTypeName>
  10. </Base>
  11. <Interfaces />
  12. <Docs>
  13. <summary>
  14. 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.
  15. </summary>
  16. <remarks>To be added.</remarks>
  17. <para>
  18. The difference between the Query and ErrorQuery method is the default set of colors used for the message box.
  19. </para>
  20. <para>
  21. The following example pops up a Message Box with 50 columns, and 7 lines, with the specified title and text, plus two buttons.
  22. The value -1 is returned when the user cancels the dialog by pressing the ESC key.
  23. </para>
  24. <example>
  25. <code lang="c#">
  26. var n = MessageBox.Query (50, 7, "Quit Demo", "Are you sure you want to quit this demo?", "Yes", "No");
  27. if (n == 0)
  28. quit = true;
  29. else
  30. quit = false;
  31. </code>
  32. </example>
  33. </Docs>
  34. <Members>
  35. <Member MemberName="ErrorQuery">
  36. <MemberSignature Language="C#" Value="public static int ErrorQuery (int width, int height, string title, string message, string[] buttons);" />
  37. <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 ErrorQuery(int32 width, int32 height, string title, string message, string[] buttons) cil managed" />
  38. <MemberType>Method</MemberType>
  39. <AssemblyInfo>
  40. <AssemblyVersion>1.0.0.0</AssemblyVersion>
  41. </AssemblyInfo>
  42. <ReturnValue>
  43. <ReturnType>System.Int32</ReturnType>
  44. </ReturnValue>
  45. <Parameters>
  46. <Parameter Name="width" Type="System.Int32" />
  47. <Parameter Name="height" Type="System.Int32" />
  48. <Parameter Name="title" Type="System.String" />
  49. <Parameter Name="message" Type="System.String" />
  50. <Parameter Name="buttons" Type="System.String[]">
  51. <Attributes>
  52. <Attribute>
  53. <AttributeName>System.ParamArray</AttributeName>
  54. </Attribute>
  55. </Attributes>
  56. </Parameter>
  57. </Parameters>
  58. <Docs>
  59. <param name="width">Width for the window.</param>
  60. <param name="height">Height for the window.</param>
  61. <param name="title">Title for the query.</param>
  62. <param name="message">Message to display, might contain multiple lines..</param>
  63. <param name="buttons">Array of buttons to add.</param>
  64. <summary>
  65. Presents an error message box with the specified title and message and a list of buttons to show to the user.
  66. </summary>
  67. <returns>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</returns>
  68. <remarks>To be added.</remarks>
  69. </Docs>
  70. </Member>
  71. <Member MemberName="Query">
  72. <MemberSignature Language="C#" Value="public static int Query (int width, int height, string title, string message, string[] buttons);" />
  73. <MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 Query(int32 width, int32 height, string title, string message, string[] buttons) cil managed" />
  74. <MemberType>Method</MemberType>
  75. <AssemblyInfo>
  76. <AssemblyVersion>1.0.0.0</AssemblyVersion>
  77. </AssemblyInfo>
  78. <ReturnValue>
  79. <ReturnType>System.Int32</ReturnType>
  80. </ReturnValue>
  81. <Parameters>
  82. <Parameter Name="width" Type="System.Int32" />
  83. <Parameter Name="height" Type="System.Int32" />
  84. <Parameter Name="title" Type="System.String" />
  85. <Parameter Name="message" Type="System.String" />
  86. <Parameter Name="buttons" Type="System.String[]">
  87. <Attributes>
  88. <Attribute>
  89. <AttributeName>System.ParamArray</AttributeName>
  90. </Attribute>
  91. </Attributes>
  92. </Parameter>
  93. </Parameters>
  94. <Docs>
  95. <param name="width">Width for the window.</param>
  96. <param name="height">Height for the window.</param>
  97. <param name="title">Title for the query.</param>
  98. <param name="message">Message to display, might contain multiple lines..</param>
  99. <param name="buttons">Array of buttons to add.</param>
  100. <summary>
  101. Presents a message with the specified title and message and a list of buttons to show to the user.
  102. </summary>
  103. <returns>The index of the selected button, or -1 if the user pressed ESC to close the dialog.</returns>
  104. <remarks>To be added.</remarks>
  105. </Docs>
  106. </Member>
  107. </Members>
  108. </Type>