private void btn_Run_Click(object sender, EventArgs e) { string item = cb_Profile.SelectedItem.ToString(); Machine m = Machine.Create(MachineProfile.GetByName(item)); MachineInstance instance = m.CreateInstance(); MachineInstanceControl instanceControl = new MachineInstanceControl(instance); instanceControl.Show(); }
private void btnRunWithBios_Click(object sender, EventArgs e) { string item = cb_Profile.SelectedItem.ToString(); MachineProfile p = MachineProfile.GetByName(item); if (ofdBios.ShowDialog() == DialogResult.OK) { p.BiosPath = ofdBios.FileName; Machine m = Machine.Create(p); MachineInstance instance = m.CreateInstance(); MachineInstanceControl instanceControl = new MachineInstanceControl(instance); instanceControl.Show(); } }