public ColorSetUpFrom(IGeoProvider provider, ITrafficMap map, ITrafficEvent trafficEvent, bool visible) { this.InitializeComponent(); this.m_GeoProvider = provider; this.m_TrafficEvent = trafficEvent; this.m_TrafficMap = map; this.m_BindingPolygons = TrafficMapView.GetSelectedPolygon(map); this.m_NodeVisible = visible; }
public bool AddEnvTrafficMap(ITrafficMap map) { EnvTrafficMap map2 = map as EnvTrafficMap; if (!this.m_TrafficMapModelService.EnvTrafficMapMgr.AddEnvTrafficMap(map2)) { return false; } this.CreateNewNodeAndSetTag(map2.Name, 0, this.m_TrafficMapView.contextMenuChild); this.SetParentNodeChecked(); return true; }
public bool AddCellTrafficMap(ITrafficMap cellMap) { CellTrafficMap map = cellMap as CellTrafficMap; if (!this.m_TrafficMapModelService.CellTrafficMapMgr.AddTrafficMap(map)) { return false; } this.CreateNewNodeAndSetTag(map.Name, 2, this.m_TrafficMapView.contextMenuStrip1); this.SetParentNodeChecked(); return true; }
public bool AddNewVectTrafficMap(ITrafficMap vectorMap) { VectorTrafficMap vectorTrafficMap = vectorMap as VectorTrafficMap; this.setGeoPropertyToVectorMap(vectorTrafficMap); this.setUserProfileMobilityToVectorpMap(vectorTrafficMap); if (!this.m_TrafficMapModelService.VectorTrafficMapMgr.AddVectorTrafficMap(vectorTrafficMap)) { return false; } this.CreateNewNodeAndSetTag(vectorTrafficMap.Name, 1, this.m_TrafficMapView.contextMenuChild); this.SetParentNodeChecked(); return true; }
private void MinusMobilityAndTerminalCount(ITrafficMap deleteMap) { CellTrafficMap map = deleteMap as CellTrafficMap; foreach (KeyValuePair<Mobility, float> pair in map.MobilityDistributionDict) { Mobility key = pair.Key; key.Count--; } foreach (KeyValuePair<Terminal, float> pair2 in map.TerminalDistributionDict) { Terminal local2 = pair2.Key; local2.Count--; } }
public static List<GeoPolygonRegion> GetSelectedPolygon(ITrafficMap selectMap) { List<GeoPolygonRegion> list = new List<GeoPolygonRegion>(); if (selectMap.GetType() == typeof(EnvTrafficMap)) { list.AddRange((selectMap as EnvTrafficMap).PolygonRegionList); return list; } if (selectMap.GetType() == typeof(VectorTrafficMap)) { foreach (VectorEntity entity in (selectMap as VectorTrafficMap).SelectedVectorList) { if (VectorType.Polygon == entity.Type) { list.Add(entity.Flag as GeoPolygonRegion); } } } return list; }
public bool ModifyVectTrafficMap(string oldName, ITrafficMap vectorMap) { VectorTrafficMap vectorTrafficMap = vectorMap as VectorTrafficMap; this.setGeoPropertyToVectorMap(vectorTrafficMap); this.setUserProfileMobilityToVectorpMap(vectorTrafficMap); if (!this.m_TrafficMapModelService.VectorTrafficMapMgr.ModifyVectorTrafficMap(oldName, vectorTrafficMap)) { return false; } this.ChangeNodeText(oldName, vectorTrafficMap.Name); return true; }
public bool ModifyEnvTrafficMap(string mapName, ITrafficMap newMap) { EnvTrafficMap map = newMap as EnvTrafficMap; if (!this.m_TrafficMapModelService.EnvTrafficMapMgr.ModifyEnvTrafficMap(mapName, map)) { return false; } this.ChangeNodeText(mapName, map.Name); if (!this.getNodeState(map.Name)) { } return true; }
public bool ModifyCellTrafficMap(string cellOldMapName, ITrafficMap cellMap) { CellTrafficMap newMap = cellMap as CellTrafficMap; if (!this.m_TrafficMapModelService.CellTrafficMapMgr.MoidfyCellTrafficMap(cellOldMapName, newMap)) { return false; } this.ChangeNodeText(cellOldMapName, newMap.Name); return true; }