Пример #1
0
        /// <summary>
        /// Close the context for this object.
        /// </summary>
        /// <returns>true if context successfully closed</returns>
        public bool Close()
        {
            bool status = false;

            if (!m_hCTX.IsValid)
            {
                throw new Exception("CloseContext: invalid context");
            }

            status       = CWintabFuncs.WTClose(m_hCTX);
            m_hCTX       = HCTX.Zero;
            m_logContext = new WintabLogContext();

            return(status);
        }
Пример #2
0
        /// <summary>
        /// Close the context for this object.
        /// </summary>
        /// <returns>true if context successfully closed</returns>
        public bool Close()
        {
            bool status = false;

            try
            {
                if (m_hCTX == 0)
                {
                    throw new Exception("CloseContext: invalid context");
                }

                status       = CWintabFuncs.WTClose(m_hCTX);
                m_hCTX       = 0;
                m_logContext = new WintabLogContext();
            }
            catch (Exception ex)
            {
                MessageBox.Show("FAILED CloseContext: " + ex.ToString());
            }

            return(status);
        }