コード例 #1
0
        /// <summary> </summary>
        /// <param name="control">
        /// </param>
        /// <param name="width">
        /// </param>
        /// <param name="height">
        /// </param>
        internal void setOrgSizeBy(Control control, int width, int height)
        {
            MgSplitContainerData data = ((TagData)control.Tag).MgSplitContainerData;

            if (data != null)
            {
                data.orgWidth  = width;
                data.orgHeight = height;
            }
        }
コード例 #2
0
        /// <summary> </summary>
        /// <param name="control"> </param>
        /// <returns> </returns>
        private bool alloweVerPlacement(Control control)
        {
            bool allow = false;

            MgSplitContainerData data = ((TagData)control.Tag).MgSplitContainerData;

            if (data != null)
            {
                allow = data.allowVerPlacement;
            }
            return(allow);
        }
コード例 #3
0
        /// <summary> </summary>
        /// <param name="control"> </param>
        /// <returns> </returns>
        private static Point getOrgSize(Control control)
        {
            Point orgSize = System.Drawing.Point.Empty;

            MgSplitContainerData data = ((TagData)control.Tag).MgSplitContainerData;

            if (data != null)
            {
                orgSize = new Point(data.orgWidth, data.orgHeight);
            }

            return(orgSize);
        }
コード例 #4
0
        /// <summary> update the or size according to the send parameters and orientation
        ///
        /// </summary>
        /// <param name="controlBefore">
        /// </param>
        /// <param name="newBeforeControlBounds">
        /// </param>
        /// <param name="controlAfter">
        /// </param>
        /// <param name="newAfterControlBounds">
        /// </param>
        private void setOrgSize(MgSplitContainer mgSplitContainer, Control controlBefore, Rectangle newBeforeControlBounds, Control controlAfter, Rectangle newAfterControlBounds)
        {
            // get the layout, is not exist then create the layout for the before\after control
            MgSplitContainerData layoutDataBeforeControl = GuiUtils.getMgSplitContainerData(controlBefore);
            MgSplitContainerData layoutDataAfterControl  = GuiUtils.getMgSplitContainerData(controlAfter);

            if (mgSplitContainer.getOrientation() == MgSplitContainer.SPLITTER_STYLE_HORIZONTAL)
            {
                layoutDataBeforeControl.orgWidth = newBeforeControlBounds.Width;
                layoutDataAfterControl.orgWidth  = newAfterControlBounds.Width;
            }
            else
            {
                layoutDataBeforeControl.orgHeight = newBeforeControlBounds.Height;
                layoutDataAfterControl.orgHeight  = newAfterControlBounds.Height;
            }
        }