Static core class providing tools for managing windows.
コード例 #1
0
 /// <summary>
 /// Gets all the windows that have the specified class name.
 /// </summary>
 /// <param name="className">The class name string.</param>
 /// <returns>A collection of <see cref="RemoteWindow"/>.</returns>
 public IEnumerable <RemoteWindow> GetWindowsByClassName(string className)
 {
     return(WindowHandles
            .Where(handle => WindowCore.GetClassName(handle) == className)
            .Select(handle => new RemoteWindow(_memorySharp, handle)));
 }
コード例 #2
0
 /// <summary>
 /// Gets all the windows that contain the specified title.
 /// </summary>
 /// <param name="windowTitle">A part a window title string.</param>
 /// <returns>A collection of <see cref="RemoteWindow"/>.</returns>
 public IEnumerable <RemoteWindow> GetWindowsByTitleContains(string windowTitle)
 {
     return(WindowHandles
            .Where(handle => WindowCore.GetWindowText(handle).Contains(windowTitle))
            .Select(handle => new RemoteWindow(_memorySharp, handle)));
 }
コード例 #3
0
ファイル: RemoteWindow.cs プロジェクト: unknownv2/basm
 /// <summary>
 /// Sends the specified message to a window or windows.
 /// The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.
 /// </summary>
 /// <param name="message">The message to be sent.</param>
 /// <param name="wParam">Additional message-specific information.</param>
 /// <param name="lParam">Additional message-specific information.</param>
 /// <returns>The return value specifies the result of the message processing; it depends on the message sent.</returns>
 public IntPtr SendMessage(uint message, UIntPtr wParam, IntPtr lParam)
 {
     return(WindowCore.SendMessage(Handle, message, wParam, lParam));
 }
コード例 #4
0
ファイル: RemoteWindow.cs プロジェクト: unknownv2/basm
 /// <summary>
 /// Places (posts) a message in the message queue associated with the thread that created the window and returns without waiting for the thread to process the message.
 /// </summary>
 /// <param name="message">The message to be posted.</param>
 /// <param name="wParam">Additional message-specific information.</param>
 /// <param name="lParam">Additional message-specific information.</param>
 public void PostMessage(uint message, UIntPtr wParam, UIntPtr lParam)
 {
     WindowCore.PostMessage(Handle, message, wParam, lParam);
 }
コード例 #5
0
ファイル: RemoteWindow.cs プロジェクト: unknownv2/basm
 /// <summary>
 /// Flashes the window. It does not change the active state of the window.
 /// </summary>
 /// <param name="count">The number of times to flash the window.</param>
 /// <param name="timeout">The rate at which the window is to be flashed.</param>
 /// <param name="flags">The flash status.</param>
 public void Flash(uint count, TimeSpan timeout, FlashWindowFlags flags = FlashWindowFlags.All)
 {
     WindowCore.FlashWindowEx(Handle, flags, count, timeout);
 }
コード例 #6
0
ファイル: RemoteWindow.cs プロジェクト: unknownv2/basm
 /// <summary>
 /// Flashes the window one time. It does not change the active state of the window.
 /// </summary>
 public void Flash()
 {
     WindowCore.FlashWindow(Handle);
 }
コード例 #7
0
ファイル: RemoteWindow.cs プロジェクト: unknownv2/basm
 /// <summary>
 /// Activates the window.
 /// </summary>
 public void Activate()
 {
     WindowCore.SetForegroundWindow(Handle);
 }