Пример #1
0
        private Topic CreateTopicAndAddToMap(Map map)
        {
            TopicWorker worker = new TopicWorker(new MainTopicFactory(), map, null, new LineConnection());
            var topic = worker.GetTopic();

            topic.Name = map.Name;
            map.Topics.Add(topic);
            GeneralVM.ActiveUser.Maps.Add(map);
            GeneralVM.ActiveMaps.Add(map);
            return topic;
        }
Пример #2
0
        private void ExecuteNewTopicCommand(object parameter)
        {
            SelectedMap.MainTopic = SelectedMap.Topics[0]; //FIX!
            TopicWorker tw = new TopicWorker(new NodeTopicFactory(), SelectedMap, SelectedMap.MainTopic, new LineConnection());
            Topic t = tw.GetTopic();

            SelectedMap.Topics.Add(t);
            GeneralVm.MKDbContext.Topics.Add(t);
            GeneralVm.MKDbContext.SaveChanges();

            ActiveMapTopics.Add(t);
        }