/// <summary> /// Override this method to define the async command body te execute on the /// background thread /// </summary> protected override async Task ExecuteAsync() { if (FloppyDevice == null) { return; } if (string.Compare(FloppyDevice.DriveAFloppy?.Filename, ItemPath, StringComparison.InvariantCultureIgnoreCase) == 0) { await FloppyDevice.EjectDriveA(); } else if (string.Compare(FloppyDevice.DriveBFloppy?.Filename, ItemPath, StringComparison.InvariantCultureIgnoreCase) == 0) { await FloppyDevice.EjectDriveB(); } }
/// <summary> /// Inserts the floppy to the device /// </summary> /// <param name="device">Floppy device</param> /// <param name="vfddPath">Path of the floppy file</param> /// <returns></returns> protected override Task InsertFloppyAsync(FloppyDevice device, string vfddPath) => device.InsertDriveB(vfddPath);
/// <summary> /// The floppy file that belongs to the menu function /// </summary> /// <param name="device">Floppy device</param> protected override VirtualFloppyFile FloppyFile(FloppyDevice device) => device.DriveBFloppy;
/// <summary> /// Inserts the floppy to the device /// </summary> /// <param name="device">Floppy device</param> /// <param name="vfddPath">Path of the floppy file</param> /// <returns></returns> protected abstract Task InsertFloppyAsync(FloppyDevice device, string vfddPath);
/// <summary> /// The floppy file that belongs to the menu function /// </summary> /// <param name="device">Floppy device</param> protected abstract VirtualFloppyFile FloppyFile(FloppyDevice device);