public TimelineView(ITimelineModel model, INodeRenderer renderer) { m_model = model; m_renderer = renderer; foreach (INode node in m_model.Nodes) { Widget widget = m_renderer.Render(node); if (widget == null) throw new NotImplementedException("Renderer returned null"); widget.Show(); Console.WriteLine("{0}, {1}", node.Position.X, node.Position.Y); Put(widget, (int) node.Position.X, (int) node.Position.Y); } }
public TimelineView(ITimelineModel model, INodeRenderer renderer) { m_model = model; m_renderer = renderer; foreach (INode node in m_model.Nodes) { Widget widget = m_renderer.Render(node); if (widget == null) { throw new NotImplementedException("Renderer returned null"); } widget.Show(); Console.WriteLine("{0}, {1}", node.Position.X, node.Position.Y); Put(widget, (int)node.Position.X, (int)node.Position.Y); } }
private FeatureCollection ProcessFeatures(List <Node> nodes, List <Way> ways, List <Relation> relations) { var relationsProcessingResult = _relationsProcessor.Process(relations, ways, nodes); var inputWays = ways.Concat(relationsProcessingResult.PseudoWays).ToList(); var inputNodes = nodes.Concat(relationsProcessingResult.PseudoNodes).ToList(); var wayProcessingResult = _waysProcessor.Process(inputWays, inputNodes); inputNodes = nodes.Concat(wayProcessingResult.PseudoNodes).Concat(relationsProcessingResult.PseudoNodes).ToList(); var nodeProcessingResult = _nodesProcessor.BuildIndex(inputNodes, ways, relations); var proccessedWays = wayProcessingResult.Ways; var processedNodes = nodeProcessingResult.Nodes; var processedRelations = relationsProcessingResult.Relations; var renderedRelationFeatures = _relationRenderer.Render(processedRelations); var renderedNodeFeatures = _nodeRenderer.Render(processedNodes); var renderedWayFeatures = _waysRenderer.Render(proccessedWays); return(new FeatureCollection(renderedRelationFeatures.Concat(renderedWayFeatures).Concat(renderedNodeFeatures).ToList())); }
public string Render(INode node) { return(Renderer.Render(node)); }