Exemplo n.º 1
0
        public static void Export(string path)
        {
            List <CodeLabel> labels = LabelManager.GetAllLabels();

            labels.Sort((CodeLabel a, CodeLabel b) => {
                int result = a.MemoryType.CompareTo(b.MemoryType);
                if (result == 0)
                {
                    return(a.Address.CompareTo(b.Address));
                }
                else
                {
                    return(result);
                }
            });

            StringBuilder sb = new StringBuilder();

            foreach (CodeLabel label in labels)
            {
                sb.Append(label.ToString() + "\n");
            }
            File.WriteAllText(path, sb.ToString(), Encoding.UTF8);
        }