예제 #1
0
 /* what starts ends */
 public void stopSession()
 {
     App.log("TAPI - Stop session");
     if (App.Setup.IsTapiSessionActive)
     {
         App.Setup.IsTapiSessionActive = false;
         if (currentLine != null)
         {
             if (currentLine.IsOpen)
             {
                 currentLine.Close();
                 App.log(String.Format("TAPI line - closed"));
                 refreshStateFlags();
             }
             else
             {
                 App.log("Current line is not open! Hence it can'be closed.");
             }
         }
         else
         {
             App.log("Current TAPI line object is NULL. There is nothing to close.");
         }
     }
 }
예제 #2
0
        private void _btnStartStop_Click(object sender, EventArgs e)
        {
            TapiLine line = CurrentLine;

            if (line.IsOpen)
            {
                line.Close();
                ChangeButtonStates();
            }
            else
            {
                try
                {
                    line.Open(line.Capabilities.MediaModes);
                }
                catch (TapiException)
                {
                    line.Open(MediaModes.DataModem);
                }
                ChangeButtonStates();
            }
        }