Changeset 382 in tmcsimulator for trunk/src/tmcsim/simulationmanager/SimulationManager.java
- Timestamp:
- 04/17/2019 04:15:29 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/simulationmanager/SimulationManager.java
r47 r382 215 215 System.setProperty("CONFIG_DIR", "config"); 216 216 } 217 217 SimulationManager app; 218 218 try 219 219 { 220 220 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 221 new SimulationManager(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + CONFIG_FILE_NAME); 221 app = new SimulationManager(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + CONFIG_FILE_NAME); 222 // Check if a script filename has been given as an argument 223 String arg1; 224 if (args.length > 0) 225 { 226 arg1 = args[0]; 227 File scriptFile = new File("scripts"+ System.getProperty("file.separator") + arg1); 228 if (scriptFile.exists()) 229 { 230 app.loadScript(scriptFile); 231 simManLogger.logp(Level.INFO,"SimulationManager","Main", 232 "Sim Mgr starting with script file: " + arg1 + "."); 233 } 234 else 235 { 236 simManLogger.logp(Level.INFO,"SimulationManager","Main", 237 "Script file not found: " + arg1 + 238 ". Starting with no script."); 239 } 240 } 222 241 } catch (Exception e) 223 242 { … … 230 249 System.exit(-1); 231 250 } 232 233 251 } 234 252 }
Note: See TracChangeset
for help on using the changeset viewer.
