static void Main(string[] args) { PrintHerald(); // Cons up a system to run stuff on. DSystem system = new DSystem(); system.Reset(); // // Start the UI, this will not return from ShowDialog // until the window is closed. // DWindow mainWindow = new DWindow(system); system.AttachDisplay(mainWindow); DialogResult res = mainWindow.ShowDialog(); // // Main window is now closed: shut down the system. // Ensure the system is stopped. // system.StopExecution(); // // Commit disks on normal exit // system.Shutdown(res == DialogResult.OK); Console.WriteLine("Goodbye..."); }
public FloppyDrive(DSystem system) { _system = system; // // Start the Index event rolling. This will run forever. // _system.Scheduler.Schedule(_indexInterval, IndexCallback); Reset(); }
static void Main(string[] args) { // // Check for command-line arguments. // if (args.Length > 0) { for (int i = 0; i < args.Length; i++) { switch (args[i++].ToLowerInvariant()) { case "-config": if (i < args.Length) { StartupOptions.ConfigurationFile = args[i]; } else { PrintUsage(); return; } break; case "-rompath": if (i < args.Length) { StartupOptions.RomPath = args[i]; } else { PrintUsage(); return; } break; default: PrintUsage(); return; } } } PrintHerald(); // Cons up a system to run stuff on. DSystem system = new DSystem(); system.Reset(); // // Start the UI, this will not return from ShowDialog // until the window is closed. // DWindow mainWindow = new DWindow(system); system.AttachDisplay(mainWindow); DialogResult res = mainWindow.ShowDialog(); // // Main window is now closed: shut down the system. // Ensure the system is stopped. // system.StopExecution(); // // Commit disks on normal exit // system.Shutdown(res == DialogResult.OK); Console.WriteLine("Goodbye..."); }