예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DockablePanel"/> class.
 /// </summary>
 /// <param name="key">The key.</param>
 /// <param name="caption">The caption.</param>
 /// <param name="innerControl">The inner control.</param>
 /// <param name="dock">The dock.</param>
 public DockablePanel(string key, string caption, Control innerControl, DockStyle dock)
 {
     this.Dock = dock;
     this.Key = key;
     this.InnerControl = innerControl;
     this.Caption = caption;
 }
예제 #2
0
        public void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex)
        {
            if (dockStyle == DockStyle.Fill)
            {
                for (int i = NestedPanes.Count - 1; i >= 0; i--)
                {
                    DockPane paneFrom = NestedPanes[i];
                    for (int j = paneFrom.Contents.Count - 1; j >= 0; j--)
                    {
                        IDockContent c = paneFrom.Contents[j];
                        c.DockHandler.Pane = pane;
                        if (contentIndex != -1)
                            pane.SetContentIndex(c, contentIndex);
                        c.DockHandler.Activate();
                    }
                }
            }
            else
            {
                DockAlignment alignment = DockAlignment.Left;
                if (dockStyle == DockStyle.Left)
                    alignment = DockAlignment.Left;
                else if (dockStyle == DockStyle.Right)
                    alignment = DockAlignment.Right;
                else if (dockStyle == DockStyle.Top)
                    alignment = DockAlignment.Top;
                else if (dockStyle == DockStyle.Bottom)
                    alignment = DockAlignment.Bottom;

                MergeNestedPanes(VisibleNestedPanes, pane.NestedPanesContainer.NestedPanes, pane, alignment, 0.5);
            }
        }
예제 #3
0
 public FloorReflectionFilterProp(int alphaStart, int alphaEnd, DockStyle dockPosition, int offset)
 {
     this.AlphaStart = alphaStart;
     this.AlphaEnd = alphaEnd;
     this.DockPosition = dockPosition;
     this.Offset = offset;
 }
