Beispiel #1
0
 private void RefreshDataView()
 {
     if (FSessionDataView.Active)
     {
         FSessionDataView.Refresh();
     }
 }
Beispiel #2
0
        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;
        }
Beispiel #3
0
 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);
     }
 }
Beispiel #4
0
 private void FDataphoria_Disconnected(object sender, EventArgs e)
 {
     try
     {
         FSessionDataView.Close();
         FSessionDataView.Session = null;
         UpdateButtonsEnabled();
     }
     catch (Exception exception)
     {
         _dataphoria.Warnings.AppendError(null, exception, false);
     }
 }
Beispiel #5
0
 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();
     }
 }