/// <inheritdoc/> public void Reset() { DesktopWindow = null; WindowsList.Clear(); _windowsStoreApps.Clear(); _windowHandlesToIgnore.Clear(); _refreshDesktopWindowOnly = false; }
/// <summary> /// Refresh the list of <see cref="Window"/> /// </summary> /// <param name="refreshDesktopWindowOnly">Defines whether we must only refresh the desktop window information.</param> internal void RefreshWindows(bool refreshDesktopWindowOnly = false) { if (!refreshDesktopWindowOnly) { WindowsList.Clear(); WindowsListChanged?.Invoke(this, new EventArgs()); } _refreshDesktopWindowOnly = refreshDesktopWindowOnly; Requires.VerifySucceeded(NativeMethods.EnumWindows(EnumWindowsCallback, 0)); }