Esempio n. 1
0
        public override string ToString()
        {
            var str = JenkIndex.TryGetString(Hash);

            if (!string.IsNullOrEmpty(str))
            {
                return(str);
            }
            if (MetaNames.TryGetString(Hash, out str))
            {
                return(str);
            }
            return(GlobalText.GetString(Hash));
        }
Esempio n. 2
0
        private string GetRelDataTitleString(RelData item)
        {
            if (item == null)
            {
                return("");
            }
            var h   = item.NameHash;
            var str = JenkIndex.TryGetString(h);

            if (string.IsNullOrEmpty(str))
            {
                str = GlobalText.TryGetString(h);                           //is this necessary?
            }
            if (string.IsNullOrEmpty(str))
            {
                MetaNames.TryGetString(h, out str);
            }
            if (string.IsNullOrEmpty(str))
            {
                str = h.Hex;
            }
            var typeid = item.TypeID.ToString();
            var rel    = item.Rel;

            if (rel != null)
            {
                switch (rel.RelType)
                {
                case RelDatFileType.Dat54DataEntries:
                    typeid = ((Dat54SoundType)item.TypeID).ToString();
                    break;

                case RelDatFileType.Dat149:
                case RelDatFileType.Dat150:
                case RelDatFileType.Dat151:
                    typeid = ((Dat151RelType)item.TypeID).ToString();
                    break;

                case RelDatFileType.Dat4:
                    if (rel.IsAudioConfig)
                    {
                        typeid = ((Dat4ConfigType)item.TypeID).ToString();
                    }
                    else
                    {
                        typeid = ((Dat4SpeechType)item.TypeID).ToString();
                    }
                    break;

                case RelDatFileType.Dat10ModularSynth:
                    typeid = ((Dat10RelType)item.TypeID).ToString();
                    break;

                case RelDatFileType.Dat15DynamicMixer:
                    typeid = ((Dat15RelType)item.TypeID).ToString();
                    break;

                case RelDatFileType.Dat16Curves:
                    typeid = ((Dat16RelType)item.TypeID).ToString();
                    break;

                case RelDatFileType.Dat22Categories:
                    typeid = ((Dat22RelType)item.TypeID).ToString();
                    break;

                default:
                    break;
                }
            }
            return(str + " : " + typeid);
        }