Exemple #1
0
        public static OnkaChannelName GetChannelName(string name)
        {
            OnkaChannelName channelName = new OnkaChannelName();

            try
            {
                var index = name.IndexOf(" 00x");
                if (index > 0)
                {
                    var a = name.Substring(0, index);
                    var b = name.Substring(index + 2);
                    channelName.Name         = ToChar(a);
                    channelName.Suffix       = ToChar(b);
                    channelName.NameLength   = index;
                    channelName.SuffixLength = name.Length - index;
                }
                else
                {
                    channelName.Name       = ToChar(name);
                    channelName.NameLength = name.Length;
                }
            }
            catch (Exception ex)
            {
            }
            return(channelName);
        }
Exemple #2
0
        public static string SetChannelName(OnkaChannelName channelName)
        {
            var txt = SetChannelName(channelName.Name, channelName.NameLength);

            if (channelName.SuffixLength > 0)
            {
                txt += " 0" + SetChannelName(channelName.Suffix, channelName.SuffixLength);
            }
            return(txt);
        }