Example #1
0
            // Methods
            public LogicalViewModelNode(
                LogicalViewModel viewModel,
                IProductElementViewModel root,
                ObservableCollection <IProductElementViewModel> children
                )
            {
                this.IsExpanded = true;
                this.ViewModel  = viewModel;
                WireInnerViewModel(root);

                if (children != null)
                {
                    Func <IProductElementViewModel, LogicalViewModelNode> LogicalViewCreator = n =>
                    {
                        return(new LogicalViewModelNode(viewModel, n, null));
                    };
                    this.LogicalViewNodes = new ObservableCollection <LogicalViewModelNode>(children.Select(n => LogicalViewCreator(n)));
                }
                else
                {
                    this.LogicalViewNodes = new ObservableCollection <LogicalViewModel.LogicalViewModelNode>();
                }

                if (!viewModel.IsMasterView)
                {
                    this.RemoveDeleteMenuItem();
                }
            }
Example #2
0
            // Methods
            public LogicalViewModelNode(
                LogicalViewModel viewModel,
                IProductElementViewModel root,
                ObservableCollection<IProductElementViewModel> children
                )
            {
                this.IsExpanded = true;
                this.ViewModel = viewModel;
                WireInnerViewModel(root);

                if (children != null)
                {
                    Func<IProductElementViewModel, LogicalViewModelNode> LogicalViewCreator = n =>
                        {
                            return new LogicalViewModelNode(viewModel, n, null);
                        };
                    this.LogicalViewNodes = new ObservableCollection<LogicalViewModelNode>(children.Select(n => LogicalViewCreator(n)));
                }
                else
                {
                    this.LogicalViewNodes = new ObservableCollection<LogicalViewModel.LogicalViewModelNode>();
                }

                if (!viewModel.IsMasterView)
                {
                    this.RemoveDeleteMenuItem();
                }
            }