Exemplo n.º 1
0
 public VirtualMachineTab(VirtualMachineEmulator.VirtualMachine vm, int index, TextBox outputBox)
 {
     this.outputBox = outputBox;
     this.VM = vm;
     InitializeComponent();
     this.Text = "VM " + (index+1);
     FillMemoryGridView();
     VM.Cpu.CommandExecuted += new VirtualMachineEmulator.VMEventHandler(UpdateVmMemoryGridViewGrid);
     VM.Cpu.CommandExecuted += new VirtualMachineEmulator.VMEventHandler(UpdateNextCommand);
     VM.Io.OutputRequested += new VirtualMachineEmulator.VMEventHandler(PrintBuffer);
     vm.VMTaskFinished += new VirtualMachineEmulator.VMEventHandler(this.Dispose);
     UpdateNextCommand();
     //VM.ExecuteAll();
 }
Exemplo n.º 2
0
 private void AddVirtualMachine(VirtualMachineEmulator.VirtualMachine vm)
 {
     vm.Cpu.CommandExecuted += new VirtualMachineEmulator.VMEventHandler(UpdateRegisters);
     virtualMachineTabControl.Controls.Add(new VirtualMachineTab(vm, virtualMachineTabControl.Controls.Count, this.outputTextBox));
 }