Exemple #1
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            Cursor = Cursors.WaitCursor;

            if (lbApps.Items.Count > 0)
            {
                lbApps.Items.Clear();
            }

            try
            {
                lblStatus.Text = "Connecting...";
                foreach (Application app in CatalogExplorerFactory.CatalogExplorer().Applications)
                {
                    lbApps.Items.Add(app.Name);
                }
                lblStatus.Text = "Select the application(s) you wish to document.";
            }
            catch (Exception ex)
            {
                HandleException("Connect", ex);
                MessageBox.Show(string.Format("A {0} occurred connecting to the BizTalk Database: \r\n{1}", ex.GetType(),
                                              ex.Message), "Connection Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                bce.Dispose();
                Cursor = Cursors.Arrow;
            }
        }