public void ChangeCD(VDI vdi) { changing = true; Enabled = false; ChangeVMISOAction action = new ChangeVMISOAction(connection, vm, vdi, cdrom); action.Completed += new EventHandler<EventArgs>(delegate(Object o, EventArgs f) { Program.Invoke(this, delegate() { changing = false; SelectCD(); Enabled = true; }); }); action.RunAsync(); }
public void ChangeCD(VDI vdi) { changing = true; Enabled = false; ChangeVMISOAction action = new ChangeVMISOAction(connection, vm, vdi, cdrom); action.Completed += delegate { Program.Invoke(this, delegate() { changing = false; SelectCD(); Enabled = true; }); }; action.RunAsync(); }