private void btnCreateDiskImage_Click(object sender, EventArgs e) { /* * if ((Control.ModifierKeys & Keys.Control) == Keys.Control) * { * CreateRAMDiskForm createRAMDisk = new CreateRAMDiskForm(); * DialogResult result = createRAMDisk.ShowDialog(); * if (result == DialogResult.OK) * { * RAMDisk ramDisk = createRAMDisk.RAMDisk; * AddDisk(ramDisk); * } * } * else */ { CreateDiskImageForm createDiskImage = new CreateDiskImageForm(); DialogResult result = createDiskImage.ShowDialog(); if (result == DialogResult.OK) { DiskImage diskImage = createDiskImage.DiskImage; AddDisk(diskImage); } } }
private void btnCreateDiskImage_Click(object sender, EventArgs e) { if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift) { CreateRAMDiskForm createRAMDisk = new CreateRAMDiskForm(); DialogResult result = createRAMDisk.ShowDialog(); if (result == DialogResult.OK) { RAMDisk ramDisk = createRAMDisk.RAMDisk; AddDisk(ramDisk); } } else { CreateDiskImageForm createDiskImage = new CreateDiskImageForm(); DialogResult result = createDiskImage.ShowDialog(); if (result == DialogResult.OK) { DiskImage diskImage = createDiskImage.DiskImage; AddDisk(diskImage); } } }