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

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

?? tabgroupsequence.cs

?? Magic Library 1.7,有說明文檔
?? CS
?? 第 1 頁 / 共 4 頁
字號:
// *****************************************************************************
// 
//  (c) Crownwood Consulting Limited 2002 
//  All rights reserved. The software and associated documentation 
//  supplied hereunder are the proprietary information of Crownwood Consulting 
//	Limited, Haxey, North Lincolnshire, England and are supplied subject to 
//	licence terms.
// 
//  Magic Version 1.7 	www.dotnetmagic.com
// *****************************************************************************

using System;
using System.IO;
using System.Xml;
using System.Drawing;
using System.Windows.Forms;
using Crownwood.Magic.Common;
using Crownwood.Magic.Controls;
using Crownwood.Magic.Collections;

namespace Crownwood.Magic.Controls
{
	public class TabGroupSequence : TabGroupBase, IResizeSource
	{
	    // Class fields
	    protected const int SPACE_PRECISION = 3;
	
        // Instance fields
        protected Control _control;
        protected Direction _direction;
        protected TabGroupBaseCollection _children;
        
        public TabGroupSequence(TabbedGroups tabbedGroups)
            : base(tabbedGroups)
        {
            // Root instance always defaults to being horizontal
            InternalConstruct(tabbedGroups, Direction.Horizontal);
        }
    
        public TabGroupSequence(TabbedGroups tabbedGroups, TabGroupBase parent)
            : base(tabbedGroups, parent)
        {
		    InternalConstruct(null, Direction.Horizontal);
        }

        public TabGroupSequence(TabbedGroups tabbedGroups, TabGroupBase parent, Direction direction)
            : base(tabbedGroups, parent)
        {
            InternalConstruct(null, direction);
        }

        protected void InternalConstruct(Control control, Direction direction)
        {
            // Do we need to create our own window?
            if (control == null) 
            {
                // Yes, use a simple panel for organizing children onto
                _control = new Panel();
            }
            else
            {
                // No, use the constructor provided one
                _control = control;
            }
            
            // Hook into control events
            _control.Resize += new EventHandler(OnControlResize);
            
            // Assign initial values
            _direction = direction;
            
            // Create collection to remember our child objects
            _children = new TabGroupBaseCollection();
        }
        
        public override int Count               
        { 
            get { return _children.Count; } 
        }
            
        public override bool IsLeaf             
        { 
            get { return false; } 
        }
        
        public override bool IsSequence         
        { 
            get { return true; } 
        }
        
        public override Control GroupControl    
        { 
            get { return _control; } 
        }
        
        public Direction Direction
        {
            get { return _direction; }
            
            set
            {
                if (_direction != value)
                {
                    _direction = value;
                    RepositionChildren();
                }
            }
        }
        
        public VisualStyle Style        { get { return _tabbedGroups.Style;             } }        
        public int ResizeBarVector      { get { return _tabbedGroups.ResizeBarVector;   } }
        public Color ResizeBarColor     { get { return _tabbedGroups.ResizeBarColor;    } }        
        public Color BackgroundColor    { get { return _tabbedGroups.BackColor;         } }

        public TabGroupLeaf AddNewLeaf()
        {
            // Create a new leaf instance with correct back references
            TabGroupLeaf tgl = new TabGroupLeaf(_tabbedGroups, this);
            
            // Add into the collection
            Add(tgl);
            
            // Return its position in collection
            return tgl;
        }

        public TabGroupLeaf InsertNewLeaf(int index)
        {
            // Range check index
            if (index < 0)
                throw new ArgumentOutOfRangeException("index", index, "Insert index must be at least 0");
                
            if (index >= _children.Count)
                throw new ArgumentOutOfRangeException("index", index, "Cannot insert after end of current entries");

            // Create a new leaf instance with correct back references
            TabGroupLeaf tgl = new TabGroupLeaf(_tabbedGroups, this);
            
            // Insert into correct collection position
            Insert(index, tgl);
            
            // Return its position in collection
            return tgl;                           
        }
            
