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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? tristatetree.cs

?? 對(duì)ima、imz壓縮文件修改
?? CS
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Runtime.InteropServices;
using System.ComponentModel;

namespace WinImageSample
{
    [FlagsAttribute]
    public enum CheckBoxState
    {
        Unchecked = 1,
        Checked = 2,
        Indeterminate = CheckBoxState.Unchecked | CheckBoxState.Checked
    }

    /// <summary>
    /// ThreeStateTreeNode inherits from <see cref="http://msdn2.microsoft.com/en-us/library/sc9ba94b(vs.80).aspx">TreeView</see>
    /// and adds the ability to cascade state changes to related nodes, i.e. child nodes and or parent nodes, as well as to optionally
    /// use the three state functionality.
    /// </summary>
    public class ThreeStateTreeView : TreeView
    {
        ImageList _imageList;
        private bool bHandleCreated = false;
        #region Constructors
        /// <summary>
        /// Initializes a new instance of the ThreeStateTreeView class in addition to intializing
        /// the base class (<see cref="http://msdn2.microsoft.com/en-us/library/system.windows.forms.treeview.treeview(VS.80).aspx">TreeView Constructor</see>). 
        /// </summary>
        public ThreeStateTreeView()
            : base()
        {
            InitializeComponent();
            base.CheckBoxes = true;
            _imageList = new ImageList();
            _imageList.ImageSize = new Size(16, 16);
            if (!NativeMethods.VisualStylesEnabled()) { _imageList = ilChecks; }
            else
            {
                _imageList.Images.Add(ilChecks.Images["Checked0"]);
                UXTheme.LoadCheckBoxImage(_imageList, UXTheme.CheckBoxState.UncheckedNormal);
                UXTheme.LoadCheckBoxImage(_imageList, UXTheme.CheckBoxState.CheckedNormal);
                UXTheme.LoadCheckBoxImage(_imageList, UXTheme.CheckBoxState.MixedNormal);
            }
        }
        #endregion

        private ImageList ilChecks;
        private IContainer components;



        #region Public Properties
        /// <summary>
        /// Flag. If true, use three state checkboxes, otherwise, use the default behavior of the TreeView and associated TreeNodes.
        /// </summary>
        private bool mUseThreeStateCheckBoxes = true;
        [Category("Three State TreeView"),
        Description("Flag. If true, use three state checkboxes, otherwise, use the default behavior of the TreeView and associated TreeNodes."),
        DefaultValue(true),
        TypeConverter(typeof(bool)),
        Editor("System.Boolean", typeof(bool))]
        public bool UseThreeStateCheckBoxes
        {
            get { return this.mUseThreeStateCheckBoxes; }
            set { this.mUseThreeStateCheckBoxes = value; }
        }
        #endregion

