Source/Editors/VisualGroup.cs

(开头部分) 17KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

#if FRAMEWORK20
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.ComponentModel;

namespace DevComponents.Editors
{
    public class VisualGroup : VisualItem
    {
        #region Private Variables
        private VisualItem _MouseDownItem = null;
        private VisualItem _MouseOverItem = null;
        #endregion

        #region Events
        #endregion

        #region Constructor
        public VisualGroup()
            : base()
        {
            _Items = new VisualItemCollection(this);
        }
        #endregion

        #region Internal Implementation

        internal virtual void ProcessItemsCollectionChanged(CollectionChangedInfo collectionChangedInfo)
        {
            OnItemsCollectionChanged(collectionChangedInfo);
        }

        protected virtual void OnItemsCollectionChanged(CollectionChangedInfo collectionChangedInfo)
        {
            if (collectionChangedInfo.ChangeType == eCollectionChangeType.Adding || collectionChangedInfo.ChangeType == eCollectionChangeType.Removing ||
                collectionChangedInfo.ChangeType == eCollectionChangeType.Clearing)
            {
                if (collectionChangedInfo.Removed != null)
                {
                    foreach (VisualItem item in collectionChangedInfo.Removed)
                        item.Parent = null;
                }
                if (collectionChangedInfo.ChangeType == eCollectionChangeType.Clearing)
                {
                    foreach (VisualItem item in this.Items)
                        item.Parent = null;
                }

                if (collectionChangedInfo.Added != null)
                {
                    foreach (VisualItem item in collectionChangedInfo.Added)
                    {
                        if (item.Parent != null && item.Parent != this)
                        {
                            item.Parent.Items.Remove(item);
                        }
                        item.Parent = this;
后面还有 452 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。