亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tabgroupsequence.cs

?? Magic Library 1.7,有說明文檔
?? CS
?? 第 1 頁 / 共 4 頁
字號:
                if (_direction == Direction.Vertical)
                {
                    space = clientRect.Height;
                    delta = clientRect.Top;
                }
                else
                {
                    space = clientRect.Width;
                    delta = clientRect.Left;
                }

                // Ensure this is not negative
                if (space < 0)
                    space = 0;

                int barSpace = 0;
                int allocation = space;

                // Create temporary array of working values
                int[] positions = new int[_control.Controls.Count];

                // Pass 1, allocate all the space needed for each ResizeBar and the 
                //         minimal amount of space that each group requests. 
                AllocateMandatorySizes(ref positions, ref barSpace, ref space);

                // Is there any more space left?
                if (space > 0)
                {
                    // Pass 2, allocate any space left over according to the requested
                    //         percent space that each group would like to achieve.
                    AllocateRemainingSpace(ref positions, space);
                }

                // Pass 3, reposition the controls according to allocated values.
                RepositionChildren(ref positions, clientRect, delta);
            }
        }

        protected void AllocateMandatorySizes(ref int[] positions, ref int barSpace, ref int space)
        {
            // Process each control
            for(int index=0, child=0; index<_control.Controls.Count; index++)
            {
                ResizeBar bar = _control.Controls[index] as ResizeBar;

                // Is this a resize bar control?
                if (bar != null)
                {
                    // Length needed is dependant on direction 
                    positions[index] = bar.Length;

                    // Add up how much space was allocated to ResizeBars
                    barSpace += positions[index];
                }
                else
                {
                    Size minimal = _children[child++].MinimumSize;

                    // Length needed is depends on direction 
                    if (_direction == Direction.Vertical)
                        positions[index] = minimal.Height;
                    else
                        positions[index] = minimal.Width;
                }

                // Reduce available space by that just allocated
                space -= positions[index];
            }			
        }

        protected void AllocateRemainingSpace(ref int[] positions, int windowSpace)
        {
            // Space allocated so far
            int allocated = 0;

            // Process each control
            for(int index=0, childIndex=0; index<_control.Controls.Count; index++)
            {
                Control c = _control.Controls[index];
                
                bool isResizeBar = (c is ResizeBar);

                // We do not allocate any more space for resize bars
                if (!isResizeBar)
                {
                    int extra;
					
                    // How much of remaining space does the group request to have?
                    extra = (int)(windowSpace / 100m * _children[childIndex++].Space);

                    // Is this the last group to be positioned?
                    if (childIndex == _children.Count)
                    {
                        // Use up all the remaining space, this handles the case of the above 
                        // vector calculation giving rounding errors so that the last element 
                        // needs adusting to fill exactly all the available space
                        extra = windowSpace - allocated;
                    }

                    // Add the extra space to any existing space it has
                    positions[index] += extra;

                    // Keep count of all allocated so far
                    allocated += extra;
                }
            }
        }

        protected void RepositionChildren(ref int[] positions, Rectangle clientRect, int delta)
        {
            // Process each control 
            for(int index=0; index<_control.Controls.Count; index++)
            {
                // Delta length for this particular control
                int newDelta = positions[index];

                ResizeBar bar = _control.Controls[index] as ResizeBar;

                if (bar != null)
                {
                    if (_direction == Direction.Vertical)
                    {
                        // Set new position
                        bar.Location = new Point(clientRect.X, delta);
                        bar.Width = clientRect.Width;
                        bar.Height = newDelta;

                        // Move delta down to next position
                        delta += newDelta;
                    }
                    else
                    {
                        // Set new position
                        bar.Location = new Point(delta, clientRect.Y);
                        bar.Height = clientRect.Height;
                        bar.Width = newDelta;

                        // Move delta across to next position
                        delta += newDelta;
                    }
                }
                else
                {
                    Control c = _control.Controls[index];

                    if (c != null)
                    {
                        if (newDelta == 0)
                            c.Hide();
                        else
                        {
                            // Set new position/size based on direction
                            if (_direction == Direction.Vertical)
                            {
                                c.Location = new Point(clientRect.X, delta);
                                c.Width = clientRect.Width;
                                c.Height = newDelta;
                            }
                            else
                            {
                                c.Location = new Point(delta, clientRect.Y);
                                c.Height = clientRect.Height;
                                c.Width = newDelta;
                            }

                            if (!c.Visible)
                                c.Show();

                            // Move delta to next position
                            delta += newDelta;
                        }
                    }
                }
            }			
        }
        
        protected void OnControlResize(object sender, EventArgs e)
        {
            // Change the layout of the children to match new size
            RepositionChildren();
        }
        
        public bool CanResize(ResizeBar bar)
        {
            // Cannot resize when in prominent mode
            if (!_tabbedGroups.ResizeBarLock && (_tabbedGroups.ProminentLeaf == null))
            {
                // Find position of this ResizeBar in the Controls collection
                int barIndex = _control.Controls.IndexOf(bar);
                
                // Convert from control to children indexing
                int beforeIndex = (barIndex - 1) / 2;

                TabGroupBase before = _children[beforeIndex];
                TabGroupBase after = _children[beforeIndex + 1];

                // If groups on both sides have no space then cannot resize there relative positions
                if (((before.Space <= 0m) && (after.Space <= 0m)))
                    return false;
                else
                    return true;
            }
            else
            {
                // Must exit prominent mode before resize can occur
                return false;
            }
        }

        public bool StartResizeOperation(ResizeBar bar, ref Rectangle screenBoundary)
        {
            // Find position of this ResizeBar in the Controls collection
            int barIndex = _control.Controls.IndexOf(bar);
            
            // Convert from control to children indexing
            int beforeIndex = (barIndex - 1) / 2;

            // Get groups before and after the resize bar
            TabGroupBase before = _children[beforeIndex];
            TabGroupBase after = _children[beforeIndex + 1];

            // Resizing boundary is defaulted to whole control area
            screenBoundary = _control.RectangleToScreen(_control.ClientRectangle);

            // Find screen rectangle for the groups either side of the bar
            Rectangle rectBefore = before.GroupControl.RectangleToScreen(before.GroupControl.ClientRectangle);
            Rectangle rectAfter = after.GroupControl.RectangleToScreen(after.GroupControl.ClientRectangle);

            // Reduce the boundary in the appropriate direction
            if (_direction == Direction.Vertical)
            {
                screenBoundary.Y = rectBefore.Y + before.MinimumSize.Height;
                screenBoundary.Height -= screenBoundary.Bottom - rectAfter.Bottom;
                screenBoundary.Height -= after.MinimumSize.Height;
            }
            else
            {
                screenBoundary.X = rectBefore.X + before.MinimumSize.Width;
                screenBoundary.Width -= screenBoundary.Right - rectAfter.Right;
                screenBoundary.Width -= after.MinimumSize.Width;
            }

            // Allow resize operation to occur
            return true;
        }
        
        public void EndResizeOperation(ResizeBar bar, int delta)
        {
            // Find position of this ResizeBar in the Controls collection
            int barIndex = _control.Controls.IndexOf(bar);
            
            // Convert from control to children indexing
            int beforeIndex = (barIndex - 1) / 2;

            // The Window relating to this bar must be the one before it in the collection
            TabGroupBase before = _children[beforeIndex];

            // Is the Window being expanded
            DeltaGroupSpace(before, delta);
        }

        protected void DeltaGroupSpace(TabGroupBase group, int vector)
        {
            Rectangle clientRect = _control.ClientRectangle;

            // Space available for allocation
            int space;

            // New pixel length of the modified group
            int newLength = vector;
			
            if (_direction == Direction.Vertical)
            {
                space = clientRect.Height;

                // New pixel size is requested change plus original 
                // height minus the minimal size that is always added
                newLength += group.GroupControl.Height;
                newLength -= group.MinimumSize.Height;
            }
            else
            {
                space = clientRect.Width;

                // New pixel size is requested change plus original 
                // width minus the minimal size that is always added
                newLength += group.GroupControl.Width;
                newLength -= group.MinimumSize.Width;
            }

            int barSpace = 0;

            // Create temporary array of working values
            int[] positions = new int[_control.Controls.Count];

            // Pass 1, allocate all the space needed for each ResizeBar and the 
            //         minimal amount of space that each Window requests. 
            AllocateMandatorySizes(ref positions, ref barSpace, ref space);

            // What is the new percentage it needs?
            Decimal newPercent = 0m;

            // Is there any room to allow a percentage calculation
            if ((newLength > 0) && (space > 0))
                newPercent = (Decimal)newLength / (Decimal)space * 100m;

            // What is the change in area
            Decimal reallocate = newPercent - group.Space;

            // Find the group after this one
            TabGroupBase nextGroup = _children[_children.IndexOf(group) + 1];

            if ((nextGroup.Space - reallocate) < 0m)
                reallocate = nextGroup.Space;
	
            // Modify the Window in question
            group.Space += reallocate;

            // Reverse modify the Window afterwards
            nextGroup.Space -= reallocate;
			
            // Update the visual appearance
            RepositionChildren();
        }
        
        internal Control.ControlCollection ChildControls
        {
            get { return _control.Controls; }
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美自拍偷拍色图| 精品一区二区三区在线播放| 亚洲电影在线播放| 国产超碰在线一区| 日韩午夜在线播放| 一区二区三区中文免费| 国产成人免费av在线| 欧美疯狂做受xxxx富婆| 亚洲视频免费看| 国产精品亚洲午夜一区二区三区 | 亚洲国产精品久久久久婷婷884| 蜜桃传媒麻豆第一区在线观看| 91在线视频播放地址| 久久久久99精品国产片| 天天综合天天做天天综合| 91伊人久久大香线蕉| 日本一二三不卡| 国产福利91精品一区| 日韩午夜在线观看视频| 日本亚洲免费观看| 欧美区在线观看| 视频一区视频二区中文字幕| 91精品91久久久中77777| 国产精品不卡在线观看| 国产老肥熟一区二区三区| 精品国产乱码久久| 精品夜夜嗨av一区二区三区| 欧美一区二区三区播放老司机| 亚洲永久精品国产| 欧美综合久久久| 一区二区三区四区高清精品免费观看 | 精品国产一区二区亚洲人成毛片| 亚洲成人激情自拍| 欧美老年两性高潮| 日韩黄色片在线观看| 欧美日韩国产三级| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美日韩不卡一区| 麻豆精品视频在线观看| www久久久久| 成人三级伦理片| 亚洲三级电影网站| 在线免费精品视频| 奇米一区二区三区| 国产亚洲一区字幕| 91免费在线播放| 日韩制服丝袜av| 久久久一区二区| 91在线免费播放| 亚洲bt欧美bt精品777| 日韩一区二区三区观看| 国产精品1区二区.| 一区二区三区蜜桃| 91精品午夜视频| 国产精一品亚洲二区在线视频| 中文字幕日韩一区二区| 欧美精品日韩综合在线| 色诱视频网站一区| 91麻豆视频网站| 偷拍亚洲欧洲综合| 欧美精品一区二区三区在线播放 | 欧美天堂一区二区三区| 视频一区免费在线观看| 久久夜色精品国产噜噜av| 成人18视频在线播放| 亚洲va中文字幕| 欧美国产精品劲爆| 欧美丝袜第三区| 国产成人av电影在线观看| 一区二区三区四区五区视频在线观看| 91精品国产色综合久久ai换脸| 国产福利一区在线观看| 午夜欧美大尺度福利影院在线看| 久久先锋影音av| 欧美精品久久99久久在免费线| 懂色av中文字幕一区二区三区 | 欧美午夜影院一区| 国产麻豆精品在线| 亚洲线精品一区二区三区八戒| 久久久久久久久蜜桃| 欧美三日本三级三级在线播放| 国产精品一二一区| 蜜臀精品久久久久久蜜臀| 中文字幕中文字幕一区| 日韩欧美一区中文| 欧美亚洲综合在线| 91视视频在线观看入口直接观看www | 中文字幕日韩欧美一区二区三区| 欧美日韩国产精品成人| 91视频.com| 懂色中文一区二区在线播放| 男人操女人的视频在线观看欧美| 一区二区三区在线影院| 国产精品蜜臀在线观看| 久久久久久亚洲综合| 7777女厕盗摄久久久| 在线精品视频一区二区三四| 国产99精品国产| 黑人巨大精品欧美黑白配亚洲 | 成人免费小视频| 久久久国际精品| 精品免费99久久| 日韩女优av电影在线观看| 欧美日韩精品欧美日韩精品一综合| 成人的网站免费观看| 国产99久久久久| 成人性生交大片免费| 国产a久久麻豆| 成人一区二区三区在线观看| 国产一区二区在线观看视频| 久久精品国产成人一区二区三区 | 成人99免费视频| 成人午夜免费电影| 高清不卡一二三区| 成人午夜在线播放| 91亚洲精品久久久蜜桃| 成年人网站91| 91精品福利视频| 欧美三级欧美一级| 777奇米四色成人影色区| 在线不卡的av| 精品成人佐山爱一区二区| 日韩精品在线网站| 久久综合成人精品亚洲另类欧美 | 精品国精品国产尤物美女| 精品少妇一区二区| 久久人人爽爽爽人久久久| 国产亚洲午夜高清国产拍精品 | 日本国产一区二区| 欧美视频一区二区三区四区| 欧美肥胖老妇做爰| 久久亚洲捆绑美女| 亚洲免费在线观看| 五月天国产精品| 久久成人免费网| 成人av免费观看| 欧美日韩一区 二区 三区 久久精品| 欧美日韩夫妻久久| 久久蜜桃一区二区| 亚洲三级免费电影| 美女高潮久久久| 不卡免费追剧大全电视剧网站| 欧美最猛性xxxxx直播| 91精品国产综合久久久久久久| 久久综合丝袜日本网| 中文字幕日韩欧美一区二区三区| 亚洲成人在线网站| 国产一区二区不卡| 91国偷自产一区二区使用方法| 日韩一区二区三区电影在线观看| 中文字幕va一区二区三区| 亚洲午夜激情网站| 国产91高潮流白浆在线麻豆| 欧美系列一区二区| 国产日韩欧美制服另类| 午夜免费久久看| 99久久婷婷国产综合精品| 777午夜精品免费视频| 国产精品毛片大码女人| 三级影片在线观看欧美日韩一区二区| 国产美女在线精品| 91精品蜜臀在线一区尤物| 中文字幕佐山爱一区二区免费| 三级久久三级久久| 一本一道久久a久久精品| 精品日产卡一卡二卡麻豆| 亚洲欧美激情在线| 国产精品一区免费在线观看| 91福利国产精品| 国产精品日韩精品欧美在线| 久久精品国产色蜜蜜麻豆| 欧美日韩在线精品一区二区三区激情 | 国产一区二区三区在线观看精品| 91蝌蚪porny| 国产欧美视频一区二区| 日本欧美久久久久免费播放网| 日本久久电影网| 中文字幕精品三区| 国精产品一区一区三区mba桃花 | 日韩一区二区麻豆国产| 亚洲美女淫视频| 成人黄色片在线观看| 久久久久一区二区三区四区| 日本成人在线看| 欧美日本国产视频| 亚洲成av人片观看| 91片在线免费观看| 中文字幕日韩av资源站| 成人午夜激情视频| 国产日韩欧美在线一区| 精品中文字幕一区二区小辣椒| 欧美乱熟臀69xxxxxx| 亚洲成在人线免费| 在线电影一区二区三区| 婷婷亚洲久悠悠色悠在线播放| 91福利在线看| 午夜精品一区二区三区三上悠亚| 一本色道久久加勒比精品| 日韩毛片精品高清免费| 91在线播放网址|