Esempio n. 1
0
        private void Add()
        {
            int y = 0;

            string oldRepositoryIDs = string.Empty;

            foreach (Repository s in repository)
            {
                oldRepositoryIDs += s.Id + "E";
            }

            do
            {
                y++;
            }while (oldRepositoryIDs.Contains("R" + y.ToString() + "E"));

            string repositoryID = "R" + y.ToString();

            Repository newRepository = new Repository(repositoryID, "", "");

            repository.Add(newRepository);
            repository.OnContentChanged();
        }