public void StartRegions(out bool newRegion) { List <KeyValuePair <ISimulationDataStore, RegionInfo> > regions = new List <KeyValuePair <ISimulationDataStore, RegionInfo> >(); List <string> regionFiles = m_selectedDataService.FindRegionInfos(out newRegion); if (newRegion) { ISimulationDataStore store = m_selectedDataService.Copy(); regions.Add(new KeyValuePair <ISimulationDataStore, RegionInfo>(store, store.CreateNewRegion(m_SimBase))); } else { foreach (string fileName in regionFiles) { ISimulationDataStore store = m_selectedDataService.Copy(); regions.Add(new KeyValuePair <ISimulationDataStore, RegionInfo>(store, store.LoadRegionInfo(fileName, m_SimBase))); } } foreach (KeyValuePair <ISimulationDataStore, RegionInfo> kvp in regions) { StartRegion(kvp.Key, kvp.Value); } }
/// <summary> /// Gets a new copy of the simulation data store, keep one per region /// </summary> /// <returns></returns> public ISimulationDataStore GetNewSimulationDataStore() { return(m_simulationDataService.Copy()); }