Beispiel #1
0
        public DockItemToolbar GetToolbar(PositionType position)
        {
            switch (position)
            {
            case PositionType.Top:
                if (toolbarTop == null)
                {
                    toolbarTop = new DockItemToolbar(this, PositionType.Top);
                }
                return(toolbarTop);

            case PositionType.Bottom:
                if (toolbarBottom == null)
                {
                    toolbarBottom = new DockItemToolbar(this, PositionType.Bottom);
                }
                return(toolbarBottom);

            case PositionType.Left:
                if (toolbarLeft == null)
                {
                    toolbarLeft = new DockItemToolbar(this, PositionType.Left);
                }
                return(toolbarLeft);

            case PositionType.Right:
                if (toolbarRight == null)
                {
                    toolbarRight = new DockItemToolbar(this, PositionType.Right);
                }
                return(toolbarRight);

            default: throw new ArgumentException();
            }
        }
Beispiel #2
0
 public DockItemToolbar GetToolbar(PositionType position)
 {
     switch (position) {
         case PositionType.Top:
             if (toolbarTop == null)
                 toolbarTop = new DockItemToolbar (this, PositionType.Top);
             return toolbarTop;
         case PositionType.Bottom:
             if (toolbarBottom == null)
                 toolbarBottom = new DockItemToolbar (this, PositionType.Bottom);
             return toolbarBottom;
         case PositionType.Left:
             if (toolbarLeft == null)
                 toolbarLeft = new DockItemToolbar (this, PositionType.Left);
             return toolbarLeft;
         case PositionType.Right:
             if (toolbarRight == null)
                 toolbarRight = new DockItemToolbar (this, PositionType.Right);
             return toolbarRight;
         default: throw new ArgumentException ();
     }
 }