public Boolean Disconnect()
        {
            if (loggedIn)
            {
                var tokensApi = new TokensApi();
                tokensApi.DeleteTokensMe();
                loggedIn = false;
            }

            return(false);
        }
Beispiel #2
0
 private void LogoutButton_Click(object sender, EventArgs e)
 {
     try
     {
         var api = new TokensApi();
         api.DeleteTokensMe();
         MessageBox.Show("DeleteTokensMe Request already sent, please check by hit Get User Button");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void Disconnect()
 {
     if (!btnDisconnect.Enabled)
     {
         return;
     }
     loggedIn = false;
     AddLog("Disconnecting...");
     tokensApi.DeleteTokensMe();
     btnConnect.Enabled    = true;
     btnDisconnect.Enabled = false;
     gbQueues.Enabled      = false;
     AddLog("Disconnected");
 }
 private void Disconnect()
 {
     if (!btnDisconnect.Enabled)
     {
         return;
     }
     loggedIn = false;
     AddLog("Disconnecting...");
     StopPullingAgentsData();
     tokensApi.DeleteTokensMe();
     btnConnect.Enabled        = true;
     btnDisconnect.Enabled     = false;
     gbEdges.Enabled           = false;
     gbTroubleshooting.Enabled = false;
     gbAgents.Enabled          = false;
     gbTestGhostCall.Enabled   = false;
     gbCounters.Enabled        = false;
     AddLog("Disconnected");
 }