예제 #4
0
        public static DataGridViewControl Create(string name = null, DockStyle dockStyle = DockStyle.None, int? x = null, int? y = null, int? width = null, int? height = null, bool showRowNumber = false)
        {
            DataGridViewCellStyle viewCellStyle = new DataGridViewCellStyle();
            viewCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
            viewCellStyle.BackColor = SystemColors.Window;
            viewCellStyle.Font = new Font("Courier New", 8.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
            viewCellStyle.ForeColor = SystemColors.ControlText;
            viewCellStyle.SelectionBackColor = SystemColors.Highlight;
            viewCellStyle.SelectionForeColor = SystemColors.HighlightText;
            viewCellStyle.WrapMode = DataGridViewTriState.False;
            viewCellStyle.NullValue = "(null)";

            DataGridViewControl grid = new DataGridViewControl();
            ((ISupportInitialize)grid).BeginInit();
            grid.Name = name;
            grid.Dock = dockStyle;
            Point? point = zForm.GetPoint(x, y);
            if (point != null)
                grid.Location = (Point)point;
            Size? size = zForm.GetSize(width, height);
            if (size != null)
                grid.Size = (Size)size;
            grid.AllowUserToAddRows = false;
            grid.AllowUserToDeleteRows = false;
            grid.AllowUserToOrderColumns = true;
            grid.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            grid.DefaultCellStyle = viewCellStyle;
            grid.ReadOnly = true;
            //grid.TabIndex = 0;
            if (showRowNumber)
                grid.RowPostPaint += grid.DataGridView_RowPostPaint;
            ((ISupportInitialize)grid).EndInit();
            return grid;
        }
예제 #5
0
        public static XtraGridControl Create(string name = null, DockStyle dockStyle = DockStyle.None, int? x = null, int? y = null, int? width = null, int? height = null)
        {
            XtraGridControl grid = new XtraGridControl();
            GridView gridView = new GridView();

            ((ISupportInitialize)grid).BeginInit();
            ((ISupportInitialize)gridView).BeginInit();

            grid.MainView = gridView;
            grid.Name = name;
            grid.Dock = dockStyle;
            grid.Font = new Font("Courier New", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0);
            Point? point = zForm.GetPoint(x, y);
            if (point != null)
                grid.Location = (Point)point;
            Size? size = zForm.GetSize(width, height);
            if (size != null)
                grid.Size = (Size)size;
            //grid.TabIndex = 0;

            gridView.GridControl = grid;

            ((ISupportInitialize)grid).EndInit();
            ((ISupportInitialize)gridView).EndInit();

            return grid;
        }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DockablePanel"/> class.
 /// </summary>
 /// <param name="key">The key.</param>
 /// <param name="caption">The caption.</param>
 /// <param name="innerControl">The inner control.</param>
 /// <param name="dock">The dock.</param>
 public DockablePanel(string key, string caption, Object innerControl, DockStyle dock)
 {
     Dock = dock;
     Key = key;
     InnerControl = innerControl;
     Caption = caption;
 }
예제 #7
0
        /// <summary>
        /// Create a label object with custom visual properties
        /// </summary>
        /// <param name="text">Text to display</param>
        /// <param name="dock">Style of dock with its parent object</param>
        /// <param name="height">Height of the label</param>
        /// <param name="width">Width of the label</param>
        /// <param name="border">If true, draw a border</param>
        /// <param name="center">If true, set the text align to center</param>
        /// <returns>The new label</returns>
        public static Label CreateLabel(string text, DockStyle dock, int height, int width = 0, bool border = false, bool center = false)
        {
            // Define the object to return
            Label label = new Label();

            // Set the text to display
            label.Text = text;

            // Set the dimensions of the label
            // NOTE: if width zero, will ajust to the parent object
            label.Height = height;
            label.Width = width;

            // Draw border if required
            label.BorderStyle = (border) ? BorderStyle.FixedSingle : BorderStyle.None;

            // Set the dock style to use
            label.Dock = dock;

            // Set the font of the text
            label.Font = new System.Drawing.Font(FontFamily.GenericSansSerif, 9);

            // Set the text align to use.
            // If not center, will use the normal top left value
            label.TextAlign = (center) ? ContentAlignment.MiddleCenter : ContentAlignment.TopLeft;

            return label;
        }
예제 #8
0
		private void SetValues(Rectangle floatWindowBounds, Control dockTo, DockStyle dock, int contentIndex) {
			m_floatWindowBounds = floatWindowBounds;
			m_dockTo = dockTo;
			m_dock = dock;
			m_contentIndex = contentIndex;
			FlagTestDrop = true;
		}
 public override void DrawTab(Color foreColor, Color backColor, Color highlightColor, Color shadowColor, Color borderColor, bool active, bool mouseOver, DockStyle dock, Graphics graphics, SizeF tabSize)
 {
     RectangleF headerRect = new RectangleF(0, 0, tabSize.Width, tabSize.Height);
     Rectangle header = new Rectangle(0, 0, (int)tabSize.Width, (int)tabSize.Height);
     using (var path = ShapeRender.GetTopRoundRect(0, 0, tabSize.Width, tabSize.Height, 0.5f))
     {
         if (active)
         {
             using (Brush brush = new SolidBrush(foreColor))
             using (Pen pen = new Pen(shadowColor, 0.2f))
             {
                 graphics.FillPath(brush, path);
                 graphics.DrawRectangle(pen, header);
             }
         }
         else
         {
             using (Brush brush = new SolidBrush(backColor))
             using (Pen pen = new Pen(shadowColor))
             {
                 graphics.FillPath(brush, path);
             }
         }
     }
 }
예제 #10
0
 public MyUserControl(MasterController masterController, Panel panel, DockStyle dockStyle)
 {
     InitializeComponent();
     this.container = panel;
     this.masterController = masterController;
     appear(dockStyle);
 }
예제 #11
0
		private void SetOutline(DockPanel dockPanel, DockStyle dock, bool fullPanelEdge)
		{
			Rectangle rect = fullPanelEdge ? dockPanel.DockArea : dockPanel.DocumentWindowBounds;
			rect.Location = dockPanel.PointToScreen(rect.Location);
			if (dock == DockStyle.Top)
			{
				int height = (int)(rect.Height * dockPanel.DockBottomPortion);
				rect = new Rectangle(rect.X, rect.Y, rect.Width, height);
			}
			else if (dock == DockStyle.Bottom)
			{
				int height = (int)(rect.Height * dockPanel.DockBottomPortion);
				rect = new Rectangle(rect.X, rect.Bottom - height, rect.Width, height);
			}
			else if (dock == DockStyle.Left)
			{
				int width = (int)(rect.Width * dockPanel.DockLeftPortion);
				rect = new Rectangle(rect.X, rect.Y, width, rect.Height);
			}
			else if (dock == DockStyle.Right)
			{
				int width = (int)(rect.Width * dockPanel.DockRightPortion);
				rect = new Rectangle(rect.Right - width, rect.Y, width, rect.Height);
			}
			else if (dock == DockStyle.Fill)
			{
				rect = dockPanel.DocumentWindowBounds;
				rect.Location = dockPanel.PointToScreen(rect.Location);
			}

			SetDragForm(rect);
		}
예제 #12
0
 public static int Init(Control placeholder, DockStyle dockstyle)
 {
     currentPipeline = 0;
     dockStyle = dockstyle;
     Placeholder = placeholder;
     return StepRun(0);
 }
예제 #13
0
 public SliderPane(MasterController masterController, Panel panel, DockStyle dockStyle)
     : base(masterController, panel, dockStyle)
 {
     InitializeComponent();
     width = min_width;
     StateChange += SliderPane_StateChange;
 }
예제 #14
0
        /// <summary>
        /// Get preview bounds
        /// </summary>
        /// <param name="dock">dock for which to get the preview bounds</param>
        /// <param name="movedPanel">moved panel</param>
        /// <param name="panelUnderMouse">panel under mouse</param>
        /// <param name="freeAreaBounds">free area bounds</param>
        /// <returns>preview bounds</returns>
        public static Rectangle GetPreviewBounds(DockStyle dock, Control movedPanel, Control panelUnderMouse, Rectangle freeAreaBounds)
        {
            Rectangle bounds = freeAreaBounds;
             if (panelUnderMouse != null)
             {
            bounds = panelUnderMouse.RectangleToScreen(panelUnderMouse.ClientRectangle);
             }

             switch (dock)
             {
            case DockStyle.Left:
               return GetInnerLeftPreviewBounds(movedPanel, bounds);

            case DockStyle.Right:
               return GetInnerRightPreviewBounds(movedPanel, bounds);

            case DockStyle.Top:
               return GetInnerTopPreviewBounds(movedPanel, bounds);

            case DockStyle.Bottom:
               return GetInnerBottomPreviewBounds(movedPanel, bounds);

            case DockStyle.Fill:
               return GetInnerFillPreviewBounds(movedPanel, bounds);

            default:
               throw new InvalidOperationException();
             }
        }
예제 #15
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="position"></param>
 /// <param name="plug"></param>
 public void AddPlugin(DockStyle position, IWindow plug)
 {
     if (position == DockStyle.Bottom)
     {
         this.AddBottomPlugin(this.panelPlugins, plug);
     }
 }
예제 #16
0
파일: BasicForm.cs 프로젝트: mind0n/hive
		public void EmbedInto(Panel target, DockStyle dock)
		{
			Resizable = false;
			FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
			TopLevel = false;
			target.Controls.Add(this);
			Dock = dock;
			Show();
		}
예제 #17
0
 public DropTargetControl(DropTargetAction dropTarget, DockStyle cursorTarget, Action<Form> onDrop)
     : this()
 {
     this.cursorTarget = cursorTarget;
     DropTarget = dropTarget;
     OnDrop = onDrop;
     pictureBox.Image = imageList.Images[(int) DropTarget];
     Visible = false;
 }
예제 #18
0
파일: EditorSkin.cs 프로젝트: Tokter/TokED
 public static ColorButton AddColorButton(this Control parent, int width, int height, DockStyle dockStyle)
 {
     var button = new ColorButton();
     button.Parent = parent;
     button.Size = new Point(width, height);
     button.Dock = dockStyle;
     button.Color = System.Drawing.Color.Red;
     return button;
 }
 private void AddControlToPanel(object view, Panel panel, DockStyle dockStyle)
 {
     var viewAsControl = view as Control;
     if (viewAsControl != null)
     {
         viewAsControl.Dock = dockStyle;
         panel.Controls.Add(viewAsControl);
     }
 }
예제 #20
0
파일: EditorSkin.cs 프로젝트: Tokter/TokED
 public static Button AddButton(this Control parent, string style,int width, int height, DockStyle dockStyle)
 {
     var button = new Button();
     button.Parent = parent;
     button.Size = new Point(width, height);
     button.Dock = dockStyle;
     button.Style = style;
     return button;
 }
 public TabControl(DockStyle dockStyle, AnchorAlignment stripAnchor)
 {
     if ((dockStyle == DockStyle.Fill) || (dockStyle == DockStyle.None))
     {
         throw new ArgumentException(DR.GetString("InvalidDockingStyle", new object[] { "dockStyle" }));
     }
     base.SuspendLayout();
     this.stripAnchor = stripAnchor;
     this.Dock = dockStyle;
     this.allowDockChange = false;
     if ((this.Dock == DockStyle.Left) || (this.Dock == DockStyle.Right))
     {
         base.Width = SystemInformation.VerticalScrollBarWidth + 2;
         this.splitter = new Splitter();
         this.tabStrip = new System.Workflow.ComponentModel.Design.TabStrip(Orientation.Vertical, SystemInformation.VerticalScrollBarWidth);
         this.scrollBar = new VScrollBar();
         if (this.stripAnchor == AnchorAlignment.Near)
         {
             this.tabStrip.Dock = DockStyle.Top;
             this.splitter.Dock = DockStyle.Top;
             this.scrollBar.Dock = DockStyle.Fill;
         }
         else
         {
             this.tabStrip.Dock = DockStyle.Bottom;
             this.splitter.Dock = DockStyle.Bottom;
             this.scrollBar.Dock = DockStyle.Fill;
         }
     }
     else
     {
         base.Height = SystemInformation.HorizontalScrollBarHeight + 2;
         this.splitter = new Splitter();
         this.tabStrip = new System.Workflow.ComponentModel.Design.TabStrip(Orientation.Horizontal, SystemInformation.HorizontalScrollBarHeight);
         this.scrollBar = new HScrollBar();
         if (this.stripAnchor == AnchorAlignment.Near)
         {
             this.tabStrip.Dock = DockStyle.Left;
             this.splitter.Dock = DockStyle.Left;
             this.scrollBar.Dock = DockStyle.Fill;
         }
         else
         {
             this.tabStrip.Dock = DockStyle.Right;
             this.splitter.Dock = DockStyle.Right;
             this.scrollBar.Dock = DockStyle.Fill;
         }
     }
     base.Controls.AddRange(new Control[] { this.scrollBar, this.splitter, this.tabStrip });
     this.splitter.Size = new Size(6, 6);
     this.splitter.Paint += new PaintEventHandler(this.OnSplitterPaint);
     this.splitter.DoubleClick += new EventHandler(this.OnSplitterDoubleClick);
     ((ItemList<System.Workflow.ComponentModel.Design.ItemInfo>) this.TabStrip.Tabs).ListChanged += new ItemListChangeEventHandler<System.Workflow.ComponentModel.Design.ItemInfo>(this.OnTabsChanged);
     this.BackColor = SystemColors.Control;
     base.ResumeLayout();
 }
        public void AddControl(TestStudioControlType type, string label, DockStyle dockStyle, string compositeId)
        {
            currentCompositeControl = GetControl(compositeId) as TestStudioCompositeControl;
            if (currentCompositeControl == null)
                return;

            AddControl(type, label, dockStyle);

            currentCompositeControl = null;
        }
예제 #23
0
 private Panel CreatePanel(DockStyle dockStyle, Color? backColor = null)
 {
     Panel panel = new Panel();
     panel.SuspendLayout();
     panel.Dock = dockStyle;
     if (backColor != null)
         panel.BackColor = (Color)backColor;
     panel.ResumeLayout(false);
     return panel;
 }
예제 #24
0
 private void DisplayChild(Form frm, DockStyle style, FormStartPosition startPos, bool canShow)
 {
     if (canShow)
     {
         frm.MdiParent = this;
         frm.Dock = style;
         frm.StartPosition = startPos;
         frm.Show();
     }
 }
 /// <summary>
 /// Draws a tab for a <see cref="YaTabControl"/>.
 /// </summary>
 /// <param name="foreColor">The foreground <see cref="Color"/> of the tab.</param>
 /// <param name="backColor">The background <see cref="Color"/> of the tab.</param>
 /// <param name="highlightColor">The highlight <see cref="Color"/> of the tab.</param>
 /// <param name="shadowColor">The shadow <see cref="Color"/> of the tab.</param>
 /// <param name="borderColor">The <see cref="Color"/> used as the border color for the <see cref="YaTabControl"/>.</param>
 /// <param name="active">Flag to instruct the drawer to draw the active tab.</param>
 /// <param name="mouseOver">Flag to indicate the cursor is over the tab getting drawn.</param>
 /// <param name="dock">The <see cref="DockStyle"/> to inform the tab drawer how to draw highlights and shadows, if applicable.</param>
 /// <param name="graphics">The <see cref="Graphics"/> on which to draw the tab.</param>
 /// <param name="tabSize">The <see cref="Size"/> of the tab.</param>
 /// <remarks>
 /// The <see cref="Graphics"/> should get translated so that the
 /// relative coordinate (0,0) is where the tab should get drawn.
 /// </remarks>
 public abstract void DrawTab(Color foreColor,
                               Color backColor,
                               Color highlightColor,
                               Color shadowColor,
                               Color borderColor,
                               bool active,
                               bool mouseOver,
                               DockStyle dock,
                               Graphics graphics,
                               SizeF tabSize);
예제 #26
0
 public void PresentReplacement(WindowBase replacee, DockStyle dock)
 {
     replacee.Hide();
     Dock = dock;
     Attach(replacee.Parent as WindowBase);
     FormClosed += (s, e) =>
     {
         replacee.Show();
     };
 }
예제 #27
0
            public DockMenuItem(ControlEventQueue dispatcher, PresenterModel model, DockStyle dock, string text)
                : base(text)
            {
                this.m_Model = model;
                this.m_DockStyle = dock;

                this.m_FilmStripAlignmentListener = new EventQueue.PropertyEventDispatcher(dispatcher,
                    new PropertyEventHandler(this.HandleFilmStripAlignmentChanged));
                this.m_Model.ViewerState.Changed["FilmStripAlignment"].Add(this.m_FilmStripAlignmentListener.Dispatcher);
                this.m_FilmStripAlignmentListener.Dispatcher(this, null);
            }
 public void Collapse()
 {
     SuspendLayout();
     _expandHeight = Height;
     _expandDockStyle = Dock;
     Dock = DockStyle.None;
     containerPanel.Visible = false;
     Height = collapseToolBar.Height;
     ResumeLayout();
     OnCollapsed();
     collapseToolBar.Collapse(true);
 }
예제 #29
0
        /// <summary>
        /// Creates a table of buttons with the specified direction and dock style
        /// </summary>
        public static TableLayoutPanel CreateButtonTable(Direction direction, DockStyle dockStyle, params Button[] buttons)
        {
            var table = CreateTable((1.0).NCopies(buttons.Length), direction, dockStyle);
            for (int i = 0; i < buttons.Length; i++)
                if (direction == Direction.Horizontal)
                    table.Controls.Add(buttons[i], i, 0);
                else
                    table.Controls.Add(buttons[i], 0, i);

            table.MaximumSize = Constants.MAX_BUTTON_TABLE_SIZE;
            return table;
        }
        /// <summary>
        /// Overridden. Creates a QTabStrip. It sets the painter and adjusts soms configuration.
        /// </summary>
        protected override QTabStrip CreateTabStrip(DockStyle dock)
        {

            QTabStrip tmp_oTabStrip = base.CreateTabStrip(dock);

            //Note: we only do the Top docked strip. But you can do the same for every TabStrip.
            if (dock == DockStyle.Top)
            {
                tmp_oTabStrip.Painter = new QTabStripPainterEx();
                tmp_oTabStrip.Configuration.ButtonConfiguration.Padding = new QPadding(3, 1, 1, 13);
            }
            return tmp_oTabStrip;
        }
 public DockPanel.IPanelIndicator CreatePanelIndicator(DockStyle style, ThemeBase theme)
 {
     return(new VS2012PanelIndicator(style, theme));
 }
 public DockPanel.IPanelIndicator CreatePanelIndicator(DockStyle style, ThemeBase theme)
 {
     return(new VS2012LightPanelIndicator(style, (VS2012DarkTheme)theme));
 }
예제 #33
0
 private void dock(DockStyle pos)
 {
     toolBar.Dock = pos;
 }
예제 #34
0
        public Element(Board Host, XmlElement node)
        {
            this.Board     = Host;
            this.node      = node;
            this.BackColor = ParseColorAttribute("BackColor", ("bgcolor"), node);

            this.ForeColor = ParseColorAttribute("ForeColor", "color", node);


            if (node.HasAttribute("margin"))
            {
                this.Margin = new Margin(node.GetAttribute("margin"));
            }
            if (node.HasAttribute("flex"))
            {
                this.Flex = int.Parse(node.GetAttribute("flex"));
            }
            if (node.HasAttribute("padding"))
            {
                this.Padding = new Padding(node.GetAttribute("padding"));
            }
            if (node.HasAttribute("uri"))
            {
                this.Hyperlink = node.GetAttribute("uri");
            }
            if (node.HasAttribute("name"))
            {
                this.Name = node.GetAttribute("name");
            }
            if (node.HasAttribute("width"))
            {
                if (node.GetAttribute("width") == "100%")
                {
                    Dock |= DockStyle.Right;
                    //Width = Parent.Width - Margin * 2 + Parent.Padding * 2;
                }
                else
                {
                    this.Width = int.Parse(node.GetAttribute("width"));
                }
            }
            else
            {
                this.Width = Parent != null ? Parent.Width : Board.Width;
            }
            if (node.HasAttribute("height"))
            {
                this.Height = int.Parse(node.GetAttribute("height"));
            }
            else
            {
                this.Height = 32;
            }
            foreach (XmlNode elm in node.ChildNodes)
            {
                if (elm.GetType() == typeof(XmlElement))
                {
                    try
                    {
                        Element _elm = (Element)Type.GetType("LerosClient." + elm.Name).GetConstructor(new Type[] { typeof(Board), typeof(XmlElement) }).Invoke(new Object[] { this.Board, elm });
                        this.Children.Add(_elm);
                        _elm.Parent = this;
                    }
                    catch (Exception e)
                    {
                    }
                }
            }
            PackChildren();
        }
예제 #35
0
파일: TabWindow.cs 프로젝트: angel2230/ZZZ
 protected virtual Region GetTestDropDragFrame(DockStyle dockStyle, int contentIndex)
 {
     return(null);
 }
예제 #36
0
        public override void Execute(string argument)/*Left:true:9000*/
        {
            if (string.IsNullOrEmpty(argument))
            {
                Execute();
                return;
            }
            string[] parts = argument.Split(':');
            if (parts.Length != 3 && parts.Length != 2)
            {
                Execute();
                return;
            }
            ISmartToolWindow wnd = _smartSession.SmartWindowManager.SmartToolWindowFactory.GetSmartToolWindow(_id);

            if (wnd == null)
            {
                return;
            }
            DockStyle pos     = DockStyle.Left;
            bool      isfloat = false;

            switch (parts[0].ToUpper())
            {
            case "LEFT":
                pos = DockStyle.Left;
                break;

            case "RIGHT":
                pos = DockStyle.Right;
                break;

            case "TOP":
                pos = DockStyle.Top;
                break;

            case "BOTTOM":
                pos = DockStyle.Bottom;
                break;

            case "FILL":
                pos = DockStyle.Fill;
                break;

            case "FLOAT":
                isfloat = true;
                break;
            }
            bool isSplited = true;

            bool.TryParse(parts[1], out isSplited);
            int parentId = 0;

            if (parts.Length == 3)
            {
                int.TryParse(parts[2], out parentId);
            }
            if (!isfloat)
            {
                _smartSession.SmartWindowManager.DisplayWindow(wnd, new WindowPosition(pos, isSplited));
            }
            else
            {
                _smartSession.SmartWindowManager.DisplayWindow(wnd);
            }
            DisplayAfter(wnd);
        }
예제 #37
0
 public Label label(Label label, DockStyle style)
 {
     label.Dock    = style;
     label.Padding = new Padding(0, 3, 0, 3);
     return(label);
 }
예제 #38
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="control">control</param>
 /// <param name="dock">dock</param>
 /// <param name="mode">dock mode</param>
 public DockControlEventArgs(Control control, DockStyle dock, zDockMode mode)
 {
     _control  = control;
     _dock     = dock;
     _dockMode = mode;
 }
예제 #39
0
 public DockPanel.IPanelIndicator CreatePanelIndicator(DockStyle style, ThemeBase theme)
 {
     return(new VS2005MultithreadingPanelIndicator(style));
 }
 public void Show(DockPane pane, DockStyle dock)
 {
     SaveOldValues();
     SetValues(Rectangle.Empty, pane, dock, -1);
     TestChange();
 }
 public void Show(DockPanel dockPanel, DockStyle dock, bool fullPanelEdge)
 {
     SaveOldValues();
     SetValues(Rectangle.Empty, dockPanel, dock, fullPanelEdge ? -1 : 0);
     TestChange();
 }
 /// <summary>
 /// Checks if <i>dock</i> is supported by this tab drawer.
 /// </summary>
 /// <param name="dock">The <see cref="DockStyle"/> to check for support.</param>
 /// <returns>
 /// Returns <b>true</b> if this tab drawer supports the indicated
 /// style. Otherwise, returns <b>false</b>.
 /// </returns>
 public abstract bool SupportsTabDockStyle(DockStyle dock);
예제 #43
0
 public DockPanel.IPanelIndicator CreatePanelIndicator(DockStyle style, ThemeBase theme)
 {
     return(new DockPanel.DefaultPanelIndicator(style));
 }
예제 #44
0
파일: Splitter.cs 프로젝트: ForNeVeR/pnet
        // Get the control that is being adjusted by this splitter.
        // Returns null if we cannot find an appropriate control.
        private Control GetAdjustedControl()
        {
            // No adjusted control if we don't have a parent.
            Control parent = Parent;

            if (parent == null)
            {
                return(null);
            }

            // Look for a control that has a side adjoining this one.
            DockStyle dock = Dock;

            foreach (Control control in parent.Controls)
            {
                if (!control.Visible)
                {
                    continue;
                }
                switch (dock)
                {
                case DockStyle.Left:
                {
                    if (control.Right == Left)
                    {
                        return(control);
                    }
                }
                break;

                case DockStyle.Right:
                {
                    if (control.Left == Right)
                    {
                        return(control);
                    }
                }
                break;

                case DockStyle.Top:
                {
                    if (control.Bottom == Top)
                    {
                        return(control);
                    }
                }
                break;

                case DockStyle.Bottom:
                {
                    if (control.Top == Bottom)
                    {
                        return(control);
                    }
                }
                break;
                }
            }

            // We could not find an appropriate control.
            return(null);
        }
예제 #45
0
        public void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex)
        {
            if (dockStyle == DockStyle.Fill)
            {
                bool samePane = (Pane == pane);
                if (!samePane)
                {
                    Pane = pane;
                }

                int visiblePanes   = 0;
                int convertedIndex = 0;
                while (visiblePanes <= contentIndex && convertedIndex < Pane.Contents.Count)
                {
                    DockContent window = Pane.Contents[convertedIndex] as DockContent;
                    if (window != null && !window.IsHidden)
                    {
                        ++visiblePanes;
                    }

                    ++convertedIndex;
                }

                contentIndex = Math.Min(Math.Max(0, convertedIndex - 1), Pane.Contents.Count - 1);

                if (contentIndex == -1 || !samePane)
                {
                    pane.SetContentIndex(Content, contentIndex);
                }
                else
                {
                    DockContentCollection contents = pane.Contents;
                    int oldIndex = contents.IndexOf(Content);
                    int newIndex = contentIndex;
                    if (oldIndex < newIndex)
                    {
                        newIndex += 1;
                        if (newIndex > contents.Count - 1)
                        {
                            newIndex = -1;
                        }
                    }
                    pane.SetContentIndex(Content, newIndex);
                }
            }
            else
            {
                DockPane paneFrom = DockPanel.Theme.Extender.DockPaneFactory.CreateDockPane(Content, pane.DockState, true);
                INestedPanesContainer container = pane.NestedPanesContainer;
                if (dockStyle == DockStyle.Left)
                {
                    paneFrom.DockTo(container, pane, DockAlignment.Left, 0.5);
                }
                else if (dockStyle == DockStyle.Right)
                {
                    paneFrom.DockTo(container, pane, DockAlignment.Right, 0.5);
                }
                else if (dockStyle == DockStyle.Top)
                {
                    paneFrom.DockTo(container, pane, DockAlignment.Top, 0.5);
                }
                else if (dockStyle == DockStyle.Bottom)
                {
                    paneFrom.DockTo(container, pane, DockAlignment.Bottom, 0.5);
                }

                paneFrom.DockState = pane.DockState;
            }
        }
 public HotSpotIndex(int x, int y, DockStyle dockStyle)
 {
     m_x         = x;
     m_y         = y;
     m_dockStyle = dockStyle;
 }
