/// <summary>
        /// Determines the type of the by.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <returns></returns>
        protected static FloppyDriveInfo DetermineByType(byte type)
        {
            FloppyDriveInfo floppy = new FloppyDriveInfo();

            switch (type)
            {
            case 0: { floppy.Type = FloppyDriveType.None; floppy.KiloByteSize = 0; break; }

            case 1: { floppy.Type = FloppyDriveType.Floppy_5_25; floppy.KiloByteSize = 360; break; }

            case 2: { floppy.Type = FloppyDriveType.Floppy_5_25; floppy.KiloByteSize = 1200; break; }

            case 3: { floppy.Type = FloppyDriveType.Floppy_3_5; floppy.KiloByteSize = 720; break; }

            case 4: { floppy.Type = FloppyDriveType.Floppy_3_5; floppy.KiloByteSize = 1440; break; }

            case 5: { floppy.Type = FloppyDriveType.Floppy_3_5; floppy.KiloByteSize = 2880; break; }

            default: { floppy.Type = FloppyDriveType.Unknown; floppy.KiloByteSize = 0; break; }
            }

            return(floppy);
        }
Exemplo n.º 2
0
		protected static FloppyDriveInfo DetermineByType (byte type)
		{
			FloppyDriveInfo floppy = new FloppyDriveInfo ();

			switch (type) {
				case 0: { floppy.Type = FloppyDriveType.None; floppy.KiloByteSize = 0; break; }
				case 1: { floppy.Type = FloppyDriveType.Floppy_5_25; floppy.KiloByteSize = 360; break; }
				case 2: { floppy.Type = FloppyDriveType.Floppy_5_25; floppy.KiloByteSize = 1200; break; }
				case 3: { floppy.Type = FloppyDriveType.Floppy_3_5; floppy.KiloByteSize = 720; break; }
				case 4: { floppy.Type = FloppyDriveType.Floppy_3_5; floppy.KiloByteSize = 1440; break; }
				case 5: { floppy.Type = FloppyDriveType.Floppy_3_5; floppy.KiloByteSize = 2880; break; }
				default: { floppy.Type = FloppyDriveType.Unknown; floppy.KiloByteSize = 0; break; }
			}

			return floppy;
		}