public void SearchSiblings(string query)
        {
            Siblings.Clear();

            QueryResultRows <TreeItem> result;

            //if (GhostParent != null) {
            if (query.Length > 0)
            {
                result = Db.SQL <TreeItem>("SELECT i FROM TreeItem i WHERE Parent = ? AND Name LIKE ? FETCH ?", ParentItem, query + "%", 5);
            }
            else
            {
                result = Db.SQL <TreeItem>("SELECT i FROM TreeItem i WHERE Parent = ? FETCH ?", ParentItem, 5);
            }

            /*}
             * else {
             *  if (query.Length > 0) {
             *      result = Db.SQL<TreeItem>("SELECT i FROM TreeItem i WHERE Parent = ? AND NOT i = ? AND Name LIKE ? FETCH ?", ParentItem, Data, query + "%", 5);
             *  }
             *  else {
             *      result = Db.SQL<TreeItem>("SELECT i FROM TreeItem i WHERE Parent = ? AND NOT i = ? FETCH ?", ParentItem, Data, 5);
             *  }
             * }*/

            Siblings.Data = result;
        }
Beispiel #2
0
        public void Dispose()
        {
            if (_decorator != null)
            {
                _decorator.Dispose();
                _decorator = null;
            }
            if (_hightLightDecorator != null)
            {
                _hightLightDecorator.Dispose();
                _hightLightDecorator = null;
            }
            if (_cellDecorator != null)
            {
                _cellDecorator.Dispose();
                _cellDecorator = null;
            }
            if (_cellHightLightDecorator != null)
            {
                _cellHightLightDecorator.Dispose();
                _cellHightLightDecorator = null;
            }

            Table = null;
            if (Siblings != null)
            {
                Siblings.Clear();
                Siblings = null;
            }
            if (Cells != null)
            {
                foreach (var cell in Cells.ToArray())
                {
                    cell.Dispose();
                }

                Cells.Clear();
                Cells = null;
            }

            TextAlign     = null;
            TextFunc      = null;
            HighlightFunc = null;

            Hud = null;
        }
        public void SearchSiblings(string query)
        {
            Siblings.Clear();

            IEnumerable <TreeItem> result;

            if (query.Length > 0)
            {
                result = Db.SQL <TreeItem>("SELECT i FROM UniformDocs.Database.TreeItem i WHERE Parent = ? AND Name LIKE ? FETCH ?",
                                           ParentItem, query + "%", 5);
            }
            else
            {
                result = Db.SQL <TreeItem>("SELECT i FROM UniformDocs.Database.TreeItem i WHERE Parent = ? FETCH ?", ParentItem, 5);
            }

            Siblings.Data = result;
        }