/// <summary>
 /// Shuts down the current observe operation.
 /// Sets start/stop button text
 /// </summary>
 private void TerminateObserve()
 {
     // Set the button text
     btnStartStop.Text = "Start";
     // Issue a GET that changes the OBSERVE option to stop observing the target resource
     __Observer.TerminateObserving();
     txtResult.Text += "\r\nStopping\r\n";
 }
Esempio n. 2
0
 private void frmNewMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (__Observer != null)
     {
         if (__Observer.Observing)
         {
             __Observer.TerminateObserving();
         }
     }
     try
     {
         CoApGatewaySessionManager.Instance.ShutDown();
     }
     catch { }
 }