Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TreatControlCAsInput

bool System.ConsolePal.TreatControlCAsInput
staticgetset

Definition at line 220 of file ConsolePal.cs.

221 {
222 get
223 {
224 IntPtr inputHandle = InputHandle;
225 if (inputHandle == InvalidHandleValue)
226 {
228 }
229 int mode = 0;
230 if (!global::Interop.Kernel32.GetConsoleMode(inputHandle, out mode))
231 {
233 }
234 return (mode & 1) == 0;
235 }
236 set
237 {
238 IntPtr inputHandle = InputHandle;
239 if (inputHandle == InvalidHandleValue)
240 {
242 }
243 int mode = 0;
244 if (!global::Interop.Kernel32.GetConsoleMode(inputHandle, out mode))
245 {
247 }
248 mode = ((!value) ? (mode | 1) : (mode & -2));
249 if (!global::Interop.Kernel32.SetConsoleMode(inputHandle, mode))
250 {
252 }
253 }
254 }
static IntPtr InvalidHandleValue
static IntPtr InputHandle
static Exception GetExceptionForWin32Error(int errorCode, string path="")
static string IO_NoConsole
Definition SR.cs:58
Definition SR.cs:7