예제 #47
0
 public void DockTo(DockPanel panel, DockStyle dockStyle)
 {
     DockHandler.DockTo(panel, dockStyle);
 }
예제 #48
0
 /// <summary>
 /// Inherited from <see cref="YaTabDrawer"/>.
 /// </summary>
 /// <param name="foreColor">See <see cref="YaTabDrawer.DrawTab(Color,Color,Color,Color,Color,bool,DockStyle,Graphics,SizeF)"/>.</param>
 /// <param name="backColor">See <see cref="YaTabDrawer.DrawTab(Color,Color,Color,Color,Color,bool,DockStyle,Graphics,SizeF)"/>.</param>
 /// <param name="highlightColor">See <see cref="YaTabDrawer.DrawTab(Color,Color,Color,Color,Color,bool,DockStyle,Graphics,SizeF)"/>.</param>
 /// <param name="shadowColor">See <see cref="YaTabDrawer.DrawTab(Color,Color,Color,Color,Color,bool,DockStyle,Graphics,SizeF)"/>.</param>
 /// <param name="borderColor">See <see cref="YaTabDrawer.DrawTab(Color,Color,Color,Color,Color,bool,DockStyle,Graphics,SizeF)"/>.</param>
 /// <param name="active">See <see cref="YaTabDrawer.DrawTab(Color,Color,Color,Color,Color,bool,DockStyle,Graphics,SizeF)"/>.</param>
 /// <param name="mouseOver">See <see cref="YaTabDrawer.DrawTab(Color,Color,Color,Color,Color,bool,DockStyle,Graphics,SizeF)"/>.</param>
 /// <param name="dock">See <see cref="YaTabDrawer.DrawTab(Color,Color,Color,Color,Color,bool,DockStyle,Graphics,SizeF)"/>.</param>
 /// <param name="graphics">See <see cref="YaTabDrawer.DrawTab(Color,Color,Color,Color,Color,bool,DockStyle,Graphics,SizeF)"/>.</param>
 /// <param name="tabSize">See <see cref="YaTabDrawer.DrawTab(Color,Color,Color,Color,Color,bool,DockStyle,Graphics,SizeF)"/>.</param>
 public override void DrawTab(Color foreColor, Color backColor, Color highlightColor, Color shadowColor, Color borderColor, bool active, bool mouseOver, DockStyle dock, Graphics graphics, SizeF tabSize)
 {
     if (active)
     {
         Brush b = null;
         b = new SolidBrush(foreColor);
         graphics.FillEllipse(b, 0, 0, tabSize.Width, tabSize.Height);
         b.Dispose();
         Pen p = new Pen(borderColor);
         graphics.DrawEllipse(p, 0, 0, tabSize.Width, tabSize.Height);
         p.Dispose();
     }
 }
