Inheritance: IDisposable
Esempio n. 1
0
        /// <summary>
        ///   Creates a new snapshot for a window currently visible on the open desktop.
        ///   This constructor should only be called on windows assigned to a currently visible desktop.
        /// </summary>
        /// <param name="currentDesktop">The desktop the window is assigned to.</param>
        /// <param name="info">The open window</param>
        internal WindowSnapshot( VirtualDesktop currentDesktop, WindowInfo info )
        {
            if ( !currentDesktop.IsVisible )
            {
                throw new InvalidOperationException( "Window snapshots can only be created when the desktop the window belongs to is currently visible." );
            }

            Desktop = currentDesktop;
            Info = info;

            Update();
        }
Esempio n. 2
0
 internal StoredSession( VirtualDesktop desktop )
 {
     IsStartupDesktop = desktop.IsStartupDesktop;
     OpenWindows = desktop.WindowSnapshots;
     PersistedApplications = desktop.PersistedApplications;
 }
Esempio n. 3
0
 public VirtualDesktopHud()
 {
     InitializeComponent();
       desktop = null;
 }
 private void VirtualDesktop_Added(object sender, VirtualDesktop e)
 {
     handleChangedNumber();
 }
Esempio n. 5
0
 private void handleChangedNumber()
 {
     desktops       = VirtualDesktop.GetDesktops();
     activePrograms = new IntPtr[desktops.Count];
 }
 public abstract void SetDesktopWallpaper(VirtualDesktop desktop, string path);
 public abstract void SetDesktopName(VirtualDesktop desktop, string name);
Esempio n. 8
0
 /// <summary>
 /// Returns the virtual desktop this window is located on.
 /// </summary>
 public static VirtualDesktop?GetCurrentDesktop(this Window window)
 {
     return(VirtualDesktop.FromHwnd(window.GetHandle()));
 }
 public abstract void MoveDesktop(VirtualDesktop desktop, int index);
 public abstract void SwitchDesktop(VirtualDesktop desktop);
 public abstract VirtualDesktop GetAdjacentDesktop(VirtualDesktop pDesktopReference, AdjacentDesktop uDirection);
 public abstract void MoveViewToDesktop(ApplicationView pView, VirtualDesktop desktop);
Esempio n. 13
0
 /// <summary>
 /// Unpins a window.
 /// </summary>
 /// <returns><see langword="true" /> if already unpinned or successfully unpinned, <see langword="false" /> otherwise (most of the time, the target window is not found or not ready).</returns>
 public static bool Unpin(this Window window)
 {
     return(VirtualDesktop.UnpinWindow(window.GetHandle()));
 }
Esempio n. 14
0
 /// <summary>
 /// Determines whether this window is pinned.
 /// </summary>
 /// <returns><see langword="true" /> if pinned, <see langword="false" /> otherwise.</returns>
 public static bool IsPinned(this Window window)
 {
     return(VirtualDesktop.IsPinnedWindow(window.GetHandle()));
 }
Esempio n. 15
0
 /// <summary>
 /// Moves a window to the specified virtual desktop.
 /// </summary>
 public static void MoveToDesktop(this Window window, VirtualDesktop virtualDesktop)
 {
     VirtualDesktop.MoveToDesktop(window.GetHandle(), virtualDesktop);
 }
Esempio n. 16
0
 internal void ChangeDesktop( VirtualDesktop newDesktop )
 {
     Desktop = newDesktop;
 }
 public abstract void RemoveDesktop(VirtualDesktop pRemove, VirtualDesktop pFallbackDesktop);
Esempio n. 18
0
 /// <summary>
 /// Determines whether this window is on the current virtual desktop.
 /// </summary>
 public static bool IsCurrentVirtualDesktop(this Window window)
 {
     return(VirtualDesktop.IsCurrentVirtualDesktop(window.GetHandle()));
 }