Beispiel #1
0
        void Windows_ItemClosed(object sender, ClosedItemEventArgs <DesktopWindow> e)
        {
            _windows.Items.Remove(e.Item);

            UnsubscribeWindow(e.Item);

            LogState(e.Item);
        }
Beispiel #2
0
        /// <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);
        }
Beispiel #3
0
 void Workspaces_ItemClosed(object sender, ClosedItemEventArgs <Workspace> e)
 {
     _workspaces.Items.Remove(e.Item);
     LogState(e.Item);
 }
Beispiel #4
0
 void Shelves_ItemClosed(object sender, ClosedItemEventArgs <Shelf> e)
 {
     _shelves.Items.Remove(e.Item);
     LogState(e.Item);
 }
Beispiel #5
0
 /// <summary>
 /// Raises the <see cref="ItemClosed"/> event.
 /// </summary>
 protected virtual void OnItemClosed(ClosedItemEventArgs <T> args)
 {
     EventsHelper.Fire(_itemClosed, this, args);
 }