コード例 #1
0
        public static void DebugDumpLines(this MSBT obj)
        {
            var lines = obj.GetOrderedLines();

            foreach (var line in lines)
            {
                Debug.WriteLine(line);
            }
        }
コード例 #2
0
        public static IEnumerable <string> GetOrderedLinesSingle(this MSBT obj)
        {
            var sorted = obj.LBL1.Labels
                         .Where(z => !z.Name.EndsWith("_pl"))
                         .OrderBy(z => z.Index);

            foreach (var x in sorted)
            {
                var index = x.Index;
                var name  = x.Name;
                var data  = obj.TXT2.Strings[(int)index];
                var line  = data.ToString(obj.FileEncoding).TrimEnd('\0');
                yield return(line);
            }
        }