コード例 #1
0
 /// <inheritdoc/>
 public void Reset()
 {
     DesktopWindow = null;
     WindowsList.Clear();
     _windowsStoreApps.Clear();
     _windowHandlesToIgnore.Clear();
     _refreshDesktopWindowOnly = false;
 }
コード例 #2
0
        /// <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));
        }