        public void Remove(TabGroupBase group)
        {
            // Convert from reference to index to use existing RemoveAt implementation
            RemoveAt(_children.IndexOf(group));
        }

        public void RemoveAt(int index)
        {
            // Range check index
            if (index < 0)
                throw new ArgumentOutOfRangeException("index", index, "RemoveAt index must be at least 0");
                
            if (index >= _children.Count)
                throw new ArgumentOutOfRangeException("index", index, "Cannot remove entry after end of list");

            // Is the removed item the active leaf?
            if (_children[index] == _tabbedGroups.ActiveLeaf)
            {
                // Then request movement of the active leaf
                _tabbedGroups.MoveActiveToNearestFromLeaf(_children[index]);
            }

            // Inform control that a group is removed, so it can track number of leafs 
            _tabbedGroups.GroupRemoved(_children[index]);

            // Is this the only Window entry?
            if (_children.Count == 1)
            {
                // Remove Window from appearance

                // Use helper method to circumvent form Close bug
                ControlHelper.RemoveAt(_control.Controls, 0);
            }
            else
            {
                int pos = 0;

                // Calculate position of Window to remove				
                if (index != 0)
                    pos = index * 2 - 1;

                // Remove Window and bar 

                // Use helper method to circumvent form Close bug
                ControlHelper.RemoveAt(_control.Controls, pos);
                ControlHelper.RemoveAt(_control.Controls, pos);
            }

            // How much space is removed entry taking up?
            Decimal space = _children[index].Space;

            // Remove child from collection
            _children.RemoveAt(index);

            // Redistribute space to other groups
            RemoveWindowSpace(space);

            // Update child layout to reflect new proportional spacing values
            RepositionChildren();

            // Last page removed?            
            if (_children.Count == 0)
            {
                // All pages removed, do we need to compact?
                if (_tabbedGroups.AutoCompact)
                    _tabbedGroups.Compact();
            }
            
            // Give control chance to enfore leaf policy
            _tabbedGroups.EnforceAtLeastOneLeaf();
            
            // Mark layout as dirty
            if (_tabbedGroups.AutoCalculateDirty)
                _tabbedGroups.Dirty = true;
        }
        
        public int IndexOf(TabGroupBase group)
        {
            return _children.IndexOf(group);
        }
        
        public void Clear()
        {
            // Do we contain the active leaf?
            if (_children.IndexOf(_tabbedGroups.ActiveLeaf) != 0)
            {
                // Then request movement of the active leaf to different group
                _tabbedGroups.MoveActiveToNearestFromSequence(this);
            }
        
            // Remove all child controls
            ControlHelper.RemoveAll(_control);
            
            // Remove all child group references
            _children.Clear();

            _control.Invalidate();

            // All pages removed, do we need to compact?
            if (_tabbedGroups.AutoCompact)
                _tabbedGroups.Compact();

            // Mark layout as dirty
            if (_tabbedGroups.AutoCalculateDirty)
                _tabbedGroups.Dirty = true;
        }
        
        public TabGroupBase this[int index]
        {
            get { return _children[index]; }
        }

        public override void Notify(NotifyCode code)
        {
            // Handle codes of interest
            switch(code)
            {
                case NotifyCode.ProminentChanged:
                case NotifyCode.MinimumSizeChanged:
                    // Must reposition to take account of change
                    RepositionChildren();
                    break;
                case NotifyCode.StyleChanged:
                    // Inform each resize bar of change in style
                    foreach(Control c in _control.Controls)
                        if (c is ResizeBar)
                            (c as ResizeBar).Style = _tabbedGroups.Style;
                
                    // Reposition the children based on new resize bar size
                    RepositionChildren();
                    break;
                case NotifyCode.ResizeBarVectorChanged:
                    // Recalculate layout of childreen
                    RepositionChildren();
                    break;
                case NotifyCode.ResizeBarColorChanged:
                    // If we are showing at least one resize bar
                    if (_children.Count > 1)
                    {
                        // Then must repaint in new color
                        _control.Invalidate();
                    }
                    break;
            }
            
            // Pass notification to children
            foreach(TabGroupBase child in _children)
                child.Notify(code);
        }
    
