public void AttachSystem(AltoSystem system) { _system = system; _system.AttachDisplay(this); _controller = new ExecutionController(_system); _controller.ErrorCallback += OnExecutionError; _controller.ShutdownCallback += OnShutdown; // Update disk image UI info // Diablo disks: Drive0ImageName.Text = _system.DiskController.Drives[0].IsLoaded ? Path.GetFileName(_system.DiskController.Drives[0].Pack.PackName) : Resources.NoImageLoadedText; Drive1ImageName.Text = _system.DiskController.Drives[1].IsLoaded ? Path.GetFileName(_system.DiskController.Drives[1].Pack.PackName) : Resources.NoImageLoadedText; // Trident disks for (int i = 0; i < _tridentImageNames.Count; i++) { TridentDrive drive = _system.TridentController.Drives[i]; _tridentImageNames[i].Text = drive.IsLoaded ? Path.GetFileName(drive.Pack.PackName) : Resources.NoImageLoadedText; } // // If a startup script was specified, start it running now -- // tell the script manager to start the script, and start the // Alto system running so that the script actually executes. // if (!string.IsNullOrWhiteSpace(StartupOptions.ScriptFile)) { StartScriptPlayback(StartupOptions.ScriptFile); _controller.StartExecution(AlternateBootType.None); } }
public void AttachSystem(AltoSystem system) { _system = system; _system.AttachDisplay(this); _controller = new ExecutionController(_system); _controller.ErrorCallback += OnExecutionError; // Update disk image UI info // Diablo disks: Drive0ImageName.Text = _system.DiskController.Drives[0].IsLoaded ? Path.GetFileName(_system.DiskController.Drives[0].Pack.PackName) : _noImageLoadedText; Drive1ImageName.Text = _system.DiskController.Drives[1].IsLoaded ? Path.GetFileName(_system.DiskController.Drives[1].Pack.PackName) : _noImageLoadedText; // Trident disks for (int i = 0; i < _tridentImageNames.Count; i++) { TridentDrive drive = _system.TridentController.Drives[i]; _tridentImageNames[i].Text = drive.IsLoaded ? Path.GetFileName(drive.Pack.PackName) : _noImageLoadedText; } }