/// <summary>
 /// Removes the WT_INFOCHANGE handler so that messages are ignored.
 /// </summary>
 /// <param name="handler_I">WT_INFOCHANGE event handler supplied by the client.</param>
 public void RemoveInfoChangeEventHandler(EventHandler <MessageReceivedEventArgs> handler_I)
 {
     try
     {
         MessageEvents.UnWatchMessage(EWintabEventMessage.WT_INFOCHANGE);
         MessageEvents.InfoChgMessageReceived -= handler_I;
     }
     catch (Exception ex)
     {
         MessageBox.Show("FAILED CWintabData.RemoveWTInfoChangeEventHandler: " + ex.ToString());
     }
 }
 /// <summary>
 /// Removes the WTPacket handler so that messages are ignored.
 /// </summary>
 /// <param name="handler_I">WT_PACKET event handler supplied by the client.</param>
 public void RemoveWTPacketEventHandler(EventHandler <MessageReceivedEventArgs> handler_I)
 {
     try
     {
         MessageEvents.UnWatchMessage(EWintabEventMessage.WT_PACKET);
         MessageEvents.UnWatchMessage(EWintabEventMessage.WT_PACKETEXT);
         MessageEvents.UnWatchMessage(EWintabEventMessage.WT_CSRCHANGE);
         MessageEvents.PacketMessageReceived -= handler_I;
     }
     catch (Exception ex)
     {
         MessageBox.Show("FAILED CWintabData.RemoveWTPacketEventHandler: " + ex.ToString());
     }
 }
Example #3
0
        /// <summary>
        /// Initialize this data object.
        /// </summary>
        /// <param name="context_I">logical context for this data object</param>
        private void Init(CWintabContext context_I)
        {
            if (context_I == null)
            {
                throw new Exception("Trying to init CWintabData with null context.");
            }
            m_context = context_I;

            // Watch for the Wintab WT_PACKET event.
            MessageEvents.WatchMessage((int)EWintabEventMessage.WT_PACKET);

            // Watch for the Wintab WT_PACKETEXT event.
            MessageEvents.WatchMessage((int)EWintabEventMessage.WT_PACKETEXT);
        }
 /// <summary>
 /// Removes the WT_CTX* handler so that messages are ignored.
 /// </summary>
 /// <param name="handler_I"> WT_CTX* event handler supplied by the client.</param>
 public void RemoveStatusEventHandler(EventHandler <MessageReceivedEventArgs> handler_I)
 {
     try
     {
         MessageEvents.UnWatchMessage(EWintabEventMessage.WT_CTXOPEN);
         MessageEvents.UnWatchMessage(EWintabEventMessage.WT_CTXCLOSE);
         MessageEvents.UnWatchMessage(EWintabEventMessage.WT_CTXUPDATE);
         MessageEvents.UnWatchMessage(EWintabEventMessage.WT_CTXOVERLAP);
         MessageEvents.UnWatchMessage(EWintabEventMessage.WT_PROXIMITY);
         MessageEvents.StatusMessageReceived -= handler_I;
     }
     catch (Exception ex)
     {
         MessageBox.Show("FAILED CWintabData.RemoveStatusEventHandler: " + ex.ToString());
     }
 }
Example #5
0
        /// <summary>
        /// Initialize this data object.
        /// </summary>
        /// <param name="context_I">logical context for this data object</param>
        private void Init(CWintabContext context_I)
        {
            try
            {
                if (context_I == null)
                {
                    throw new Exception("Trying to init CWintabData with null context.");
                }
                m_context = context_I;

                // Watch for the Wintab WT_PACKET event.
                MessageEvents.WatchMessage((int)EWintabEventMessage.WT_PACKET);

                // Watch for the Wintab WT_PACKETEXT event.
                MessageEvents.WatchMessage((int)EWintabEventMessage.WT_PACKETEXT);
            }
            catch (Exception ex)
            {
                MessageBox.Show("FAILED CWintabData.Init: " + ex.ToString());
            }
        }