예제 #1
0
        private void InitComboBox()
        {
            ushort[] uniIDs = UniversityManager.GetUniversities();
            University[] unis = new University[uniIDs.Length];

            for (int i = 0; i < uniIDs.Length; i++)
                unis[i] = UniversityManager.GetUniversity(uniIDs[i]);

            _cmBoxUni.DataSource = unis;
        }
예제 #2
0
 private void Continue_Click(object sender, System.EventArgs e)
 {
     SelectedUniversity = (University)_cmBoxUni.SelectedItem;
     this.Dispose();
 }
예제 #3
0
 public void Remove(University uniLib)
 {
     _list.Remove(uniLib);
 }
예제 #4
0
        /// <summary>
        /// Adds a University o the UniversityManager
        /// Gets called multiple times at construction time to build the initial University-List
        /// </summary>
        /// <param name="toAdd">The University to add</param>
        /// <returns>The ID that was used to add the University</returns>
        public static ushort AddUniversity(University toAdd)
        {
            CheckInitialization();

            if (toAdd == null)
                throw new ArgumentNullException("toAdd");

            ushort newID = toAdd.ID;
            if (!IsValidID(newID) || ContainsUniversity(newID))
                newID = GenerateNewID();

            toAdd.ID = newID;
            _universities.Add(newID, toAdd);

            return toAdd.ID;
        }
예제 #5
0
 public void Add(University uniLib)
 {
     _list.Add(uniLib);
 }