private void UpdateButtonsEnabled() { var hasRow = FSessionDataView.Active && !FSessionDataView.IsEmpty(); var isAttached = hasRow && (bool)FSessionDataView["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 (FSessionDataView.Active && !FSessionDataView.IsEmpty()) { _supressDebuggerChange = true; try { _dataphoria.Debugger.AttachSession(FSessionDataView["ID"].AsInt32); } finally { _supressDebuggerChange = false; } RefreshDataView(); } }