コード例 #1
0
        private OperationNodeViewModel(OperationNode node, OperationNodeViewModel parent)
        {
            this._node = node;
            this._parent = parent;

            this._children = new ReadOnlyCollection<OperationNodeViewModel>(
                    (from child in _node.Children
                     select new OperationNodeViewModel(child, this))
                     .ToList<OperationNodeViewModel>());
        }
コード例 #2
0
        public TreeViewModel(OperationNode rootNode)
        {
            if (rootNode == null)
            {
                throw new ArgumentNullException("rootNode");
            }
            this.SelectedNodeDoubleClickedCommand = new RelayCommand<OperationNodeViewModel>(this.Changed);

            this._rootViewModel = new OperationNodeViewModel(rootNode);
            this.FirstGenerationChildren = this._rootViewModel.Children;
        }
コード例 #3
0
        public void Changed(OperationNodeViewModel model)
        {

        }
コード例 #4
0
        public void OnTreeViewItemDoubleClick(OperationNodeViewModel nodeViewModel)
        {
            if (nodeViewModel == null || nodeViewModel.OperationType == OperationType.None)
            {
                return;
            }

            GenerateFileContent(nodeViewModel.Name, nodeViewModel.OperationType);
        }