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

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

?? treelistview.cs

?? Linux 恢復盤制作工具 process調用busybox dd實現寫*.img鏡像
?? CS
?? 第 1 頁 / 共 4 頁
字號:
/*
 * TreeListView - A listview that can show a tree of objects in a column
 *
 * Author: Phillip Piper
 * Date: 23/09/2008 11:15 AM
 *
 * Change log:
 * 2009-02-24  JPP  - All commands now work when the list is empty (SF #2631054)
 *                  - TreeListViews can now be printed with ListViewPrinter
 * 2009-01-27  JPP  - Changed to use new Renderer and HitTest scheme
 * 2009-01-22  JPP  - Added RevealAfterExpand property. If this is true (the default),
 *                    after expanding a branch, the control scrolls to reveal as much of the
 *                    expanded branch as possible.
 * 2009-01-13  JPP  - Changed TreeRenderer to work with visual styles are disabled
 * v2.0.1
 * 2009-01-07  JPP  - Made all public and protected methods virtual 
 *                  - Changed some classes from 'internal' to 'protected' so that they
 *                    can be accessed by subclasses of TreeListView.
 * 2008-12-22  JPP  - Added UseWaitCursorWhenExpanding property
 *                  - Made TreeRenderer public so that it can be subclassed
 *                  - Added LinePen property to TreeRenderer to allow the connection drawing 
 *                    pen to be changed 
 *                  - Fixed some rendering issues where the text highlight rect was miscalculated
 *                  - Fixed connection line problem when there is only a single root
 * v2.0
 * 2008-12-10  JPP  - Expand/collapse with mouse now works when there is no SmallImageList.
 * 2008-12-01  JPP  - Search-by-typing now works.
 * 2008-11-26  JPP  - Corrected calculation of expand/collapse icon (SF#2338819)
 *                  - Fixed ugliness with dotted lines in renderer (SF#2332889)
 *                  - Fixed problem with custom selection colors (SF#2338805)
 * 2008-11-19  JPP  - Expand/collapse now preserve the selection -- more or less :)
 *                  - Overrode RefreshObjects() to rebuild the given objects and their children
 * 2008-11-05  JPP  - Added ExpandAll() and CollapseAll() commands
 *                  - CanExpand is no longer cached
 *                  - Renamed InitialBranches to RootModels since it deals with model objects
 * 2008-09-23  JPP  Initial version
 *
 * TO DO:
 * 2008-12-10  If the TreeListView doesn't have a small image list, checkboxes do not work.
 *             [Is this still the case? 2009/01/27]
 * 2008-10-19  Can we remove the need to ownerdraw the tree view?
 *             If tree does not have checkboxes, we could use the state image
 *             to show the expand/collapse icon. If the tree has check boxes,
 *             it has to be owner drawn.
 * 
 * Copyright (C) 2006-2008 Phillip Piper
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * If you wish to use this code in a closed source application, please contact phillip_piper@bigfoot.com.
 */

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;

namespace BrightIdeasSoftware
{
    /// <summary>
    /// A TreeListView combines an expandable tree structure with list view columns.
    /// </summary>
    /// <remarks>
    /// <para>To support tree operations, two delegates must be provided:</para>
    /// <list>
    /// <item>CanExpandGetter. This delegate must accept a model object and return a boolean indicating
    /// if that model should be expandable. </item>
    /// <item>ChildrenGetter. This delegate must accept a model object and return an IEnumerable of model
    /// objects that will be displayed as children of the parent model. This delegate will only be called
    /// for a model object if the CanExpandGetter has already returned true for that model.</item>
    /// </list>
    /// <para>
    /// The top level branches of the tree are set via the Roots property. SetObjects(), AddObjects() 
    /// and RemoveObjects() are interpreted as operations on this collection of roots.
    /// </para>
    /// <para>
    /// To add new children to an existing branch, make changes to your model objects and then
    /// call RefreshObject() on the parent.
    /// </para>
    /// <para>The tree must be a directed acyclic graph -- no cycles are allowed.</para>
    /// <para>More generally, each model object must appear only once in the tree. If the same model object appears in two
    /// places in the tree, the control will become confused.</para>
    /// </remarks>
    public class TreeListView : VirtualObjectListView
    {
        /// <summary>
        /// Make a default TreeListView
        /// </summary>
        public TreeListView()
        {
            this.TreeModel = new Tree(this);
            this.OwnerDraw = true;
            this.View = View.Details;

            this.DataSource = this.TreeModel;
            this.TreeColumnRenderer = new TreeRenderer();
        }

