public string GetText(int lineIndex, CommandState state, bool flush)
        {
            var hex = new StringBuilder();

            foreach (var cc in CcData)
            {
                if (cc.Valid && cc.Type == 2)
                {
                    hex.Append($"{cc.Data1:X2}{cc.Data2:X2}");
                }
            }

            var text = Cea708.Decode(lineIndex, HexStringToByteArray(hex.ToString()), state, flush);

            return(text);
        }
Exemplo n.º 2
0
        public string GetText(int lineIndex, CommandState state, bool flush)
        {
            var bytes = new List <byte>();

            foreach (var cc in CcData)
            {
                if (cc.Valid && cc.Type == 2)
                {
                    bytes.Add(cc.Data1);
                    bytes.Add(cc.Data2);
                }
            }

            var text = Cea708.Decode(lineIndex, bytes.ToArray(), state, flush);

            return(text);
        }
        public string GetText()
        {
            var hex = new StringBuilder();

            for (var i = 0; i < CcData.Length; i++)
            {
                var cc = CcData[i];
                if (cc.Valid && cc.Type == 2)
                {
                    hex.Append($"{cc.Data1:X2}{cc.Data2:X2}");
                }
            }



            //if (hex.ToString() == "8AFF0000")
            //{
            //    return string.Empty;
            //}

            var text = Cea708.Decode(HexStringToByteArray(hex.ToString()));

            return(text);
        }