Beispiel #1
0
        private void CreateNewRegion(IScene scene, string[] cmd)
        {
            ISimulationDataStore store = m_selectedDataService.Copy();

            StartRegion(store, store.CreateNewRegion(m_SimBase));

            foreach (ISimulationDataStore st in m_simulationDataServices)
            {
                st.ForceBackup();
            }
        }
Beispiel #2
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);
            }
        }