private void TelaPesquisarPaciente_Load(object sender, EventArgs e) { comboUF.DataSource = ClinicaUtils.UF_LIST; ClinicaService service = new ClinicaService(); comboConvenio.DataSource = new BindingList <Convenio>(service.ListarConvenio(new Convenio())); comboConvenio.DisplayMember = @"Descricao"; //Carregamento dos dados ClinicaXmlUtils.Create(); _pesquisarPaciente = ClinicaXmlUtils.GetPesquisarPaciente(); if (_pesquisarPaciente != null) { txtFiltroNome.Text = _pesquisarPaciente.PesquisarNome; maskedFiltroCPF.Text = _pesquisarPaciente.PesquisarCPF; CarregarListView(); //Informando a linha selecionada da ListView if (_pesquisarPaciente.LinhaSelecionada.HasValue) { listViewPacientes.Items[_pesquisarPaciente.LinhaSelecionada.Value].Selected = true; } CarregarEditar(_pesquisarPaciente.Paciente); } else { _pesquisarPaciente = new PesquisarPaciente(); } _threadSalvarDados = new Thread(SalvarDados); _threadSalvarDados.Start(); }