private void BTC_ButtonClicked(Packets.IS_BTC BTC)
{
try
{
switch (BTC.ClickID)
{
case 2:
<delete button 2>
<display new button>
break;
case 3:
<delete button 3>
<display new button>
break;
case 4:
<delete button 4>
<display new button>
break;
case 7: // Close button
<delete all buttons>
break;
}
}
}
b1.setRequestInfo((byte)(1));
b1.setClickId(BTN_ID);
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On
// tracking HashMaps
Map<Byte, Connection> connections = new HashMap<Byte, Connection>();
Map<Byte, Player> players = new HashMap<Byte, Player>();
// handle new connections
if (pck instanceof NewConnectionResponse)
{
if (!connections.containsKey(connid))
{
connections.put(connid, new Connection(connid, ncr.isAdmin(), username));
}
}
// handle new players
if (pck instanceof NewPlayerResponse)
{
if (!players.containsKey(plyid))
{
players.put(plyid, new Player(npr, (Connection)connections.get(connid), b));
}
}
// request for connection info
client.send(new TinyRequest(Tiny.ALL_CONNECTIONS));
// request for player info
client.send(new TinyRequest(Tiny.ALL_PLAYERS));
File pathfile = new File("c:/temp/AS1.pth");
if (!pathfile.exists()) System.exit(0);
FileInputStream fi = new FileInputStream(pathfile);
DataInputStream di = new DataInputStream(fi);
byte[] bLFSPTH = new byte[6];
di.read(bLFSPTH, 0, 6);
String _LFSPTH = new String(bLFSPTH);
// _LFSPTH must match LFSPTH
if (!_LFSPTH.equals("LFSPTH")) System.exit(0);
// version header
byte version = di.readByte();
if (version > 0) System.exit(0);
// revision header
byte revision = di.readByte();
if (revision > 0) System.exit(0);
// number of nodes
int nodes = di.readInt();
...