コード例 #1
0
 /// <summary>
 ///     Unpin the given window from all desktops.
 /// </summary>
 /// <param name="handle">The handle of the window to unpin.</param>
 public void UnpinWindow(IntPtr handle)
 {
     DesktopManager.UnpinWindow(handle);
 }
コード例 #2
0
 /// <summary>
 ///     Moves to the given desktop.
 /// </summary>
 /// <param name="point">The point in the grid to go to.</param>
 public void GoTo(Point point)
 {
     DesktopManager.GoTo(PointToIndex(point));
 }
コード例 #3
0
 /// <summary>
 ///     Get the current desktop's position in the matrix/grid.
 /// </summary>
 /// <returns>The point corresponding to the current desktop.</returns>
 public Point GetCurrentPosition()
 {
     return(IndexToPoint(DesktopManager.CurrentDesktop()));
 }
コード例 #4
0
 /// <summary>
 ///     Moves to the given desktop with the current foreground window.
 /// </summary>
 /// <param name="point">The point in the grid to go to.</param>
 private void MoveForegroundWindowTo(Point point)
 {
     DesktopManager.MoveForegroundWindowToDesktop(PointToIndex(point));
     GoTo(point);
 }
コード例 #5
0
 /// <summary>
 ///     Captures/stores the current foreground window's reference for future use.
 /// </summary>
 public void CaptureForegroundWindow()
 {
     CapturedView = DesktopManager.GetForegroundView();
 }
コード例 #6
0
 /// <summary>
 ///     Moves to the given desktop with the captured window.
 /// </summary>
 /// <param name="point">The point in the grid to go to.</param>
 private void MoveCapturedWindowTo(Point point)
 {
     DesktopManager.MoveViewToDesktop(CapturedView, PointToIndex(point));
     GoTo(point);
 }
コード例 #7
0
 /// <summary>
 ///     Create a desktop matrix by defining the size of the matrix and creating/removing any necessary desktops.
 /// </summary>
 /// <param name="rows">The height of the matrix.</param>
 /// <param name="columns">The width of the matrix.</param>
 public DesktopMatrix(int rows, int columns)
 {
     Rows    = rows;
     Columns = columns;
     DesktopManager.MatchCount(Rows * Columns);
 }