void Windows_ItemClosed(object sender, ClosedItemEventArgs <DesktopWindow> e) { _windows.Items.Remove(e.Item); UnsubscribeWindow(e.Item); LogState(e.Item); }
/// <summary> /// Called when a <see cref="Workspace"/> item's <see cref="DesktopObject.Closed"/> event /// has fired. /// </summary> protected sealed override void OnItemClosed(ClosedItemEventArgs <Workspace> args) { if (this.Count == 0) { // raise pending de-activation event for the last active workspace, before the closing event if (_activeWorkspace != null) { Workspace lastActive = _activeWorkspace; // set this prior to firing any events, so that a call to ActiveWorkspace property will return correct value _activeWorkspace = null; lastActive.RaiseActiveChanged(); } } base.OnItemClosed(args); }
void Workspaces_ItemClosed(object sender, ClosedItemEventArgs <Workspace> e) { _workspaces.Items.Remove(e.Item); LogState(e.Item); }
void Shelves_ItemClosed(object sender, ClosedItemEventArgs <Shelf> e) { _shelves.Items.Remove(e.Item); LogState(e.Item); }
/// <summary> /// Raises the <see cref="ItemClosed"/> event. /// </summary> protected virtual void OnItemClosed(ClosedItemEventArgs <T> args) { EventsHelper.Fire(_itemClosed, this, args); }