private void RefreshDataView() { if (FProcessDataView.Active) { FProcessDataView.Refresh(); } }
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 FDataphoria_Connected(object sender, EventArgs e) { FProcessDataView.Session = _dataphoria.DataSession; try { FProcessDataView.Open(); UpdateButtonsEnabled(); } catch (Exception exception) { _dataphoria.Warnings.AppendError(null, exception, false); } }
private void FDataphoria_Disconnected(object sender, EventArgs e) { try { FProcessDataView.Close(); FProcessDataView.Session = null; UpdateButtonsEnabled(); } catch (Exception exception) { _dataphoria.Warnings.AppendError(null, exception, false); } }
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(); } }