public void CommitDisk(int driveId) { DiabloDrive drive = _drives[driveId]; if (drive.IsLoaded) { drive.Pack.Save(); } }
public DiskController(AltoSystem system) { _system = system; // Load the drives _drives = new DiabloDrive[2]; _drives[0] = new DiabloDrive(_system); _drives[1] = new DiabloDrive(_system); Reset(); }
public void CommitDisk(int driveId) { DiabloDrive drive = _drives[driveId]; if (drive.IsLoaded) { try { drive.Pack.Save(); } catch (Exception e) { // TODO: this does not really belong here. System.Windows.Forms.MessageBox.Show(String.Format("Unable to save Diablo disk {0}'s contents. Error {0}. Any changes have been lost.", e.Message), "Disk save error"); } } }