Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        private void Disconnect()
        {
            _TfsService = null;

            buttonConectar.Text   = LBL_CONECTAR;
            buttonProximo.Enabled = false;
            textBoxUrl.Enabled    = true;

            ClearProjectsAndCollectionsList();
        }