예제 #1
0
        /// <summary>
        /// Handles the Click event of the btnGo control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnGo_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtUrl.Text.Length == 0)
                {
                    _manifests = StrategyManager.GetAvailableManifests();
                }
                else
                {
                    ManifestCollection tmp = new ManifestCollection();
                    tmp.AddRange(RepositoryManager.GetExternalManifests(txtUrl.Text));
                    foreach (StrategyManifest mf in tmp)
                    {
                        mf.PackageName = String.Format("{0}@{1}", mf.PackageName, txtUrl.Text);
                    }
                    _manifests = tmp;
                }

                if (rbTree.Checked)
                {
                    PopulateTreeView();
                }
                else
                {
                    PopulateListView();
                }
            }
            catch (Exception ex)
            {
                ServiceLocator.Instance.IDEHelper.ShowError(
                    String.Format("Unable to retrieve strategies from {0} - {1}", txtUrl.Text, ex.Message));
            }
        }
예제 #2
0
 /// <summary>
 /// Initialisation de la liste des stratégies à partir de celles disponibles sur le
 /// repository central + les stratégies internes
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SelectStrategyDialog_Load(object sender, EventArgs e)
 {
     _manifests = StrategyManager.GetAvailableManifests();
     PopulateListView();
 }