# HG changeset patch # User one # Date 1319182847 -32400 # Node ID 57904d72fc092ea128f3aab5e6cef0d42c0c1606 # Parent 4ee9cfadd8dc6fdf548d8369cdacfb584688bd85 update diff -r 4ee9cfadd8dc -r 57904d72fc09 src/myVncProxy/AcceptClient.java --- a/src/myVncProxy/AcceptClient.java Mon Sep 12 16:36:40 2011 +0900 +++ b/src/myVncProxy/AcceptClient.java Fri Oct 21 16:40:47 2011 +0900 @@ -23,6 +23,7 @@ this.name = name; } + public AcceptClient() { new CreateThread(this); } diff -r 4ee9cfadd8dc -r 57904d72fc09 src/myVncProxy/VncProxyService.java --- a/src/myVncProxy/VncProxyService.java Mon Sep 12 16:36:40 2011 +0900 +++ b/src/myVncProxy/VncProxyService.java Fri Oct 21 16:40:47 2011 +0900 @@ -9,7 +9,7 @@ public static void main(String[] argv) { VncProxyService v = new VncProxyService(); - v.checkArgs(argv); + //v.checkArgs(argv); v.mainArgs = argv; @@ -29,6 +29,7 @@ Thread clientThread; CreateThread geth; AcceptClient acc; + private TextBox getHost; Frame vncFrame; Container vncContainer; @@ -201,7 +202,11 @@ // void connectAndAuthenticate() throws Exception { - acc = new AcceptClient(mainArgs[0]); + if(mainArgs.length==0) + acc = new AcceptClient(getHost.getAddress()); + //acc = new AcceptClient(); + else + acc = new AcceptClient(mainArgs[0]); geth = new CreateThread(acc , echoPort); Thread thread = new Thread(geth); thread.start(); @@ -283,7 +288,11 @@ vncContainer.remove(authPanel); */ showConnectionStatus("ask password..."); - String pw = mainArgs[2]; + String pw; + if(mainArgs.length!=0) + pw = mainArgs[2]; + else + pw = getHost.getPassword(); return pw; } @@ -537,10 +546,17 @@ // void readParameters() { - - host = mainArgs[0]; + if(mainArgs.length==0){ + getHost = new TextBox(); + getHost.ipRegister(); + host = getHost.getAddress(); + } else { + host = mainArgs[0]; + } + if(mainArgs.length < 2){ - port = 5900; + port = Integer.parseInt(getHost.getPort()); +// port = 5900; }else{ port = Integer.parseInt(mainArgs[1]); } @@ -590,8 +606,12 @@ // private void readPasswordParameters() { + String encPasswordParam; // String encPasswordParam = readParameter("ENCPASSWORD", false); - String encPasswordParam = mainArgs[2]; + if(mainArgs.length!=0) + encPasswordParam = mainArgs[2]; + else + encPasswordParam = getHost.getPassword(); if (encPasswordParam == null) { // passwordParam = readParameter("PASSWORD", false);