51 references to Require
aspire-tray (51)
TrayApplication.Actions.cs (1)
158NativeCallException.Require(NativeMethods.MessageBox(_modalOwner, detail, title, flags) != 0, "MessageBoxW");
TrayApplication.Clipboard.cs (7)
21NativeCallException.Require(memory != 0, "GlobalAlloc(clipboard)"); 25NativeCallException.Require(buffer != 0, "GlobalLock(clipboard)"); 31NativeCallException.Require(unlocked != 0 || Marshal.GetLastPInvokeError() == 0, "GlobalUnlock(clipboard)"); 32NativeCallException.Require(NativeMethods.OpenClipboard(_window) != 0, "OpenClipboard"); 35NativeCallException.Require(NativeMethods.EmptyClipboard() != 0, "EmptyClipboard"); 36NativeCallException.Require(NativeMethods.SetClipboardData(13, memory) != 0, "SetClipboardData"); 41NativeCallException.Require(NativeMethods.CloseClipboard() != 0, "CloseClipboard");
TrayApplication.cs (8)
108NativeCallException.Require(result != -1, "GetMessageW"); 135NativeCallException.Require(_previousDpiContext != 0, "SetThreadDpiAwarenessContext"); 137NativeCallException.Require(_module != 0, "GetModuleHandleW"); 139NativeCallException.Require(_taskbarCreated != 0, "RegisterWindowMessageW"); 146NativeCallException.Require(NativeMethods.RegisterClass(ref windowClass) != 0, "RegisterClassW"); 151NativeCallException.Require(window != 0, "CreateWindowExW"); 179NativeCallException.Require(_timerAdded, "SetTimer"); 183NativeCallException.Require(NativeMethods.PostMessage(window, NativeMethods.ReadyMessage, 0, 0) != 0, "PostMessageW(ready)");
TrayApplication.Icons.cs (9)
44NativeCallException.Require(Size > 0, "GetSystemMetricsForDpi"); 49NativeCallException.Require(original != 0, "LoadImageW(Aspire.ico)"); 120NativeCallException.Require(mask != 0, "CreateBitmap(icon mask)"); 125NativeCallException.Require(icon != 0, "CreateIconIndirect"); 166NativeCallException.Require(Handle != 0, "CreateDIBSection"); 233NativeCallException.Require(dc != 0, "CreateCompatibleDC"); 238NativeCallException.Require(previous != 0 && previous != -1, "SelectObject"); 239NativeCallException.Require(NativeMethods.DrawIconEx(dc, 0, 0, icon, _size, _size, 0, 0, 3) != 0, "DrawIconEx"); 241NativeCallException.Require(NativeMethods.GdiFlush() != 0, "GdiFlush");
TrayApplication.NativeSmoke.cs (10)
30NativeCallException.Require(data.Icon != 0, "LoadIconW(smoke control)"); 40NativeCallException.Require(NativeMethods.ShellNotifyIcon(NativeMethods.NimDelete, ref data) != 0, "Shell_NotifyIconW(smoke control delete)"); 124NativeCallException.Require(NativeMethods.GetWindowRect(_panelWindow, out var rect) != 0, "GetWindowRect(capture)"); 130NativeCallException.Require(screen != 0, "GetDC(screen)"); 137NativeCallException.Require(NativeMethods.BitBlt(memory, 0, 0, width, height, screen, rect.Left, rect.Top, 0x00CC0020 | 0x40000000) != 0, 183NativeCallException.Require(button != 0, "GetDlgItem(smoke dialog response)"); 186NativeCallException.Require(NativeMethods.PostMessage(dialog, NativeMethods.WmCommand, (nuint)pending.Response, button) != 0, "PostMessageW(smoke dialog response)"); 347NativeCallException.Require(NativeMethods.GetKeyboardState(state) != 0, "GetKeyboardState(smoke)"); 350NativeCallException.Require(NativeMethods.SetKeyboardState(state) != 0, "SetKeyboardState(smoke)"); 407NativeCallException.Require(NativeMethods.ShellNotifyIcon(NativeMethods.NimDelete, ref _iconData) != 0, "Shell_NotifyIconW(smoke delete)");
TrayApplication.Panel.cs (16)
147NativeCallException.Require(NativeMethods.RegisterClass(ref windowClass) != 0, "RegisterClassW(flyout)"); 155NativeCallException.Require(_panelWindow != 0, "CreateWindowExW(flyout)"); 169NativeCallException.Require(NativeMethods.GetMonitorInfo(monitor, ref info) != 0, "GetMonitorInfoW(flyout)"); 213NativeCallException.Require(NativeMethods.SetWindowPos(_panelWindow, -1, x, y, width, height, show ? 0x40u : 0x10u) != 0, 244NativeCallException.Require(NativeMethods.InitCommonControlsEx(in controls) != 0, "InitCommonControlsEx"); 248NativeCallException.Require(_panelTooltip != 0, "CreateWindowExW(flyout tooltip)"); 276NativeCallException.Require(NativeMethods.SendMessage(_panelTooltip, NativeMethods.TtmAddTool, 0, (nint)(&tool)) != 0, 293NativeCallException.Require(NativeMethods.GetCursorPos(out var point) != 0, "GetCursorPos(flyout)"); 441NativeCallException.Require(memory != 0, "CreateCompatibleDC(flyout)"); 445NativeCallException.Require(bitmap != 0, "CreateCompatibleBitmap(flyout)"); 448NativeCallException.Require(NativeMethods.BitBlt(dc, 0, 0, width, height, memory, 0, 0, 0x00CC0020) != 0, "BitBlt(flyout)"); // SRCCOPY 503WithGdiDc(graphics, clips, gdi => NativeCallException.Require( 685NativeCallException.Require(NativeMethods.GetTextMetrics(dc, out var metrics) != 0, "GetTextMetricsW(flyout)"); 759NativeCallException.Require(_panelLogo != 0, "LoadImageW(flyout logo)"); 762NativeCallException.Require(NativeMethods.DrawIconEx(dc, rect.Left, rect.Top, _panelLogo, size, size, 0, 0, 3) != 0, 796NativeCallException.Require(font != 0, "CreateFontW(flyout)");