void Delete() { if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToDelete, "API URL") == DialogResult.Yes) { if (!string.IsNullOrWhiteSpace(txtSite.Text) && !string.IsNullOrWhiteSpace(txtPage.Text) && !string.IsNullOrWhiteSpace(txtMessage.Text) && !string.IsNullOrWhiteSpace(txtMobile.Text)) { using (GetAPI api = new GetAPI()) { api.Delete(SetupURLLink(true), ref MsgReturned); SystemProperties.ShowMessage.MessageInformation(MsgReturned, "API URL"); } } else { SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.SelectFirst + " delete", "API URL"); } } LoadURLLink(); }