示例#1
0
        private static void PurifyLocation(MySubGraph <Location> locationSubGraph)
        {
            var initItem = locationSubGraph.Vertices.FirstOrDefault(location => location.Generated == Generated.True);

            if (initItem != null)
            {
                locationSubGraph.RemoveVertex(initItem);
            }
        }
示例#2
0
        public void CreateNewLocation()
        {
            if (_graph.SubGraphs.Any(subgraph => subgraph.Label == NewLocationName))
            {
                return;
            }

            var subGraph = new MySubGraph <Location> {
                Label = NewLocationName
            };

            subGraph.AddVertex(new Location("?", Generated.True));

            _graph.AddSubGraph(subGraph);

            OnPropertyChanged("LocationNames");
        }