public void StopBaumerCam()
        {
            if (Status != BaumerStatus.Ready && Status != BaumerStatus.Capturing)
            {
                return;
            }

            //STOP CAMERA
            if (mDevice != null)
            {
                try
                {
                    IsProcessing = true;
                    if (mDevice.RemoteNodeList.GetNodePresent("AcquisitionAbort") == true)
                    {
                        mDevice.RemoteNodeList["AcquisitionAbort"].Execute();
                        Helpers.Log.LogThisInfo("5.1.12   {0} aborted\n", mDevice.Model);
                    }

                    mDevice.RemoteNodeList["AcquisitionStop"].Execute();
                    Helpers.Log.LogThisInfo("5.1.12   {0} stopped\n", mDevice.Model);
                    Helpers.Log.LogThisInfo("\n");

                    String sExposureNodeName = "";
                    if (mDevice.GetRemoteNodeList().GetNodePresent("ExposureTime"))
                    {
                        sExposureNodeName = "ExposureTime";
                    }
                    else if (mDevice.GetRemoteNodeList().GetNodePresent("ExposureTimeAbs"))
                    {
                        sExposureNodeName = "ExposureTimeAbs";
                    }

                    Helpers.Log.LogThisInfo("         ExposureTime:                   {0} [{1}]\n", (double)mDevice.RemoteNodeList[sExposureNodeName].Value, (string)mDevice.RemoteNodeList[sExposureNodeName].Unit);
                    if (mDevice.TLType == "GEV")
                    {
                        if (mDevice.RemoteNodeList.GetNodePresent("DeviceStreamChannelPacketSize") == true)
                        {
                            Helpers.Log.LogThisInfo("         DeviceStreamChannelPacketSize:  {0} [bytes]\n", (long)mDevice.RemoteNodeList["DeviceStreamChannelPacketSize"].Value);
                        }
                        else
                        {
                            Helpers.Log.LogThisInfo("         GevSCPSPacketSize:              {0} [bytes]\n", (long)mDevice.RemoteNodeList["GevSCPSPacketSize"].Value);
                        }
                        Helpers.Log.LogThisInfo("         GevSCPD (PacketDelay):          {0} [tics]\n", (long)mDevice.RemoteNodeList["GevSCPD"].Value);
                    }
                    Helpers.Log.LogThisInfo("\n");
                    Status = BaumerStatus.Stopped;
                }
                catch (BGAPI2.Exceptions.IException ex)
                {
                    Helpers.Log.LogThisInfo("ExceptionType:    {0} \n", ex.GetType());
                    Helpers.Log.LogThisInfo("ErrorDescription: {0} \n", ex.GetErrorDescription());
                    Helpers.Log.LogThisInfo("in function:      {0} \n", ex.GetFunctionName());
                }
            }
            //STOP DataStream acquisition & release buffers
            if (mDataStream != null)
            {
                try
                {
                    if (mDataStream.TLType == "GEV")
                    {
                        //DataStream Statistics
                        Helpers.Log.LogThisInfo("         DataStream Statistics \n");
                        Helpers.Log.LogThisInfo("           GoodFrames:            {0}\n", (long)mDataStream.NodeList["GoodFrames"].Value);
                        Helpers.Log.LogThisInfo("           CorruptedFrames:       {0}\n", (long)mDataStream.NodeList["CorruptedFrames"].Value);
                        Helpers.Log.LogThisInfo("           LostFrames:            {0}\n", (long)mDataStream.NodeList["LostFrames"].Value);
                        Helpers.Log.LogThisInfo("           ResendRequests:        {0}\n", (long)mDataStream.NodeList["ResendRequests"].Value);
                        Helpers.Log.LogThisInfo("           ResendPackets:         {0}\n", (long)mDataStream.NodeList["ResendPackets"].Value);
                        Helpers.Log.LogThisInfo("           LostPackets:           {0}\n", (long)mDataStream.NodeList["LostPackets"].Value);
                        Helpers.Log.LogThisInfo("           Bandwidth:             {0}\n", (long)mDataStream.NodeList["Bandwidth"].Value);
                        Helpers.Log.LogThisInfo("\n");
                    }
                    if (mDataStream.TLType == "U3V")
                    {
                        //DataStream Statistics
                        Helpers.Log.LogThisInfo("         DataStream Statistics \n");
                        Helpers.Log.LogThisInfo("           GoodFrames:            {0}\n", (long)mDataStream.NodeList["GoodFrames"].Value);
                        Helpers.Log.LogThisInfo("           CorruptedFrames:       {0}\n", (long)mDataStream.NodeList["CorruptedFrames"].Value);
                        Helpers.Log.LogThisInfo("           LostFrames:            {0}\n", (long)mDataStream.NodeList["LostFrames"].Value);
                        Helpers.Log.LogThisInfo("\n");
                    }
                    mDataStream.StopAcquisition();
                    Helpers.Log.LogThisInfo("5.1.12   DataStream stopped \n");
                    bufferList.DiscardAllBuffers();

                    // RESET EVENT MODE TO DISABLED
                    //=============================
                    mDataStream.UnregisterNewBufferEvent();
                    mDataStream.RegisterNewBufferEvent(BGAPI2.Events.EventMode.UNREGISTERED);
                    BGAPI2.Events.EventMode currentEventMode = mDataStream.EventMode;
                    System.Console.Write("        Unregister Event Mode:    {0}\n", mDataStream.EventMode.ToString());

                    Helpers.Log.LogThisInfo("RELEASE\n");
                    Helpers.Log.LogThisInfo("#######\n\n");
                    Helpers.Log.LogThisInfo("5.1.13   Releasing the resources\n");

                    while (bufferList.Count > 0)
                    {
                        mBuffer = (BGAPI2.Buffer)bufferList.Values.First();
                        bufferList.RevokeBuffer(mBuffer);
                    }
                    Helpers.Log.LogThisInfo("         buffers after revoke:    {0}\n", bufferList.Count);

                    mDataStream.Close();
                    mDevice.Close();
                    mInterface.Close();
                    mSystem.Close();
                }
                catch (BGAPI2.Exceptions.IException ex)
                {
                    Helpers.Log.LogThisInfo("ExceptionType:    {0} \n", ex.GetType());
                    Helpers.Log.LogThisInfo("ErrorDescription: {0} \n", ex.GetErrorDescription());
                    Helpers.Log.LogThisInfo("in function:      {0} \n", ex.GetFunctionName());
                }
            }
            Helpers.Log.LogThisInfo("\n");


            Helpers.Log.LogThisInfo("\nEnd\n\n");
            Helpers.Log.LogThisInfo("Input any number to close the program:\n");
            Status       = BaumerStatus.Stopped;
            IsProcessing = false;
        }