Last change
on this file since 1305 was
193,
checked in by Maciej Komosinski, 11 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
806 bytes
|
Line | |
---|
1 | package ec.display; |
---|
2 | |
---|
3 | import java.io.File; |
---|
4 | |
---|
5 | import ec.display.Console; |
---|
6 | |
---|
7 | public class CommandLineConsoleWrapper { |
---|
8 | |
---|
9 | public static void main(String[] args) { |
---|
10 | if (args.length > 0) { |
---|
11 | String file = args[0]; |
---|
12 | String[] restArgs = new String[args.length - 1]; |
---|
13 | for (int i = 1; i < args.length; i++) { |
---|
14 | restArgs[i - 1] = args[i]; |
---|
15 | } |
---|
16 | |
---|
17 | Console application = new Console(restArgs); |
---|
18 | application.setVisible(true); |
---|
19 | openFile(application, file); |
---|
20 | } else { |
---|
21 | Console application = new Console(args); |
---|
22 | application.setVisible(true); |
---|
23 | } |
---|
24 | } |
---|
25 | |
---|
26 | private static void openFile(Console application, String file) { |
---|
27 | File f = new File(file); |
---|
28 | application.loadParameters(f); |
---|
29 | application.playButton.setEnabled(true); |
---|
30 | application.stepButton.setEnabled(true); |
---|
31 | application.conPanel.enableControls(); |
---|
32 | } |
---|
33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.