private void Connect() { _TfsService = new TFSService(textBoxUrl.Text); listViewCollections.Items.Clear(); listViewProjetos.Items.Clear(); try { foreach (Collection c in _TfsService.GetCollections()) { listViewCollections.Items.Add(c.Name); } buttonConectar.Text = LBL_DESCONECTAR; buttonConectar.Enabled = false; textBoxUrl.Enabled = false; ProcessSelectProjectsTab(); } catch (Exception ex) { ShowErrorMessage($"Erro ao conectar: {ex.Message}"); Disconnect(); } finally { buttonConectar.Enabled = true; } }
private void Disconnect() { _TfsService = null; buttonConectar.Text = LBL_CONECTAR; buttonProximo.Enabled = false; textBoxUrl.Enabled = true; ClearProjectsAndCollectionsList(); }