private void voiceButton_Click(object sender, EventArgs e) { if (cool()) { lock (LoxyPants) { if (selectedTicklet != null) { voiceButton.Enabled = false; int id = selectedTicklet.getID(); int inPort = 5555; int outPort = 6666; String messageString = id + " " + inPort + " " + outPort; sendMessageToServer(new Message("DesireVoice", messageString)); } } setCooldown(); } axRDPViewer1.Focus(); }
private void SelectTicklet(Ticklet t) { selectedTicklet = t; if (t != null) { Action SetText = () => { tickletSelectionBox.Text = "ID: " + t.getID() + " Connection:" + t.getConnectionString(); }; this.Invoke(SetText); } else { Action SetText = () => { tickletSelectionBox.Text = "no ticklet selected"; }; this.Invoke(SetText); } }