public RegistryEntry(EightCC inValue, string inName, string inDescription) { Value = inValue; if (string.IsNullOrEmpty(inName)) { Display = Value.ToString(); if (string.IsNullOrEmpty(inDescription)) { Tooltip = Display; } else { Tooltip = Display + "\n- " + inDescription; } } else { Display = inName + " [" + Value.ToString() + "]"; if (string.IsNullOrEmpty(inDescription)) { Tooltip = Display; } else { Tooltip = Display + "\n- " + inDescription; } } }
public void AddEntry(EightCC inCode, string inName, string inDescription) { RegistryEntry entry; if (m_EntryMap.TryGetValue(inCode, out entry)) { throw new ArgumentException("EightCC with code " + inCode.ToString() + " has already been registered", "inCode"); } entry = new RegistryEntry(inCode, inName, inDescription); m_EntryList.Add(entry); m_EntryMap.Add(inCode, entry); }