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; }
private void Continue_Click(object sender, System.EventArgs e) { SelectedUniversity = (University)_cmBoxUni.SelectedItem; this.Dispose(); }
public void Remove(University uniLib) { _list.Remove(uniLib); }
/// <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; }
public void Add(University uniLib) { _list.Add(uniLib); }