Пример #1
0
        public InfoTreeViewModel(Info _rootInfo)
        {
            this.rootInfo = new InfoViewModel(_rootInfo);

            this.firstGeneration = new ReadOnlyCollection <InfoViewModel>(
                new InfoViewModel[] {
                this.rootInfo
            });
        }
Пример #2
0
        public InfoTreeViewModel(Info _rootInfo)
        {
            this.rootInfo = new InfoViewModel(_rootInfo);

            this.firstGeneration = new ReadOnlyCollection<InfoViewModel>(
                    new InfoViewModel[] {
                        this.rootInfo
                    });
        }
Пример #3
0
        private InfoViewModel(Info _info, InfoViewModel _parent)
        {
            this.info = _info;
            this.parent = _parent;

            this.children = new ReadOnlyCollection<InfoViewModel>(
                (from __child in this.info.Children
                 select new InfoViewModel(__child, this))
                 .ToList<InfoViewModel>());
        }
Пример #4
0
        private InfoViewModel(Info _info, InfoViewModel _parent)
        {
            this.info   = _info;
            this.parent = _parent;

            this.children = new ReadOnlyCollection <InfoViewModel>(
                (from __child in this.info.Children
                 select new InfoViewModel(__child, this))
                .ToList <InfoViewModel>());
        }