private async void button1_Click(object sender, EventArgs e) { if (WebFile.HasInternet()) { textBox1.ReadOnly = true; textBox2.ReadOnly = true; button1.Enabled = false; button2.Enabled = false; button1.Text = "Enviando..."; Cursor = Cursors.WaitCursor; await Relatório.EnviarErro(textBox1.Text, textBox2.Text, anexo); Close(); } else { MessageBox.Show("Sem conexão com a internet,\r\npor favor tente mais tarde.", "Carta de Cotação", MessageBoxButtons.OK, MessageBoxIcon.Error); } }