Esempio n. 1
0
 /// <summary>
 ///     Retrieves a new <see cref="Process" /> component that created the window.
 /// </summary>
 /// <param name="windowHandle">A handle to the window.</param>
 /// <returns>
 ///     A <see cref="Process" />A <see cref="Process" /> component that is associated with the specified window
 ///     handle.
 /// </returns>
 public static SystemProcess FromWindowHandle(IntPtr windowHandle)
 {
     return(FromProcessId(AWindowHelper.GetWindowProcessId(windowHandle)));
 }
Esempio n. 2
0
 /// <summary>
 ///     Creates a collection of new <see cref="Process" /> components and associates them with all the process resources
 ///     that share the specified window title.
 /// </summary>
 /// <param name="windowTitle">The window title string.</param>
 /// <returns>
 ///     A collection of type <see cref="Process" /> that represents the process resources running the specified
 ///     application or file.
 /// </returns>
 public static IEnumerable <SystemProcess> FromWindowTitle(string windowTitle)
 {
     return(Windows.Where(window => AWindowHelper.GetWindowText(window) == windowTitle).Select(FromWindowHandle));
 }
Esempio n. 3
0
 /// <summary>
 ///     Creates a collection of new <see cref="Process" /> components and associates them with all the process resources
 ///     that share the specified class name.
 /// </summary>
 /// <param name="className">The class name string.</param>
 /// <returns>
 ///     A collection of type <see cref="Process" /> that represents the process resources running the specified
 ///     application or file.
 /// </returns>
 public static IEnumerable <SystemProcess> FromWindowClassName(string className)
 {
     return(Windows.Where(window => AWindowHelper.GetClassName(window) == className).Select(FromWindowHandle));
 }