Esempio n. 1
0
        public Composition Find(DockablePane pane)
        {
            if (!_isInited)
            {
                return(null);
            }

            Composition terminalComposition = null;

            if (CompositionType.Terminal == _type)
            {
                if (_attachedPane.Equals(pane))
                {
                    terminalComposition = this;
                }
            }
            else
            {
                // find relative terminal element index
                for (int index = 0; index < _children.Count; ++index)
                {
                    Composition currentComposition = _children[index];
                    terminalComposition = currentComposition.Find(pane);
                    if (null != terminalComposition)
                    {
                        break;
                    }
                }
            }

            return(terminalComposition);
        }