Mercurial > hg > Applications > AliceVNC
view src/main/java/jp/ac/u_ryukyu/alicevnc/CheckMyName.java @ 39:dcc90f91f804
update repository version
author | sugi |
---|---|
date | Mon, 08 Dec 2014 16:43:39 +0900 |
parents | aace9df1462e |
children | 9354e8a1d03b |
line wrap: on
line source
package jp.ac.u_ryukyu.alicevnc; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class CheckMyName extends CodeSegment { private Receiver info = ids.create(CommandType.PEEK); public CheckMyName(){ info.setKey("host"); } @Override public void run() { if ("node0".equals(info.asString())) { new CreateWindow("local"); new NegotiateVNCServer(); } else { new CreateWindow("parent"); } new ReceiveAliceVNCMessage(); new SendChangeRequest(); } }