private void ZDodajCallback(IAsyncResult result) { ServiceReference.Service1Client client = (ServiceReference.Service1Client)result.AsyncState; try { z = client.EndZDodaj(result); client.Close(); } catch (CommunicationException ex) { MessageBox.Show(ex.Message, "Błąd komunikacji.", MessageBoxButtons.OK, MessageBoxIcon.Error); client.Abort(); } textResponse.BeginInvoke((Action)(() => textResponse.Text = ZespolonaToString(z))); }