tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
NativeMethods.cs
Go to the documentation of this file.
1using System.Runtime.InteropServices;
2
4{
8 static class NativeMethods
9 {
13 public enum MessageBoxButtons : uint
14 {
18 YesNo = 0x00000004,
19 }
20
24 public enum DialogResult : int
25 {
29 Yes = 6,
30 }
31
41 [DllImport("user32.dll", CharSet = CharSet.Unicode)]
42 public static extern DialogResult MessageBox(HandleRef hWnd, string text, string caption, MessageBoxButtons type);
43 }
44}
Native methods used by the code.
MessageBoxButtons
See https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox.
@ YesNo
The message box contains two push buttons: Yes and No.
DialogResult
The result of a call to MessageBox(HandleRef, string, string, MessageBoxButtons).
static DialogResult MessageBox(HandleRef hWnd, string text, string caption, MessageBoxButtons type)
Displays a modal dialog box that contains a system icon, a set of buttons, and a brief application-sp...