public override UserControl CreateTopicElement(Topic topic)
        {
            UserControl topicEl = new NormalTopicElementUC();
            topicEl.DataContext = new TopicElementUCVM(topic);

            return topicEl;
        }
 public TopicDisplayWorker(DisplayTopicFactory factory, Topic topic, ITopicConnection connectionType, Panel panel)
 {
     _panel = panel;
     _topic = topic;
     _factory = factory;
     _topicElement = _factory.CreateTopicElement(topic);
     _topicPointerElement = _factory.CreatePointerElement(connectionType, topic.Pointer);
 }
 public override void DisplayTopicElement(Panel panel, Topic topic, UserControl topicElement)
 {
     Canvas.SetLeft(topicElement, topic.Location.X);
     Canvas.SetTop(topicElement, topic.Location.Y);
     panel.Children.Add(topicElement);
 }
Exemplo n.º 4
0
 private void DisplayTopic(Topic t)
 {
     TopicDisplayWorker worker = new TopicDisplayWorker(new NormalStyleTopicFactory(), t, new LineConnection(), MapCanvas);
     worker.DisplayTopic();
 }
 public TopicElementUCVM(Topic topic)
 {
     _topic = topic;
 }
 public abstract void DisplayTopicElement(Panel panel, Topic topic, UserControl topicElement);
 public abstract UserControl CreateTopicElement(Topic topic);