Пример #1
0
        void LoadPackageSources()
        {
            ClearPackageSources();

            for (int index = 0; index < viewModel.PackageSources.Count; ++index)
            {
                SourceRepositoryViewModel packageSource = viewModel.PackageSources [index];
                packageSourcesComboBox.InsertText(index, packageSource.Name);
            }

            packageSourcesComboBox.Active = GetActivePackageSourceIndexFromViewModel();
        }
Пример #2
0
        SourceRepositoryViewModel GetActivePackageSource()
        {
            if (packageSources == null)
            {
                return(null);
            }

            if (!String.IsNullOrEmpty(packageSourceProvider.ActivePackageSourceName))
            {
                SourceRepositoryViewModel packageSource = packageSources
                                                          .FirstOrDefault(viewModel => String.Equals(viewModel.PackageSource.Name, packageSourceProvider.ActivePackageSourceName, StringComparison.CurrentCultureIgnoreCase));
                if (packageSource != null)
                {
                    return(packageSource);
                }
            }

            return(packageSources.FirstOrDefault(packageSource => !packageSource.IsAggregate));
        }
Пример #3
0
 void AddPackageSourceToComboBox(SourceRepositoryViewModel packageSource)
 {
     packageSourceComboBox.Items.Add(packageSource, packageSource.Name);
 }
 public void ReloadSettings()
 {
     selectedPackageSource = null;
     packageSources        = null;
     packageSourceProvider = null;
 }
		void AddPackageSourceToComboBox (SourceRepositoryViewModel packageSource)
		{
			packageSourceComboBox.Items.Add (packageSource, packageSource.Name);
		}