Mercurial > hg > Applications > AliceVNC
changeset 7:4faa4619a02f
refactor
author | YU |
---|---|
date | Thu, 18 Sep 2014 21:04:29 +0900 |
parents | e68415fd0a1f |
children | 7c7a9b23c291 |
files | src/main/java/jp/ac/u_ryukyu/alicevnc/AliceVNC.java src/main/java/jp/ac/u_ryukyu/alicevnc/StartVNCServer.java |
diffstat | 2 files changed, 23 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/AliceVNC.java Thu Sep 18 21:04:07 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/AliceVNC.java Thu Sep 18 21:04:29 2014 +0900 @@ -1,11 +1,5 @@ package jp.ac.u_ryukyu.alicevnc; -import javax.swing.SwingUtilities; - -import com.glavsoft.viewer.Viewer; -import com.glavsoft.viewer.cli.Parser; -import com.glavsoft.viewer.swing.ParametersHandler; - import alice.codesegment.CodeSegment; public class AliceVNC extends CodeSegment { @@ -19,14 +13,8 @@ public void run() { if (conf.getProxyFlag()){ - Parser parser = new Parser(); - ParametersHandler.completeParserOptions(parser); - if (parser.isSet(ParametersHandler.ARG_HELP)) { - System.exit(0); - } - Viewer viewer = new Viewer(parser); - SwingUtilities.invokeLater(viewer); - + + new StartVNCServer(); new ReceiveServerInitMessage(); } if (conf.getViewerFlag()){
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/StartVNCServer.java Thu Sep 18 21:04:29 2014 +0900 @@ -0,0 +1,21 @@ +package jp.ac.u_ryukyu.alicevnc; + +import com.glavsoft.viewer.Viewer; + +import alice.codesegment.CodeSegment; +import alice.datasegment.CommandType; +import alice.datasegment.Receiver; + +public class StartVNCServer extends CodeSegment { + private Receiver info = ids.create(CommandType.PEEK); + + public StartVNCServer(){ + info.setKey("host"); + } + public void run() { + String[] args = {}; + Viewer.main(args); + + } + +}