/// <summary>
        /// Restore the tablet control functions and close Wintab context.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ExtensionTestForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (m_wtData != null)
            {
                m_wtData.RemoveWTPacketEventHandler(MyWTPacketEventHandler);
                m_wtData = null;
            }
            if (mLogContext != null && mLogContext.HCtx != 0)
            {
                foreach (var tabletIdx in mTabletList)
                {
                    RemoveOverridesForTablet(tabletIdx);
                }

                mLogContext.Close();
            }
        }
Beispiel #2
0
        ///////////////////////////////////////////////////////////////////////

        private void CloseCurrentContext()
        {
            try
            {
                TraceMsg("Closing context...\n");
                if (m_wtData != null)
                {
                    m_wtData.RemoveWTPacketEventHandler(MyWTPacketEventHandler);
                    m_wtData = null;
                }
                if (m_logContext != null)
                {
                    m_logContext.Close();
                    m_logContext = null;
                }
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.ToString());
            }
        }