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