예제 #1
0
            private Pipeline(IPipelineViewServices c, ProjectDOM.Pipeline p)
            {
                _Parent      = c;
                _PipelineDom = p;

                ClearCurrentCmd       = new RelayCommand(_ClearCurrentRootNode, arg => this.IsInstanced && !this.IsChildConfiguration);
                SetCurrentEmptyCmd    = new RelayCommand(() => {}, arg => false); // this command is disabled because it only makes sense for child configurations, and root's don'g have per-cfg values
                SetCurrentValueCmd    = new RelayCommand(_SetCurrentRootNode, arg => this.IsEmpty && !this.IsChildConfiguration);
                ViewCurrentPreviewCmd = new RelayCommand(() => { if (Content is Node node)
                                                                 {
                                                                     node.SetAsCurrentResultView();
                                                                 }
                                                         }, arg => IsInstanced);
            }
예제 #2
0
            public static Pipeline Create(IPipelineViewServices c, ProjectDOM.Pipeline p)
            {
                if (c == null)
                {
                    return(null);
                }
                if (p == null)
                {
                    return(null);
                }

                var pp = new Pipeline(c, p);

                pp.UpdateGraph();

                return(pp);
            }