Пример #1
0
        private void CreateDefinitionGraph()
        {
            _definitionGraph = new WFDefinitionGraph(true);

            foreach (var state in WFDefinition.StateDefinitions)
            {
                _definitionGraph.AddVertex(ToStateDefinitionViewModel(state));
            }

            foreach (var change in WFDefinition.StateDefinitions.SelectMany(sd => sd.StateChanges))
            {
                foreach (wf.StateDefinition dest in change.NextStates)
                {
                    _definitionGraph.AddEdge(new TaggedEdge <StateDefinitionGraphViewModel, StateChangeGraphViewModel>(ToStateDefinitionViewModel(change.StateDefinition), ToStateDefinitionViewModel(dest), ToStateChangeViewModel(change)));
                }
            }
        }
Пример #2
0
 private void ResetDefinitionGraph()
 {
     _definitionGraph = null;
     OnPropertyChanged("DefinitionGraph");
 }