private void StartMain() { if (!UseLocalMode) { String[] remote_server_port_bits = ServerHost.Text.Split(new char[] { ':' }, 2); String RemoteServer = remote_server_port_bits[0]; int RemotePort = (int)uint.Parse(remote_server_port_bits[1]); String RemoteRoom = String.Format("{0}:{1}", GameName.Text, ((ComboBoxItem)GameMap.SelectedItem).Tag); NetJungleProto = (INetProto)new LiveNetProto(RemoteServer, RemotePort, UserName.Text, ServerPassword.Password, RemoteRoom); NetJungleProto.NewNetworkMessage += new NewNetworkMessageHandler(this.OnNetworkMessage); NetJungleProto.Go(); } else { NetJungleProto = (INetProto)new MockupNetProto(); this.OnNetworkMessage(this, new NewNetworkMessageEventArgs("&CONN")); // mock a connected message this.OnNetworkMessage(this, new NewNetworkMessageEventArgs("&LOGGEDIN")); // ...and now logged in } }