Пример #1
0
		public VirtualDesktop CreateDesktopFromSession( StoredSession session )
		{
			// The startup desktop contains all windows open at startup.
			// Windows from previously stored sessions shouldn't be assigned to this startup desktop, so remove them.
			// TODO: Batch these 'hide window' operations together using RepositionWindowInfo?
			session.OpenWindows.ForEach( w => _startupDesktop.RemoveWindow( w ) );

			var restored = new VirtualDesktop( session );
			_availableDesktops.Add( restored );

			return restored;
		}
Пример #2
0
		/// <summary>
		///   Create a virtual desktop from a previously stored session.
		/// </summary>
		/// <param name = "session">The previously stored session.</param>
		internal VirtualDesktop( StoredSession session )
		{
			_windows.AddRange( session.OpenWindows );
		}