コード例 #1
0
        static void DestroysObjects(SapAcquisition acq, SapAcqDevice camera, SapBuffer buf, SapTransfer xfer, SapView view)
        {
            if (xfer != null)
            {
                xfer.Destroy();
                xfer.Dispose();
            }

            if (camera != null)
            {
                camera.Destroy();
                camera.Dispose();
            }

            if (acq != null)
            {
                acq.Destroy();
                acq.Dispose();
            }

            if (buf != null)
            {
                buf.Destroy();
                buf.Dispose();
            }

            if (view != null)
            {
                view.Destroy();
                view.Dispose();
            }

            //Console.WriteLine("\nPress any key to terminate\n");
            //Console.ReadKey(true);
        }
コード例 #2
0
        static void DestroysObjects(SapAcquisition acq, SapAcqDevice camera, SapBuffer buf, SapTransfer xfer, SapView view)
        {
            if (xfer != null)
            {
                xfer.Destroy();
                xfer.Dispose();
            }

            if (camera != null)
            {
                camera.Destroy();
                camera.Dispose();
            }

            if (acq != null)
            {
                acq.Destroy();
                acq.Dispose();
            }

            if (buf != null)
            {
                buf.Destroy();
                buf.Dispose();
            }

            if (view != null)
            {
                view.Destroy();
                view.Dispose();
            }

            //Console.WriteLine("\nPress any key to terminate\n");
            //Console.ReadKey(true);
        }
コード例 #3
0
 private void DestroyObjects()
 {
     if (m_Xfer != null && m_Xfer.Initialized)
     {
         m_Xfer.Destroy();
     }
     if (m_Buffers != null && m_Buffers.Initialized)
     {
         m_Buffers.Destroy();
     }
     if (m_Acquisition != null && m_Acquisition.Initialized)
     {
         m_Acquisition.Destroy();
     }
 }
コード例 #4
0
 /// <summary>
 /// 销毁 采集、传输、缓存对象
 /// </summary>
 public void SeparaInterface_DestroyObjects()
 {
     if (m_Xfer != null && m_Xfer.Initialized)
     {
         m_Xfer.Destroy();
     }
     if (m_Buffers != null && m_Buffers.Initialized)
     {
         m_Buffers.Destroy();
     }
     if (m_Acquisition != null && m_Acquisition.Initialized)
     {
         m_Acquisition.Destroy();
     }
 }
コード例 #5
0
ファイル: Cam_Dalsa.cs プロジェクト: pimier15/PLInspector
        public override bool?Disconnect()
        {
            try
            {
                if (Xfer != null)
                {
                    Xfer.Destroy();
                    Xfer.Dispose();
                }

                if (AcqDevice != null)
                {
                    AcqDevice.Destroy();
                    AcqDevice.Dispose();
                }

                if (Acquisition != null)
                {
                    Acquisition.Destroy();
                    Acquisition.Dispose();
                }

                if (Buffers != null)
                {
                    Buffers.Destroy();
                    Buffers.Dispose();
                }

                if (View != null)
                {
                    View.Destroy();
                    View.Dispose();
                }
                if (ServerLocation != null)
                {
                    ServerLocation.Dispose();
                }
                return(true);
            }
            catch (Exception ex)
            {
                ex.ToString().Print("Disconnect Error");
                return(null);
            }
        }