示例#1
0
            bool IsChildIter(Gtk.TreeIter pit, Gtk.TreeIter cit, bool recursive)
            {
                Gtk.TreePath pitPath = tree.Store.GetPath(pit);
                Gtk.TreePath citPath = tree.Store.GetPath(cit);

                if (!citPath.Up())
                {
                    return(false);
                }

                if (citPath.Equals(pitPath))
                {
                    return(true);
                }

                return(recursive && pitPath.IsAncestor(citPath));
            }