        public void Rebalance(bool recurse)
        {
            if (_children.Count > 0)
            {
                // Calculate how much space to give each child
                Decimal newSpace = Decimal.Round(100m / _children.Count, SPACE_PRECISION);

                // Assign equal space to all entries        
                foreach(TabGroupBase group in _children)
                    group.Space = newSpace;

                Decimal totalSpace = 100m - (newSpace * _children.Count);
                 
                // Allocate rounding errors to last child
                if (totalSpace != 0)
                    _children[_children.Count - 1].Space += 100m - totalSpace;
                        
                // Propogate effect into child sequences?
                if (recurse)
                {
                    foreach(TabGroupBase group in _children)
                        if (group.IsSequence)
                            (group as TabGroupSequence).Rebalance(recurse);
                }
            }
            
            // Update child layout to reflect new proportional spacing values
            RepositionChildren();
        }

        public override bool ContainsProminent(bool recurse)
        {
            // Cache the currently selected prominent group
            TabGroupLeaf prominent = _tabbedGroups.ProminentLeaf;
            
            // If not defined then we cannot contain it!
            if (prominent == null)
                return false;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
洋洋成人永久网站入口| 久久国内精品视频| 亚洲国产日产av| 免费成人结看片| 国产成人自拍网| 色噜噜久久综合| 精品久久久三级丝袜| 国产精品每日更新| 午夜激情综合网| 国产高清久久久久| 7777精品伊人久久久大香线蕉最新版| www一区二区| 亚洲综合在线视频| 国内精品伊人久久久久av一坑| 99综合电影在线视频| 91视频观看视频| 日韩女同互慰一区二区| 亚洲欧洲成人精品av97| 麻豆国产精品视频| 欧美三区在线视频| 国产精品国产三级国产aⅴ原创| 亚洲精品中文在线影院| 欧美aⅴ一区二区三区视频| 91免费看片在线观看| 久久亚洲欧美国产精品乐播 | 欧美美女直播网站| 国产精品免费av| 国产呦精品一区二区三区网站| 在线日韩一区二区| 中文字幕一区三区| 国产精品综合一区二区| www.av亚洲| 久久久久久久久久久久久久久99| 午夜视频在线观看一区二区| av在线综合网| 国产亚洲午夜高清国产拍精品 | 樱桃国产成人精品视频| 波多野结衣中文字幕一区 | 亚洲黄色性网站| 99久久精品国产一区| 久久久三级国产网站| 精品一区二区免费在线观看| 欧美精品日韩综合在线| 午夜不卡av免费| 色哟哟日韩精品| 亚洲三级在线观看| 色哟哟精品一区| 亚洲免费观看视频| 色综合久久久久| 国产日韩在线不卡| 成人午夜视频网站| 国产女人18水真多18精品一级做| 国内精品在线播放| 精品日韩欧美在线| 国产一区二区三区香蕉| 日韩精品一区二区在线| 国产一区二区三区美女| 欧美体内she精视频| 天天色综合成人网| 日韩女优制服丝袜电影| 国产精品一区二区不卡| 中文字幕日韩精品一区| 成人激情免费视频| 亚洲男人的天堂在线观看| yourporn久久国产精品| 亚洲激情五月婷婷| 99这里都是精品| 亚洲精品中文在线影院| 欧美日韩午夜在线视频| 国内外精品视频| 国产精品美女久久久久高潮 | 蜜臀91精品一区二区三区| 2021国产精品久久精品| 另类中文字幕网| 中文字幕+乱码+中文字幕一区| av中文字幕一区| 婷婷开心激情综合| 91精品在线观看入口| 国产一区二区成人久久免费影院| 中文字幕在线不卡一区二区三区| 欧美性色黄大片| 午夜免费久久看| 国产女人aaa级久久久级| 欧美午夜电影在线播放| 国产在线播精品第三| 亚洲欧美成aⅴ人在线观看| 在线免费观看成人短视频| 蜜桃视频免费观看一区| 精品久久免费看| 91官网在线观看| 国产在线观看一区二区| 中文字幕在线免费不卡| 日韩三级精品电影久久久| 成人国产精品免费观看视频| 亚洲少妇最新在线视频| 欧美不卡123| 在线看国产日韩| 成人免费视频caoporn| 亚洲电影一区二区| 国产精品午夜春色av| 日韩精品中文字幕一区| 成人av免费在线观看| 黄色成人免费在线| 麻豆精品在线看| 日本亚洲一区二区| 亚洲一区影音先锋| 亚洲综合免费观看高清完整版在线 | 亚洲成在人线免费| 亚洲人成精品久久久久| 国产精品久久久久久妇女6080 | 国产一区二区不卡在线 | 一本色道久久综合亚洲91 | 亚洲欧美成aⅴ人在线观看| 国产精品伦理一区二区| 欧美激情综合五月色丁香小说| 26uuu另类欧美| 亚洲精品在线免费播放| xvideos.蜜桃一区二区| 久久久午夜精品| 中文字幕av一区二区三区| 国产精品久久久久久久久搜平片 | 欧美色成人综合| 欧美久久免费观看| 欧美一区二区三区不卡| 日韩一区二区三| 久久网这里都是精品| 国产亚洲制服色| 日韩理论片中文av| 亚洲一区二区三区影院| 亚州成人在线电影| 久久福利视频一区二区| 国产精品18久久久久久久久久久久| 激情欧美日韩一区二区| 丰满亚洲少妇av| 色综合天天综合网国产成人综合天 | 不卡大黄网站免费看| 91视频免费观看| 欧美精品久久99久久在免费线| 日韩欧美综合一区| 国产视频一区在线观看| 亚洲色图欧洲色图| 青青青爽久久午夜综合久久午夜| 黄色资源网久久资源365| 99国产精品国产精品久久| 欧美日韩一区不卡| www亚洲一区| 91精品国产品国语在线不卡| 成人激情免费视频| 狠狠v欧美v日韩v亚洲ⅴ| 粉嫩一区二区三区性色av| 欧美制服丝袜第一页| 91精品国产91热久久久做人人| 久久久久久久综合色一本| 亚洲欧美日韩久久精品| 乱一区二区av| 色综合一个色综合| www久久精品| 亚洲一区二区三区国产| 韩国理伦片一区二区三区在线播放| 岛国精品在线观看| 欧美日韩一区二区三区免费看| 精品国产91洋老外米糕| 亚洲午夜精品17c| 国产a视频精品免费观看| 欧美精三区欧美精三区| 国产精品久99| 精品一区二区三区久久| 欧美日韩三级视频| 日韩一区在线看| 久久精品久久99精品久久| 在线免费观看不卡av| 国产欧美视频一区二区三区| 亚洲国产中文字幕在线视频综合| 国产盗摄一区二区三区| 欧美一区二区国产| 亚洲欧美激情在线| 国产尤物一区二区在线| 欧美日韩中文字幕一区| 中文字幕欧美一| 国产成人精品免费视频网站| 欧美精品一级二级| 中文字幕一区二区三区在线观看| 韩国三级电影一区二区| 5858s免费视频成人| 亚洲另类在线视频| 99久久er热在这里只有精品15| 久久亚洲影视婷婷| 黄色日韩三级电影| 337p亚洲精品色噜噜噜| 五月婷婷久久综合| 欧美日韩精品一区二区在线播放| 亚洲精品视频免费看| 99精品久久99久久久久| 欧美极品aⅴ影院| 国产精品一区二区三区99| 欧美成人性福生活免费看| 青青青伊人色综合久久| 欧美一级视频精品观看| 麻豆精品新av中文字幕| 日韩欧美在线1卡|