public static IList<UIArtifact> LoadUIArtifacts(Repository repo, Filter filter)
        {
            RepositoryService service = new RepositoryService(repo, filter);

            IList<Artifact> model_artifacts = service.LoadArtifacts();

            return LoadUIArtifacts(model_artifacts);
        }
        private void buttonOk_Click(object sender, RoutedEventArgs e)
        {
            if (textBoxLocation.Text == string.Empty)
            {
                MessageBox.Show("Locaton must not be empty!");
                return;
            }

            Repo = new Repository(
                textBoxLocation.Text,
                textboxUser.Text,
                passwordBox.Password,
                (Repository.Type) comboBoxType.SelectedValue,
                null);
            this.DialogResult = true;
            this.Close();
        }
        public RepositoryService(Repository repository, Filter filter)
        {
            if (repository.RepoType == Repository.Type.Maven)
                _client = new MavenCentralClient(repository.Location, repository.GroupIds);
            else if (repository.RepoType == Repository.Type.Artifactory)
                _client = new ArtifactoryClient(repository.Location, repository.User, repository.Password, repository.GroupIds);
            else if (repository.RepoType == Repository.Type.Local)
                _client = new LocalRepositoryClient(repository.Location);
            else if (repository.RepoType == Repository.Type.Nexus)
                _client = new NexusClient(repository.Location, repository.User, repository.Password, repository.GroupIds);
            else
                throw new ApplicationException("Unknown repository client type!");

            if (filter != null)
                _client.ItemFilter = filter;

            Repo = repository;
        }
 private void buttonCancel_Click(object sender, RoutedEventArgs e)
 {
     Repo = null;
     this.DialogResult = false;
     this.Close();
 }