예제 #49
0
 public void setDock(DockStyle dock)
 {
     this.dock = dock;
 }
예제 #50
0
 public FrameLost Present(FormLostBase parent, DockStyle dock)
 {
     Dock = dock;
     Attach(parent);
     return(this);
 }
예제 #51
0
 /// <summary>
 /// Returns the <see cref="DockStyle"/>s
 /// </summary>
 public override bool SupportsTabDockStyle(DockStyle dock)
 {
     return(dock != DockStyle.Fill && dock != DockStyle.None);
 }
 public DefaultPanelIndicator(DockStyle dockStyle)
 {
     m_dockStyle = dockStyle;
     SizeMode    = PictureBoxSizeMode.AutoSize;
     Image       = ImageInactive;
 }
예제 #53
0
 public void SetDropTarget(DockPanel dockPanel, DockStyle dock)
 {
     m_dropTo       = dockPanel;
     m_dock         = dock;
     m_contentIndex = -1;
 }
예제 #54
0
 public void DockTo(DockPane paneTo, DockStyle dockStyle, int contentIndex)
 {
     DockHandler.DockTo(paneTo, dockStyle, contentIndex);
 }
예제 #55
0
 public void SetDropTarget(DockPane pane, int contentIndex)
 {
     m_dropTo       = pane;
     m_dock         = DockStyle.Fill;
     m_contentIndex = contentIndex;
 }
예제 #56
0
 public void OpenForm(Control ParentC, Form childForm, FormBorderStyle fStyle, DockStyle dockStyle)
 {
     childForm.TopLevel        = false;
     childForm.Location        = new Point(0, 0);
     childForm.FormBorderStyle = fStyle;
     childForm.Dock            = dockStyle;
     ParentC.Controls.Add(childForm);
     ParentC.Tag = childForm;
     childForm.BringToFront();
     childForm.Show();
 }