Exemplo n.º 1
0
        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);
            }
        }