// Token: 0x060015ED RID: 5613 RVA: 0x00083838 File Offset: 0x00081C38
        public void split(ESleek2PartitionDirection direction, out Sleek2WindowPartition originalPartition, out Sleek2WindowPartition newPartition)
        {
            originalPartition = null;
            newPartition      = null;
            this.separator    = new Sleek2Separator();
            this.addElement(this.separator);
            this.separator.handle.value = 0.5f;
            switch (direction)
            {
            case ESleek2PartitionDirection.UP:
                this.a                   = new Sleek2WindowPartition(this.dock);
                this.b                   = new Sleek2WindowPartition();
                originalPartition        = this.a;
                newPartition             = this.b;
                this.separator.direction = Separator.EDirection.VERTICAL;
                break;

            case ESleek2PartitionDirection.RIGHT:
                this.a                   = new Sleek2WindowPartition(this.dock);
                this.b                   = new Sleek2WindowPartition();
                originalPartition        = this.a;
                newPartition             = this.b;
                this.separator.direction = Separator.EDirection.HORIZONTAL;
                break;

            case ESleek2PartitionDirection.DOWN:
                this.a                   = new Sleek2WindowPartition();
                this.b                   = new Sleek2WindowPartition(this.dock);
                newPartition             = this.a;
                originalPartition        = this.b;
                this.separator.direction = Separator.EDirection.VERTICAL;
                break;

            case ESleek2PartitionDirection.LEFT:
                this.a                   = new Sleek2WindowPartition();
                this.b                   = new Sleek2WindowPartition(this.dock);
                newPartition             = this.a;
                originalPartition        = this.b;
                this.separator.direction = Separator.EDirection.HORIZONTAL;
                break;
            }
            this.addElement(this.a);
            this.addElement(this.b);
            this.a.emptied                += this.handlePartitionEmptied;
            this.b.emptied                += this.handlePartitionEmptied;
            this.separator.handle.a        = this.a.transform;
            this.separator.handle.b        = this.b.transform;
            this.separator.handle.aActive  = true;
            this.separator.handle.bActive  = true;
            this.dock.dockedWindowRemoved -= this.handleDockedWindowRemoved;
            this.dock = null;
        }
        // Token: 0x060015EE RID: 5614 RVA: 0x00083A48 File Offset: 0x00081E48
        protected virtual void handlePartitionEmptied(Sleek2WindowPartition partition)
        {
            Sleek2WindowPartition sleek2WindowPartition;

            if (partition == this.a)
            {
                sleek2WindowPartition = this.b;
            }
            else
            {
                sleek2WindowPartition = this.a;
            }
            this.dock = sleek2WindowPartition.dock;
            if (this.dock != null)
            {
                this.dock.partition            = this;
                this.dock.transform.anchorMin  = Vector2.zero;
                this.dock.transform.anchorMax  = Vector2.one;
                this.dock.transform.offsetMin  = Vector2.zero;
                this.dock.transform.offsetMax  = Vector2.zero;
                this.dock.dockedWindowRemoved += this.handleDockedWindowRemoved;
                this.addElement(this.dock);
                this.a.emptied -= this.handlePartitionEmptied;
                this.b.emptied -= this.handlePartitionEmptied;
                this.a.destroy();
                this.b.destroy();
                this.separator.destroy();
            }
            else
            {
                this.a.emptied -= this.handlePartitionEmptied;
                this.b.emptied -= this.handlePartitionEmptied;
                partition.destroy();
                this.separator.destroy();
                this.a = sleek2WindowPartition.a;
                this.b = sleek2WindowPartition.b;
                this.addElement(this.a);
                this.addElement(this.b);
                this.a.emptied -= sleek2WindowPartition.handlePartitionEmptied;
                this.b.emptied -= sleek2WindowPartition.handlePartitionEmptied;
                this.a.emptied += this.handlePartitionEmptied;
                this.b.emptied += this.handlePartitionEmptied;
                this.separator  = sleek2WindowPartition.separator;
                this.addElement(this.separator);
                sleek2WindowPartition.separator = null;
                sleek2WindowPartition.a         = null;
                sleek2WindowPartition.b         = null;
                sleek2WindowPartition.destroy();
            }
        }