        //------------------------------------------------------------------------------------------
        // Properties

        /// <summary>
        /// This is the delegate that will be used to decide if a model object can be expanded.
        /// </summary>
        [Browsable(false),
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual CanExpandGetterDelegate CanExpandGetter
        {
            get { return this.TreeModel.CanExpandGetter; }
            set { this.TreeModel.CanExpandGetter = value; }
        }

        /// <summary>
        /// This is the delegate that will be used to fetch the children of a model object
        /// </summary>
        /// <remarks>This delegate will only be called if the CanExpand delegate has 
        /// returned true for the model object.</remarks>
        [Browsable(false),
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual ChildrenGetterDelegate ChildrenGetter
        {
            get { return this.TreeModel.ChildrenGetter; }
            set { this.TreeModel.ChildrenGetter = value; }
        }

        /// <summary>
        /// After expanding a branch, should the TreeListView attempts to show as much of the 
        /// revealed descendents as possible.
        /// </summary>
        [Category("Behavior - ObjectListView"),
         Description("Should a wait cursor be shown when a branch is being expaned?"),
         DefaultValue(true)]
        public bool RevealAfterExpand
        {
            get { return revealAfterExpand; }
            set { revealAfterExpand = value; }
        }
        private bool revealAfterExpand = true;

        /// <summary>
        /// The model objects that form the top level branches of the tree.
        /// </summary>
        /// <remarks>Setting this does <b>NOT</b> reset the state of the control.
        /// In particular, it does not collapse branches.</remarks>
        [Browsable(false),
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual IEnumerable Roots
        {
            get { return this.TreeModel.RootObjects; }
            set {
                // Make sure that column 0 is showing a tree
                if (this.GetColumn(0).Renderer == null)
                    this.GetColumn(0).Renderer = this.TreeColumnRenderer;
                if (value == null)
                    this.TreeModel.RootObjects = new ArrayList();
                else
                    this.TreeModel.RootObjects = value;
                this.UpdateVirtualListSize();
            }
        }

        /// <summary>
        /// The renderer that will be used to draw the tree structure
        /// </summary>
        [Browsable(false),
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual BaseRenderer TreeColumnRenderer
        {
            get { return treeRenderer; }
            set { 
                treeRenderer = value;
                if (this.Columns.Count > 0)
                    this.GetColumn(0).Renderer = value;
            }
        }
        private BaseRenderer treeRenderer;

        /// <summary>
        /// Should a wait cursor be shown when a branch is being expanded?
        /// </summary>
        /// <remarks>When this is true, the wait cursor will be shown whilst the children of the 
        /// branch are being fetched. If the children of the branch have already been cached, 
        /// the cursor will not change.</remarks>
        [Category("Behavior - ObjectListView"),
        Description("Should a wait cursor be shown when a branch is being expaned?"),
        DefaultValue(true)]
        public virtual bool UseWaitCursorWhenExpanding
        {
            get { return useWaitCursorWhenExpanding; }
            set { useWaitCursorWhenExpanding = value; }
        }
        private bool useWaitCursorWhenExpanding = true;
	
        /// <summary>
        /// The model that is used to manage the tree structure
        /// </summary>
        protected Tree TreeModel;

        //------------------------------------------------------------------------------------------
        // Accessing

        /// <summary>
        /// Return true if the branch at the given model is expanded
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public virtual bool IsExpanded(Object model)
        {
            Branch br = this.TreeModel.GetBranch(model);
            return (br != null && br.IsExpanded);
        }

        //------------------------------------------------------------------------------------------
        // Commands

        /// <summary>
        /// Collapse the subtree underneath the given model
        /// </summary>
        /// <param name="model"></param>
        public virtual void Collapse(Object model)
        {
            if (this.GetItemCount() == 0)
                return;
            IList selection = this.SelectedObjects;
            int idx = this.TreeModel.Collapse(model);
            if (idx >= 0) {
                this.UpdateVirtualListSize();
                this.SelectedObjects = selection;
                this.RedrawItems(idx, this.GetItemCount() - 1, false);
            }
        }

        /// <summary>
        /// Collapse all subtrees within this control
        /// </summary>
        public virtual void CollapseAll()
        {
            if (this.GetItemCount() == 0)
                return;
            IList selection = this.SelectedObjects;
            int idx = this.TreeModel.CollapseAll();
            if (idx >= 0) {
                this.UpdateVirtualListSize();
                this.SelectedObjects = selection;
                this.RedrawItems(idx, this.GetItemCount() - 1, false);
            }
        }

        /// <summary>
        /// Expand the subtree underneath the given model object
        /// </summary>
        /// <param name="model"></param>
        public virtual void Expand(Object model)
        {
            if (this.GetItemCount() == 0)
                return;
            IList selection = this.SelectedObjects;
            int idx = this.TreeModel.Expand(model);
            if (idx >= 0) {
                this.UpdateVirtualListSize();
                this.SelectedObjects = selection;
                this.RedrawItems(idx, this.GetItemCount() - 1, false);
                if (this.RevealAfterExpand && idx > 0) {
                    this.BeginUpdate();
                    try {
                        int countPerPage = NativeMethods.GetCountPerPage(this);
                        int descedentCount = this.TreeModel.GetVisibleDescendentCount(model);
                        if (descedentCount < countPerPage) 
                            this.EnsureVisible(idx + descedentCount);
                        else
                            this.TopItemIndex = idx;
                    }
                    finally {
                        this.EndUpdate();
                    }
                }
            }
        }

        /// <summary>
        /// Expand all the branches within this tree recursively.
        /// </summary>
        /// <remarks>Be careful: this method could take a long time for large trees.</remarks>
        public virtual void ExpandAll()
        {
            if (this.GetItemCount() == 0)
                return;
            IList selection = this.SelectedObjects;
            int idx = this.TreeModel.ExpandAll();
            if (idx >= 0) {
                this.UpdateVirtualListSize();
                this.SelectedObjects = selection;
                this.RedrawItems(idx, this.GetItemCount() - 1, false);
            }
        }

        /// <summary>
        /// Update the rows that are showing the given objects
        /// </summary>
        public override void RefreshObjects(IList modelObjects)
        {
            if (this.InvokeRequired) {
                this.Invoke((MethodInvoker)delegate { this.RefreshObjects(modelObjects); });
                return;
            }

            if (modelObjects.Count == 0)
                return;
            IList selection = this.SelectedObjects;

            // Refresh each object, remembering where the first update occured
            int firstChange = Int32.MaxValue;
            foreach (Object x in modelObjects) {
                int idx =  this.TreeModel.RebuildChildren(x);
                if (idx >= 0)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩视频一区在线观看| 成年人网站91| 欧美一区二区日韩一区二区| 亚洲国产色一区| 欧美日韩国产另类一区| 一区二区三区产品免费精品久久75| 91在线视频在线| 一区二区三区中文字幕电影 | 亚洲另类春色国产| 一本色道**综合亚洲精品蜜桃冫| 亚洲色图另类专区| 欧美手机在线视频| 丝袜亚洲另类欧美| 欧美videossexotv100| 国产乱码精品1区2区3区| 久久亚洲精品国产精品紫薇| 国产激情视频一区二区在线观看 | 成人av电影观看| 亚洲免费资源在线播放| 欧美老肥妇做.爰bbww视频| 美女视频一区在线观看| 久久综合久久99| 91在线免费视频观看| 亚洲电影欧美电影有声小说| 日韩一区二区三区精品视频| 懂色av一区二区三区免费看| 亚洲综合偷拍欧美一区色| 欧美高清激情brazzers| 国产精品77777| 亚洲综合自拍偷拍| 欧美成人艳星乳罩| 91欧美一区二区| 免费在线欧美视频| 中文字幕一区二区三区四区不卡 | 色哟哟国产精品免费观看| 视频一区二区不卡| 中文字幕精品一区二区三区精品 | 日韩欧美中文字幕精品| thepron国产精品| 日韩av不卡一区二区| 国产精品伦理在线| 日韩免费一区二区三区在线播放| 成人激情av网| 裸体歌舞表演一区二区| 尤物视频一区二区| 国产欧美视频一区二区三区| 在线免费一区三区| 高清在线观看日韩| 日韩国产精品91| 综合欧美亚洲日本| 久久久综合精品| 91精品久久久久久久99蜜桃| www.av精品| 国产精品一区二区三区乱码| 亚洲成人av一区二区| 亚洲欧美中日韩| 久久毛片高清国产| 日韩三级精品电影久久久| 在线精品视频小说1| 不卡高清视频专区| 国产一区二区看久久| 日韩在线一二三区| 亚洲综合一区二区| 亚洲精品国产成人久久av盗摄| 久久久影院官网| 久久综合色婷婷| 91精品国产美女浴室洗澡无遮挡| 91高清视频免费看| 91网站最新地址| 成人黄动漫网站免费app| 韩国一区二区在线观看| 日韩电影一区二区三区四区| 一二三四社区欧美黄| 亚洲色欲色欲www在线观看| 中文字幕不卡的av| 国产女同互慰高潮91漫画| 欧美本精品男人aⅴ天堂| 欧美一区二区三区四区五区 | 激情文学综合插| 蜜臀av性久久久久蜜臀aⅴ流畅 | 亚洲女同ⅹxx女同tv| 亚洲国产电影在线观看| 国产午夜精品久久久久久久| 久久久国产精华| 国产日韩欧美一区二区三区综合| 久久老女人爱爱| 国产精品视频九色porn| 中文一区二区完整视频在线观看| 欧美国产日韩a欧美在线观看| 欧美精品一区二区三区四区| 精品国产乱码久久| 国产亚洲一区二区三区| 国产三级一区二区| 国产精品高清亚洲| 玉足女爽爽91| 日韩电影在线观看一区| 国产最新精品免费| 成人精品视频一区二区三区尤物| eeuss鲁片一区二区三区在线观看| av在线播放一区二区三区| 波多野结衣中文字幕一区| 色综合久久综合网| 欧美美女黄视频| 久久网站热最新地址| 国产精品婷婷午夜在线观看| 综合久久一区二区三区| 日韩影院精彩在线| 国产精品99久久久| 91片黄在线观看| 6080日韩午夜伦伦午夜伦| 91精品国产91热久久久做人人| av一二三不卡影片| 欧美日韩国产精品自在自线| 国产欧美日韩在线| 日韩精品1区2区3区| 六月丁香综合在线视频| 91麻豆福利精品推荐| 制服丝袜国产精品| 国产精品理伦片| 在线观看精品一区| 国产a区久久久| 欧美少妇xxx| 久久久精品影视| 亚洲精品精品亚洲| 国产一区二区三区观看| 在线观看日韩电影| 2欧美一区二区三区在线观看视频| 国产精品国产三级国产普通话三级 | 三级久久三级久久久| 国产一区二区三区综合| 一本久道久久综合中文字幕| 日韩午夜三级在线| 精品成人在线观看| 欧美成人精品3d动漫h| 国产欧美视频在线观看| 五月天欧美精品| 成人app在线| 日韩免费观看高清完整版| 一区二区三区小说| 国产精品一品二品| 91麻豆精品国产自产在线| 久久久影视传媒| 肉色丝袜一区二区| 99精品一区二区| xnxx国产精品| 日韩激情av在线| 色系网站成人免费| 久久精品视频一区二区| 日韩影院免费视频| 欧美影视一区二区三区| 中文字幕一区二区三区四区不卡 | 99久久精品99国产精品| 欧美精品一区二区三区在线| 日韩综合在线视频| 欧美性一二三区| 国产精品国产自产拍在线| 黄色成人免费在线| 日韩一级片在线观看| 成人高清av在线| 日本伊人午夜精品| 久久精品欧美日韩| 精品国产亚洲在线| 国产婷婷精品av在线| 久久国产精品99久久人人澡| 欧美性欧美巨大黑白大战| 国产精品久久久久久久岛一牛影视| 另类调教123区| 日韩一区二区不卡| 免费在线欧美视频| 日韩一级大片在线| 免费在线观看不卡| 欧美一级黄色录像| 蜜桃一区二区三区四区| 日韩一区二区精品在线观看| 舔着乳尖日韩一区| 91精品国产欧美一区二区18| 人人爽香蕉精品| 精品区一区二区| 国内精品国产三级国产a久久| 精品日韩在线观看| 国内精品第一页| 国产日韩v精品一区二区| 国产伦精品一区二区三区视频青涩 | 欧美日韩一区视频| 国产欧美综合色| 99久久精品国产麻豆演员表| 中文字幕一区视频| 欧美视频一区二区三区在线观看| 亚洲国产裸拍裸体视频在线观看乱了 | 在线播放欧美女士性生活| 日韩电影在线观看网站| 欧美精品一区二区三区很污很色的| 精品午夜一区二区三区在线观看| 久久影院电视剧免费观看| 国产传媒日韩欧美成人| 亚洲少妇30p| 欧美一级午夜免费电影| 国内精品伊人久久久久av影院 | 色综合视频在线观看| 一区二区三区免费|