Ejemplo n.º 1
0
 protected void OnApplicationPause(bool isPaused)
 {
     if (_ortc != null && _ortc.IsConnected)
     {
         _ortc.Disconnect();
     }
 }
Ejemplo n.º 2
0
        public void Disconnect()
        {
            client.Disconnect();

            client.OnConnected    -= ortc_OnConnected;
            client.OnDisconnected -= ortc_OnDiconnected;
            client.OnSubscribed   -= ortc_OnSubscribed;
            client.OnException    -= ortc_OnException;
        }
Ejemplo n.º 3
0
 public void DoConnectDisconnect()
 {
     if (ortcClient.IsConnected)
     {
         ortcClient.Disconnect();
         //  WriteLog("Disconnecting...");
     }
     else
     {
         ortcClient.ConnectionMetadata = ConnectionMetadata;
         if (IsCluster)
         {
             ortcClient.ClusterUrl = Url;
         }
         else
         {
             ortcClient.Url = Url;
         }
         ortcClient.Connect(ApplicationKey, AuthenticationToken);
         // WriteLog("Connecting...");
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Disconnects us from FSX and ORTC
        /// </summary>
        private void Disconnect()
        {
            Log("Disconnecting");

            // Stops the timer
            requestTimer.Stop();
            requestTimer.Enabled = false;

            FSUIPCConnection.Close();    // Disconnects from FSX
            ortcClient.Disconnect();     // Disconnects from ORTC

            gbxRealtime.Enabled  = true; // enables UI again
            gbxBroadcast.Enabled = true; // enables UI again

            btnDisconnect.Text    = "Disconnected";
            btnDisconnect.Enabled = false;
            btnConnect.Text       = "Connect";
            btnConnect.Enabled    = true;

            Log("Disconnected");
        }
Ejemplo n.º 5
0
        private void btnDisconnect_Click(object sender, EventArgs e)
        {
            Log("Disconnecting...");

            _ortc.Disconnect();
        }
Ejemplo n.º 6
0
 //Disconect
 private void button1_Click(object sender, EventArgs e)
 {
     _ortc.Disconnect();
 }
 public void ForceDisconnect()
 {
     client.Disconnect();
 }
 /// <summary>
 /// disconnects the messenger
 /// </summary>
 public void Disconnect()
 {
     Client.Disconnect();
 }