public void Push(Node n, Graph g, string param = null, GraphStackType type = GraphStackType.Parameter) { if (GraphDocuments.SelectedContentIndex > -1 && GraphDocuments.SelectedContentIndex < graphs.Count) { UIGraph ugraph = graphs[GraphDocuments.SelectedContentIndex]; ugraph.Push(n, g, type, param); } }
public void Push(Node n, Graph graph, GraphStackType type, string param = null) { if (graph != null) { GraphStackItem item = new GraphStackItem(); item.id = n.Id; item.node = n; item.graph = graph; item.type = type; item.parameter = param; if (!GraphStack.Contains(item)) { GraphStack.Push(item); if (!Crumbs.Contains(n.Id)) { BreadCrumb c = new BreadCrumb(Crumbs, graph.Name, this, n.Id); } } } //no need to reload if it is the same graph already if (graph == Graph) { return; } if (graph == null) { return; } Graph.OnGraphUpdated -= Graph_OnGraphUpdated; ClearView(); Graph = graph; Scale = Graph.Zoom; XShift = Graph.ShiftX; YShift = Graph.ShiftY; ZoomLevel.Text = String.Format("{0:0}", Scale * 100); Graph.OnGraphUpdated += Graph_OnGraphUpdated; ReadOnly = Graph.ReadOnly; Graph.ReadOnly = false; LoadGraphUI(); }
public void Push(Node n, GraphStackType type = GraphStackType.Pixel) { Graph graph = null; if (type == GraphStackType.Pixel) { if (n is PixelProcessorNode) { graph = (n as PixelProcessorNode).Function; } } else if (type == GraphStackType.FX) { } Push(n, graph, type); }