1
|
1 package jp.ac.u_ryukyu.alicevnc;
|
|
2
|
|
3 import javax.swing.SwingUtilities;
|
|
4
|
|
5 import com.glavsoft.viewer.Viewer;
|
|
6 import com.glavsoft.viewer.cli.Parser;
|
|
7 import com.glavsoft.viewer.swing.ParametersHandler;
|
|
8
|
|
9 import alice.codesegment.CodeSegment;
|
|
10
|
|
11 public class AliceVNC extends CodeSegment {
|
|
12
|
|
13 private AliceVNCConfig conf;
|
|
14
|
|
15 public AliceVNC(AliceVNCConfig conf) {
|
|
16 this.conf = conf;
|
|
17 }
|
|
18
|
|
19 public void run() {
|
|
20
|
|
21 if (conf.getProxyFlag()){
|
|
22 Parser parser = new Parser();
|
|
23 ParametersHandler.completeParserOptions(parser);
|
|
24 if (parser.isSet(ParametersHandler.ARG_HELP)) {
|
|
25 System.exit(0);
|
|
26 }
|
|
27 Viewer viewer = new Viewer(parser);
|
|
28 SwingUtilities.invokeLater(viewer);
|
|
29
|
|
30 }
|
|
31 if (conf.getViewerFlag()){
|
|
32
|
|
33 }
|
|
34
|
|
35 new ReceiveServerInitMessage();
|
|
36 }
|
|
37
|
|
38 }
|