示例#1
0
            public RegistryEntry(FourCC 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;
                    }
                }
            }
示例#2
0
            public void AddEntry(FourCC inCode, string inName, string inDescription)
            {
                RegistryEntry entry;

                if (m_EntryMap.TryGetValue(inCode, out entry))
                {
                    throw new ArgumentException("FourCC with code " + inCode.ToString() + " has already been registered", "inCode");
                }

                entry = new RegistryEntry(inCode, inName, inDescription);
                m_EntryList.Add(entry);
                m_EntryMap.Add(inCode, entry);
            }