Пример #1
0
 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;
 }
Пример #2
0
 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;
 }
Пример #3
0
 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;
 }
Пример #4
0
 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;
 }
Пример #5
0
 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--;
     }
 }
Пример #6
0
 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;
 }
Пример #7
0
 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;
 }
Пример #8
0
 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;
 }
Пример #9
0
 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;
 }