Example #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (m_pBuffer != null && m_pBuffer.Initialized)
     {
         m_pBuffer.Clear();
     }
 }
Example #2
0
 private bool CreateObjects()
 {
     // Create acquisition object
     if (m_Acquisition != null)
     {
         if (m_Acquisition.Create() == false)
         {
             DestroyObjects();
             return(false);
         }
     }
     // Create buffer object
     if (m_Buffers != null)
     {
         if (m_Buffers.Create() == false)
         {
             DestroyObjects();
             return(false);
         }
         m_Buffers.Clear();
     }
     // Create Xfer object
     if (m_Xfer != null)
     {
         if (m_Xfer.Create() == false)
         {
             DestroyObjects();
             return(false);
         }
     }
     return(true);
 }
Example #3
0
 /// <summary>
 /// 创建 相关的采集、传输、缓存对象
 /// </summary>
 /// <returns></returns>
 private bool SeparaInterface_CreateObjects()
 {
     // Create acquisition object
     if (m_Acquisition != null && !m_Acquisition.Initialized)
     {
         if (m_Acquisition.Create() == false)
         {
             SeparaInterface_DestroyObjects();
             return(false);
         }
     }
     // Create buffer object
     if (m_Buffers != null && !m_Buffers.Initialized)
     {
         if (m_Buffers.Create() == false)
         {
             SeparaInterface_DestroyObjects();
             return(false);
         }
         m_Buffers.Clear();
     }
     // Create Xfer object
     if (m_Xfer != null && !m_Xfer.Initialized)
     {
         if (m_Xfer.Create() == false)
         {
             SeparaInterface_DestroyObjects();
             return(false);
         }
     }
     return(true);
 }
Example #4
0
        /// <summary>
        /// 注册回调
        /// </summary>
        /// <returns></returns>
        private bool CreateObjects()
        {
            // Create acquisition object
            if (m_AcqDevice != null && !m_AcqDevice.Initialized)
            {
                if (m_AcqDevice.Create() == false)
                {
                    DestroyObjects();
                    return(false);
                }
            }
            // Create buffer object
            if (m_Buffers != null && !m_Buffers.Initialized)
            {
                if (m_Buffers.Create() == false)
                {
                    DestroyObjects();
                    return(false);
                }
                m_Buffers.Clear();
            }
            // Create view object
            if (m_View != null && !m_View.Initialized)
            {
                if (m_View.Create() == false)
                {
                    DestroyObjects();
                    return(false);
                }
            }

            if (m_Xfer != null && m_Xfer.Pairs[0] != null)
            {
                m_Xfer.Pairs[0].Cycle = SapXferPair.CycleMode.NextWithTrash;
                if (m_Xfer.Pairs[0].Cycle != SapXferPair.CycleMode.NextWithTrash)
                {
                    DestroyObjects();
                    return(false);
                }
            }

            // Create Xfer object
            if (m_Xfer != null && !m_Xfer.Initialized)
            {
                if (m_Xfer.Create() == false)
                {
                    DestroyObjects();
                    return(false);
                }
            }
            return(true);
        }
Example #5
0
 private bool CreateObjects()
 {
     // Create acquisition object
     if (m_Acquisition != null && !m_Acquisition.Initialized)
     {
         if (m_Acquisition.Create() == false)
         {
             DestroyObjects();
             return(false);
         }
     }
     // Create buffer object
     if (m_Buffers != null && !m_Buffers.Initialized)
     {
         if (m_Buffers.Create() == false)
         {
             DestroyObjects();
             return(false);
         }
         m_Buffers.Clear();
     }
     // Create view object
     if (m_View != null && !m_View.Initialized)
     {
         if (m_View.Create() == false)
         {
             DestroyObjects();
             return(false);
         }
     }
     // Create Xfer object
     if (m_Xfer != null && !m_Xfer.Initialized)
     {
         if (m_Xfer.Create() == false)
         {
             DestroyObjects();
             return(false);
         }
     }
     return(true);
 }