private void UpdateButtonsEnabled() { var hasRow = FProcessDataView.Active && !FProcessDataView.IsEmpty(); var isAttached = hasRow && (bool)FProcessDataView["IsAttached"]; FAttachButton.Enabled = hasRow && !isAttached; FAttachContextMenuItem.Enabled = hasRow && !isAttached; FDetachButton.Enabled = hasRow && isAttached; FDetachContextMenuItem.Enabled = hasRow && isAttached; }
private void FAttachButton_Click(object sender, EventArgs e) { if (FProcessDataView.Active && !FProcessDataView.IsEmpty()) { _supressDebuggerChange = true; try { _dataphoria.Debugger.AttachProcess(FProcessDataView["ID"].AsInt32); } finally { _supressDebuggerChange = false; } RefreshDataView(); } }