5 ChatConnection connection;
10 background = activeBorder;
11 borderStyle = sizable;
17 EditBox log { this, size = { 598, 323 }, position = { 16, 56 }, multiLine = true };
18 EditBox serverAddress { this, contents = "localhost", size = { 182, 27 }, position = { 360, 16 } };
21 this, text = "Connect", position = { 560, 24 };
23 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
25 connection = ChatConnection
27 void NotifyMessage(String msg)
29 form1.log.PutS(" < ");
34 void OnDisconnect(int code)
36 DCOMClientObject::OnDisconnect(code);
38 form1.btnSend.disabled = true;
41 if(connection.Connect(serverAddress.contents, 1494))
44 btnSend.disabled = false;
51 this, text = "Host", position = { 32, 16 };
53 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
59 EditBox message { this, size = { 510, 43 }, position = { 16, 400 } };
62 this, text = "Send", isDefault = true, size = { 60, 37 }, position = { 552, 400 };
65 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
68 SendBackMessage(message.contents);
70 connection.SendMessage(message.contents);
72 log.PutS(message.contents);
82 DCOMService chatService { port = 1494 };