        #region Overrides
        public new ImageList ImageList
        {
            get { return base.ImageList; }
            set
            {
                base.ImageList = value;
                this.SetCheckImageList();
            }
        }
        /// <summary>
        /// Raises the AfterCheck event.
        /// </summary>
        /// <param name="e">A <see cref="http://msdn2.microsoft.com/en-us/library/system.windows.forms.treevieweventargs.aspx">TreeViewEventArgs</see> containing the event data.</param>
        protected override void OnAfterCheck(TreeViewEventArgs e)
        {

            if (this.UseThreeStateCheckBoxes)
            {
                switch (e.Action)
                {
                    case TreeViewAction.ByKeyboard:
                    case TreeViewAction.ByMouse:
                        {
                            if (e.Node is ThreeStateTreeNode)
                            {
                                // Toggle to the next state.
                                ThreeStateTreeNode tn = e.Node as ThreeStateTreeNode;
                                tn.Toggle();
                            }

                            break;
                        }
                    case TreeViewAction.Collapse:
                    case TreeViewAction.Expand:
                    case TreeViewAction.Unknown:
                    default:
                        {
                            // Do nothing.
                            break;
                        }
                }
            }
            base.OnAfterCheck(e);
        }
        protected override void OnHandleCreated(EventArgs e)
        {
            base.OnHandleCreated(e);
            bHandleCreated = true;
            SetCheckImageList();
        }
        #endregion
        #region Hide no longer appropriate properties from Designer
        [Browsable(false)]
        public new bool CheckBoxes
        {
            get { return base.CheckBoxes; }
            internal set { base.CheckBoxes = value; }
        }
        [Browsable(false)]
        public new int ImageIndex
        {
            get { return base.ImageIndex; }
            set { base.ImageIndex = value; }
        }
        [Browsable(false)]
        public new int SelectedImageIndex
        {
            get { return base.SelectedImageIndex; }
            set { base.SelectedImageIndex = value; }
        }
        [Browsable(false)]
        public new ImageList StateImageList
        {
            get { return base.StateImageList; }
            internal set { base.StateImageList = value; }
        }
        #endregion

        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ThreeStateTreeView));
            this.ilChecks = new System.Windows.Forms.ImageList(this.components);
            this.SuspendLayout();
            // 
            // ilChecks
            // 
            this.ilChecks.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilChecks.ImageStream")));
            this.ilChecks.TransparentColor = System.Drawing.Color.Transparent;
            this.ilChecks.Images.SetKeyName(0, "Checked0");
            this.ilChecks.Images.SetKeyName(1, "Checked1");
            this.ilChecks.Images.SetKeyName(2, "Checked2");
            this.ilChecks.Images.SetKeyName(3, "Checked3");
            this.ResumeLayout(false);

        }
        private void SetCheckImageList()
        {
            if (!bHandleCreated) return;
            NativeMethods.SendMessage(
                    new HandleRef(this, this.Handle),
                    (int)NativeMethods.Messages.TVM_SETIMAGELIST,
                    (int)NativeMethods.TreeViewImageListType.TVSIL_STATE,
                    (int)_imageList.Handle);
        }
    }

    /// <summary>
    /// ThreeStateTreeNode inherits from <see cref="http://msdn2.microsoft.com/en-us/library/system.windows.forms.treenode.aspx">TreeNode</see>
    /// and adds the ability to support a third, indeterminate state as well as optionally cascading state changes to related nodes, i.e.
    /// child nodes and or parent nodes, as determined by this instance's related parent TreeView settings, CascadeNodeChecksToChildNodes and
    /// CascadeNodeChecksToParentNode.
    /// </summary>
    public class ThreeStateTreeNode : TreeNode
    {
        #region Constructors
        /// <summary>
        /// Initializes a new instance of the ThreeStateTreeNode class in addition to intializing
        /// the base class (<see cref="http://msdn2.microsoft.com/en-us/library/bk8h64c9.aspx">TreeNode Constructor</see>). 
        /// </summary>
        public ThreeStateTreeNode()
            : base()
        {
            this.CommonConstructor();
        }

        /// <summary>
        /// Initializes a new instance of the ThreeStateTreeNode class with a string for the text label to display in addition to intializing
        /// the base class (<see cref="http://msdn2.microsoft.com/en-us/library/ytx906df.aspx">TreeNode Constructor</see>). 
        /// </summary>
        /// <param name="text">The string for the label of the new tree node.</param>
        public ThreeStateTreeNode(string text)
            : base(text)
        {
            this.CommonConstructor();
        }

        /// <summary>
        /// Initializes a new instance of the ThreeStateTreeNode class with a string for the text label to display 
        /// and an array of child ThreeStateTreeNodes in addition to intializing the base class 
        /// (<see cref="http://msdn2.microsoft.com/en-us/library/774ty506.aspx">TreeNode Constructor</see>). 
        /// </summary>
        /// <param name="text">The string for the label of the new tree node.</param>
        /// <param name="children">An array of child ThreeStateTreeNodes.</param>
        public ThreeStateTreeNode(string text, ThreeStateTreeNode[] children)
            : base(text, children)
        {
            this.CommonConstructor();
        }

        /// <summary>
        /// Initializes a new instance of the ThreeStateTreeNode class with a string for the text label to display 
        /// and the selected and unselected image indexes in addition to intializing the base class 
        /// (<see cref="http://msdn2.microsoft.com/en-us/library/8dfy3k5t.aspx">TreeNode Constructor</see>). 
        /// </summary>
        /// <param name="text">The string for the label of the new tree node.</param>
        /// <param name="imageIndex">The image index of the unselected image in the parent TreeView's <see cref="http://msdn2.microsoft.com/en-us/library/system.windows.forms.treeview.imagelist.aspx">ImageList</see>.</param>
        /// <param name="selectedImageIndex">The image index of the selected image in the parent TreeView's <see cref="http://msdn2.microsoft.com/en-us/library/system.windows.forms.treeview.imagelist.aspx">ImageList</see>.</param>
        public ThreeStateTreeNode(string text, int imageIndex, int selectedImageIndex)
            : base(text, imageIndex, selectedImageIndex)
        {
            this.CommonConstructor();
        }

        /// <summary>
        /// Initializes a new instance of the ThreeStateTreeNode class with a string for the text label to display ,
        /// the selected and unselected image indexes, and an array of child ThreeStateTreeNodes in addition to intializing the base class 
        /// (<see cref="http://msdn2.microsoft.com/en-us/library/8dfy3k5t.aspx">TreeNode Constructor</see>). 
        /// </summary>
        /// <param name="text">The string for the label of the new tree node.</param>
        /// <param name="imageIndex">The image index of the unselected image in the parent TreeView's <see cref="http://msdn2.microsoft.com/en-us/library/system.windows.forms.treeview.imagelist.aspx">ImageList</see>.</param>
        /// <param name="selectedImageIndex">The image index of the selected image in the parent TreeView's <see cref="http://msdn2.microsoft.com/en-us/library/system.windows.forms.treeview.imagelist.aspx">ImageList</see>.</param>
        /// <param name="children">An array of child ThreeStateTreeNodes.</param>
        public ThreeStateTreeNode(string text, int imageIndex, int selectedImageIndex, ThreeStateTreeNode[] children)
            : base(text, imageIndex, selectedImageIndex, children)
        {
            this.CommonConstructor();
        }
        #endregion

        #region Initialization
        /// <summary>
        /// Performs common initialization to all constructors.
        /// </summary>
        private void CommonConstructor()
        {
        }
        #endregion

        #region Properties
        /// <summary>
        /// The current state of the checkbox.
        /// </summary>
        private CheckBoxState mState = CheckBoxState.Unchecked;
        [Category("Three State TreeView"),
        Description("The current state of the node's checkbox, Unchecked, Checked, or Indeterminate"),
        DefaultValue(CheckBoxState.Unchecked),
        TypeConverter(typeof(CheckBoxState)),
        Editor("Ascentium.Research.Windows.Components.CheckBoxState", typeof(CheckBoxState))]
        public CheckBoxState State
        {
            get { return this.mState; }
            set
            {
                if (this.mState != value)
                {
                    this.mState = value;

                    // Ensure if checkboxes are used to make the checkbox checked or unchecked.
                    // When go to a fully drawn control, this will be managed in the drawing code.
                    // Setting the Checked property in code will cause the OnAfterCheck to be called
                    // and the action will be 'Unknown'; do not handle that case.
                    //if ((this.TreeView != null) && (this.TreeView.CheckBoxes))
                    //    this.Checked = (this.mState == CheckBoxState.Checked);

                    SetState(value);
                }
            }
        }

        /// <summary>
        /// Returns the 'combined' state for all siblings of a node.
        /// </summary>
        private CheckBoxState SiblingsState
        {
            get
            {
                // If parent is null, cannot have any siblings or if the parent
                // has only one child (i.e. this node) then return the state of this 
                // instance as the state.
                if ((this.Parent == null) || (this.Parent.Nodes.Count == 1))
                    return this.State;

                // The parent has more than one child.  Walk through parent's child
                // nodes to determine the state of all this node's siblings,
                // including this node.
                CheckBoxState state = 0;
                foreach (TreeNode node in this.Parent.Nodes)
                {
                    ThreeStateTreeNode child = node as ThreeStateTreeNode;
                    if (child != null)
                        state |= child.State;

                    // If the state is now indeterminate then know there
                    // is a combination of checked and unchecked nodes
                    // and no longer need to continue evaluating the rest
                    // of the sibling nodes.
                    if (state == CheckBoxState.Indeterminate)
                        break;
                }

                return (state == 0) ? CheckBoxState.Unchecked : state;
            }
        }

        #endregion

        #region Methods
        /// <summary>
        /// Manages state changes from one state to the next.
        /// </summary>
        /// <param name="fromState">The state upon which to base the state change.</param>
        public void Toggle(CheckBoxState fromState)
        {
            switch (fromState)
            {
                case CheckBoxState.Indeterminate:
                case CheckBoxState.Unchecked:
                    {
                        this.State = CheckBoxState.Checked;
                        break;
                    }
                case CheckBoxState.Checked:
                default:
                    {
                        this.State = CheckBoxState.Unchecked;
                        break;
                    }
            }

            this.UpdateStateOfRelatedNodes();
        }

        /// <summary>
        /// Manages state changes from one state to the next.
        /// </summary>
        public new void Toggle() { this.Toggle(this.State); }

        /// <summary>
        /// Manages updating related child and parent nodes of this instance.
        /// </summary>
        public void UpdateStateOfRelatedNodes()
        {
            ThreeStateTreeView tv = this.TreeView as ThreeStateTreeView;
            if ((tv != null) && tv.CheckBoxes && tv.UseThreeStateCheckBoxes)
            {
                tv.BeginUpdate();

                // If want to cascade checkbox state changes to child nodes of this node and
                // if the current state is not intermediate, update the state of child nodes.
                if (this.State != CheckBoxState.Indeterminate)

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品在线观看网站| 欧美在线观看18| 亚洲男女毛片无遮挡| 在线观看日韩高清av| 麻豆精品新av中文字幕| 久久先锋影音av鲁色资源网| 91在线云播放| 九九九精品视频| 中文字幕在线观看不卡视频| 欧美日韩中文国产| 国产成人鲁色资源国产91色综| 亚洲一区在线电影| 久久久美女毛片 | 成人免费毛片片v| 亚瑟在线精品视频| 亚洲国产成人午夜在线一区| 777色狠狠一区二区三区| 成人高清视频在线| 黑人巨大精品欧美黑白配亚洲 | 亚洲人一二三区| 欧美成人精品二区三区99精品| 波多野结衣一区二区三区 | 欧美视频一区二区三区| 国产69精品久久777的优势| 日韩精品高清不卡| 亚洲三级在线看| 久久精品人人爽人人爽| 777xxx欧美| 色婷婷久久久亚洲一区二区三区| 极品瑜伽女神91| 亚洲人xxxx| 久久色视频免费观看| 91精品国产丝袜白色高跟鞋| 99re66热这里只有精品3直播| 老汉av免费一区二区三区| 亚洲妇女屁股眼交7| 精品一区二区三区日韩| 久久99精品国产| 日韩中文欧美在线| 亚洲bt欧美bt精品777| 亚洲男人的天堂av| 久久久久久麻豆| 日韩欧美另类在线| 欧美日韩精品欧美日韩精品| av资源网一区| 成人开心网精品视频| 国产成人综合在线| 国产麻豆成人精品| 国产精品亚洲一区二区三区在线| 老司机免费视频一区二区三区| 日本欧美在线观看| 日韩av在线播放中文字幕| 午夜伊人狠狠久久| 亚洲电影视频在线| 午夜精品视频一区| 午夜精品久久久久久久99水蜜桃| 欧美激情综合网| 欧美激情自拍偷拍| 国产精品久久久久久一区二区三区| 欧美国产一区视频在线观看| 国产欧美一区二区在线| 国产校园另类小说区| 国产日韩欧美精品一区| 中文字幕av一区二区三区免费看| 日韩av一区二区三区四区| 麻豆91精品视频| 国产精品综合久久| 粉嫩一区二区三区性色av| 成人精品视频一区二区三区尤物| 9l国产精品久久久久麻豆| 色综合色狠狠综合色| 日本韩国欧美三级| 欧美日韩夫妻久久| 欧美电视剧在线观看完整版| 26uuu亚洲| 亚洲欧美视频在线观看| 日韩精品欧美精品| 天天综合天天做天天综合| 欧美aaaaaa午夜精品| 国产精品综合在线视频| 国产成人在线视频播放| 国产99精品视频| 91亚洲大成网污www| 91蜜桃传媒精品久久久一区二区| 91黄色免费网站| 91麻豆文化传媒在线观看| 欧美性大战久久| 91精品国产麻豆国产自产在线| 91麻豆精品国产| 日韩限制级电影在线观看| 久久久91精品国产一区二区精品| 国产91露脸合集magnet| 91视频观看视频| 日韩一区二区三区电影在线观看 | 欧美亚洲国产一区二区三区| 日韩欧美亚洲国产另类| 久久婷婷国产综合精品青草| 国产精品入口麻豆原神| 一区二区三区在线免费视频| 一二三区精品视频| 亚洲国产另类av| 国产成人在线色| 欧美高清你懂得| 久久久久久毛片| 国产精品国产三级国产a| 欧美色图片你懂的| 中文字幕亚洲一区二区va在线| 日韩福利电影在线| thepron国产精品| 欧美在线色视频| 亚洲精品一区在线观看| 91黄色激情网站| 日韩欧美国产一区在线观看| 久久国产欧美日韩精品| 欧洲人成人精品| 亚洲国产视频一区二区| 91精品国产全国免费观看| 一区二区在线观看免费视频播放| 免费观看在线色综合| 韩国中文字幕2020精品| 久久婷婷色综合| 国产伦精品一区二区三区免费 | 久久99国产精品尤物| 婷婷国产v国产偷v亚洲高清| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 国产精品你懂的| 日本韩国欧美一区| 免费观看久久久4p| 91精品国产一区二区| 成a人片国产精品| 日韩激情一二三区| 自拍偷拍亚洲综合| 久久天堂av综合合色蜜桃网 | 欧美一级片在线观看| 丰满放荡岳乱妇91ww| 奇米一区二区三区av| 亚洲精品菠萝久久久久久久| 日韩精品一区二区三区视频播放| 成人性生交大片免费看视频在线 | 成人av在线资源| 午夜精品久久久久久久蜜桃app| 久久―日本道色综合久久| 欧美精品色综合| 在线视频一区二区三区| 懂色一区二区三区免费观看| 久久99这里只有精品| 亚洲国产成人私人影院tom| 日韩一二三区不卡| 日韩精品一区二区三区中文不卡| 欧美日韩国产高清一区二区| 亚洲三级电影全部在线观看高清| 日本一区二区高清| 爽好多水快深点欧美视频| 午夜精品福利一区二区蜜股av| 日本欧美韩国一区三区| 美女在线一区二区| 国产98色在线|日韩| 欧美性一二三区| 精品粉嫩aⅴ一区二区三区四区| 久久精品亚洲国产奇米99| 国产精品欧美一区喷水| 偷拍日韩校园综合在线| 日韩精品一区第一页| 最近日韩中文字幕| 亚洲成a人v欧美综合天堂| 另类综合日韩欧美亚洲| 91在线视频播放地址| 欧美一级淫片007| 亚洲欧美日韩一区| 经典三级一区二区| 欧美精品高清视频| 国产夫妻精品视频| 国产精品动漫网站| 艳妇臀荡乳欲伦亚洲一区| 亚洲人成人一区二区在线观看| 亚洲伊人伊色伊影伊综合网| 国产一区视频在线看| 91搞黄在线观看| 国产欧美日韩三区| 日本亚洲三级在线| 色婷婷综合久色| 中文字幕一区在线| 成人性生交大片免费看视频在线| 欧美视频日韩视频在线观看| 中文字幕一区二区三区乱码在线| 国产一区二区在线免费观看| 日韩免费视频一区二区| 91老司机福利 在线| 欧美一区二区三区视频免费播放| 亚洲曰韩产成在线| 欧美日韩综合不卡| 日韩高清一级片| 日韩欧美一级特黄在线播放| 日韩高清不卡一区二区三区| 日韩美女天天操| 成人免费视频一区| 亚洲桃色在线一区| 在线观看亚洲成人| 日韩高清在线一区| 久久精品视频免费|