Represents a shelf within a desktop window.
Inheritance: ClearCanvas.Desktop.DesktopObject, IShelf
 /// <summary>
 /// Show the alert viewer shelf.
 /// </summary>
 public void Show()
 {
     if (_shelf == null)
     {
         _shelf = ApplicationComponent.LaunchAsShelf(
             this.Context.DesktopWindow,
             new AlertViewerComponent(),
             SR.TitleAlertViewer,
             ShelfName,
             ShelfDisplayHint.DockRight | ShelfDisplayHint.DockAutoHide);
         _shelf.Closed += (sender, args) => _shelf = null;
     }
     else
     {
         _shelf.Activate();
     }
 }
Example #2
0
        void Shelf2()
        {
            if (_shelf2 == null)
            {
                TestComponent component = new TestComponent("Shelf2");
                _shelf2 = ApplicationComponent.LaunchAsShelf(
                    this.Context.DesktopWindow,
                    component,
                    "Shelf 2",
                    "Shelf2",
                    ShelfDisplayHint.DockFloat);

                _shelf2.Closed += delegate { _shelf2 = null; };
            }
            else
            {
                _shelf2.Activate();
            }
        }
Example #3
0
        void Shelf1()
        {
            if (_shelf1 == null)
            {
                TestComponent component = new TestComponent("Shelf1");
                _shelf1 = ApplicationComponent.LaunchAsShelf(
                    this.Context.DesktopWindow,
                    component,
                    "Shelf 1",
                    "Shelf1",
                    ShelfDisplayHint.DockFloat | ShelfDisplayHint.DockLeft | ShelfDisplayHint.HideOnWorkspaceOpen);

                _shelf1.Closed += delegate { _shelf1 = null; };
            }
            else
            {
                _shelf1.Activate();
            }
        }
Example #4
0
        private void ShowShelf(DesktopWindow window)
        {
            // the shelf is not currently open
            if (_closeHelperShelf == null)
            {
                // launch it
                CloseHelperComponent component = new CloseHelperComponent();
                _closeHelperShelf = ApplicationComponent.LaunchAsShelf(window, component,
                                                                       SR.TitleCloseAssistant,
                                                                       "Close Assistant",
                                                                       ShelfDisplayHint.DockLeft);
                _closeHelperShelf.Closed += delegate { _closeHelperShelf = null; };
            }
            else
            {
                _closeHelperShelf.Activate();
            }

            CloseHelperComponent helper = (CloseHelperComponent)_closeHelperShelf.Component;

            helper.Refresh();
        }
Example #5
0
 /// <summary>
 /// Creates a shelf view for the specified shelf.
 /// </summary>
 internal IShelfView CreateShelfView(Shelf shelf)
 {
     return(this.DesktopWindowView.CreateShelfView(shelf));
 }
Example #6
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="shelf"></param>
 /// <param name="desktopView"></param>
 protected internal ShelfView(Shelf shelf, DesktopWindowView desktopView)
 {
     _shelf = shelf;
     _desktopView = desktopView;
 }
Example #7
0
 internal Host(Shelf shelf, IApplicationComponent component)
     : base(component)
 {
     Platform.CheckForNullReference(shelf, "shelf");
     _shelf = shelf;
 }
Example #8
0
 /// <summary>
 /// Creates a new view for the specified <see cref="Shelf"/>.
 /// </summary>
 /// <remarks>
 /// Override this method if you want to return a custom implementation of <see cref="IShelfView"/>.
 /// </remarks>
 /// <param name="shelf"></param>
 /// <returns></returns>
 public virtual IShelfView CreateShelfView(Shelf shelf)
 {
     throw new NotSupportedException();
 }
Example #9
0
File: Shelf.cs Project: nhannd/Xian
 internal Host(Shelf shelf, IApplicationComponent component)
     : base(component)
 {
     Platform.CheckForNullReference(shelf, "shelf");
     _shelf = shelf;
 }