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>()); }
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; }
public void Changed(OperationNodeViewModel model) { }
public void OnTreeViewItemDoubleClick(OperationNodeViewModel nodeViewModel) { if (nodeViewModel == null || nodeViewModel.OperationType == OperationType.None) { return; } GenerateFileContent(nodeViewModel.Name, nodeViewModel.OperationType); }