private void sendPetition_Click(object sender, System.EventArgs e) { WaitPanel p = new WaitPanel("Wait_04", base.Size.Width, base.Size.Height); p.setWaitPanel("Trwa generowanie wniosku", "Proszę czekać"); p.setSize(this.passwordPanel.Size); p.setLocation(this.passwordPanel.Location); base.Controls.Add(p.getPanel()); base.Controls[p.getName()].BringToFront(); p.setVisible(true); string uri = "certificates/csrwrite"; Certificate certificate = new Certificate(); certificate.generateCSR(this.ou, this.user, this.passwordCert1.Text); string postData = "csr=" + HttpUtility.UrlEncode(certificate.getCSR()) + "&token=" + HttpUtility.UrlEncode(this.token); p.setWaitPanel("Trwa wysyłanie wniosku", "Proszę czekać"); Code res = this.con.postReq(uri, postData, 0); if (res.getcode() == 0) { MessageBox.Show("Wniosek o licencje został wysłany", "Uwaga"); } else { MessageBox.Show(res.getText(), "Uwaga"); } p.setVisible(false); base.Close(); }