Ejemplo n.º 1
0
        private void EventTreePropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
            case nameof(EventTree.MainTreeEvent):
                mainTreeEventViewModel = null;
                OnPropertyChanged(nameof(MainTreeEventViewModel));
                OnPropertyChanged(nameof(Graph));
                break;

            case nameof(EventTree.Name):
                OnPropertyChanged(nameof(Name));
                break;

            case nameof(EventTree.Summary):
                OnPropertyChanged(nameof(Summary));
                break;

            case nameof(EventTree.Color):
                OnPropertyChanged(nameof(Color));
                break;

            case nameof(EventTree.NeedsSpecification):
                OnPropertyChanged(nameof(NeedsSpecification));
                break;
            }
        }
Ejemplo n.º 2
0
        private void DrawNode(TreeEventViewModel treeEventViewModel, GraphVertex parent = null)
        {
            if (treeEventViewModel == null)
            {
                return;
            }

            var vertex = new GraphVertex(treeEventViewModel);

            graph.AddVertex(vertex);
            if (parent != null)
            {
                graph.AddEdge(new TreeEventConnector(parent, vertex));
            }

            if (treeEventViewModel.FailingEvent != null)
            {
                DrawNode(treeEventViewModel.FailingEvent, vertex);
            }
            else
            {
                var lastVertex = new GraphVertex(false);
                graph.AddVertex(lastVertex);
                graph.AddEdge(new TreeEventConnector(vertex, lastVertex));
            }

            if (treeEventViewModel.PassingEvent != null)
            {
                DrawNode(treeEventViewModel.PassingEvent, vertex);
            }
            else
            {
                var lastVertex = new GraphVertex(true);
                graph.AddVertex(lastVertex);
                graph.AddEdge(new TreeEventConnector(vertex, lastVertex));
            }
        }
Ejemplo n.º 3
0
 public GraphVertex(TreeEventViewModel treeEventViewModel)
 {
     IsFailingEndPoint  = false;
     IsPassingEndPoint  = false;
     TreeEventViewModel = treeEventViewModel;
 }