Ejemplo n.º 1
0
 internal void LoadScreens(DirectoryInfo directoryInfo, IIOAdapter storage)
 {
     foreach (var file in directoryInfo.GetFiles("*.fmt"))
     {
         var screenNode = new ScreenNode(new ScreenInfo(file.FullName, storage));
         screens[screenNode.Path] = screenNode;
     }
 }
Ejemplo n.º 2
0
        private static int Main(string[] args)
        {
            if (args.Length > 0)
            {
                var filename = args.TakeLast(1);
                var bytes    = File.ReadAllBytes(filename.First());
                var flags    = string.Join("", args.ToList().Where(a => a.StartsWith('-')))
                               .Replace("-", "");

                Disassemble    = flags.Contains("d");
                SuppressOutput = flags.Contains("s");
                IoAdapter      = new ConsoleAdapter();

                Start(bytes);
                return(0);
            }

            Console.WriteLine("Usage: LC3 [-ds] filename");
            // TODO: Write description of flags
            return(1);
        }