private void _AssociatedMachine_StatusChanged(object sender, VirtualMachineStatusChangedEventArgs e) { if (chkAutoDump.Checked && (e.NewStatus == VirtualMachineRunningStatus.Paused || e.NewStatus == VirtualMachineRunningStatus.StandBy)) { cmdDump_Click(this, new EventArgs()); } }
public void AssociatedMachine_StatusChanged(object sender, VirtualMachineStatusChangedEventArgs e) { if (this.InvokeRequired) { var a = new Action <object, VirtualMachineStatusChangedEventArgs>(_AssociatedMachine_StatusChanged); this.Invoke(a, sender, e); } else { _AssociatedMachine_StatusChanged(sender, e); } }
protected void _AssociatedMachine_StatusChanged(object sender, VirtualMachineStatusChangedEventArgs e) { switch (e.NewStatus) { case VirtualMachineRunningStatus.StandBy: _StatusWord = "[StandBy]"; txtCode.ReadOnly = false; break; case VirtualMachineRunningStatus.Runtime: _StatusWord = "[Runtime]"; txtCode.ReadOnly = true; break; case VirtualMachineRunningStatus.Paused: _StatusWord = "[Paused At " + (_ParentIDE.Machine.NextSymbol + 1).ToString() + "]"; txtCode.ReadOnly = true; txtCode.Focus(); txtCode.Select(_ParentIDE.Machine.NextSymbol, 1); break; case VirtualMachineRunningStatus.Breaking: _StatusWord = "[Breaking...]"; txtCode.ReadOnly = true; break; case VirtualMachineRunningStatus.Stepping: case VirtualMachineRunningStatus.SteppingOver: if (Environment.TickCount - _StatusLastMS < _TooFrequentStatusChangingMS) { break; } _StatusWord = "[Stepping...]"; txtCode.ReadOnly = true; break; case VirtualMachineRunningStatus.Pausing: //_StatusWord = "[Pausing...]"; txtCode.ReadOnly = true; break; default: _StatusWord = "[--unknown--]"; txtCode.ReadOnly = true; break; } UpdateTitle(); _StatusLastMS = Environment.TickCount; }