private void PesquisarThread() { if (!string.IsNullOrEmpty(palavraPesquisa)) { colecaoGrid = new GridServicoColecao(); if (radio) { if (int.TryParse(palavraPesquisa, out int cod)) { GridServicoInfo grid = negocioServ.ConsultarGridServicoOs(cod); if (grid != null) { colecaoGrid.Add(grid); } } else { FormMessage.ShowMessegeWarning("Insira um valor válido!"); } } else { colecaoGrid = negocioServ.ConsultarGridServicoCliente(palavraPesquisa); } } else { colecaoGrid = negocioServ.ConsultarGridServicoDia(); } Form1.encerrarThread = true; pictureBoxLoad.Visible = false; }