예제 #1
0
 public void PaintFingerTraces(WacomMTFingerCollection fingerCollection)
 {
     _fingerCollection = fingerCollection;
     if (this.Visible)
     {
         panel1.Invalidate();
     }
 }
예제 #2
0
 public void PaintFingerTraces(WacomMTFingerCollection fingerCollection)
 {
     _fingerCollection = fingerCollection;
     if(this.Visible)
     {
         panel1.Invalidate();
     }
 }
예제 #3
0
 public static bool AllFingersUp(ref WacomMTFingerCollection fingercollection)
 {
     for (uint i = 0; i < fingercollection.FingerCount; i++)
     {
         if (fingercollection.GetFingerByIndex(i).TouchState != WacomMTFingerState.WMTFingerStateUp)
         {
             return(false);
         }
     }
     return(true);
 }
예제 #4
0
 public static bool AllFingersUp(ref WacomMTFingerCollection fingercollection)
 {
     for(uint i=0; i< fingercollection.FingerCount; i++)
     {
         if(fingercollection.GetFingerByIndex(i).TouchState != WacomMTFingerState.WMTFingerStateUp)
         {
             return false;
         }
     }
     return true;
 }
예제 #5
0
        private void DoSendMidiMessage(ref WacomMTFingerCollection fingercollection)
        {
            //if we decided to skip early frames
            if (skipEarlyFrames && fingercollection.FrameNumber >= framesToSkip)
            {
                if (!TouchHelper.AllFingersUp(ref fingercollection) && fingercollection.FingerCount <= 5)
                {
                    //X value for messages
                    MidiFingerMessage fmX = mtouchMessages[fingercollection.FingerCount - 1].MessageX;
                    int val = (int)(((fingercollection.GetFingerByIndex(0).X * 10000) * fmX.MaxValue) / 10000) + fmX.MinValue;
                    SendMidiMessage(fmX.MidiCtrlr, val, fmX.MidiChannel);

                    //Y value for messages
                    MidiFingerMessage fmY = mtouchMessages[fingercollection.FingerCount - 1].MessageY;
                    val = (int)(fmY.MaxValue - (((fingercollection.GetFingerByIndex(0).Y * 10000) * fmY.MaxValue) / 10000) + fmY.MinValue);
                    SendMidiMessage(fmY.MidiCtrlr, val, fmY.MidiChannel);
                }
            }
        }
예제 #6
0
        public UInt32 DoFingerDataUpdateCallback(IntPtr packet_I, IntPtr userData_I)
        {
            try
            {
                // Recover the finger collection sent back.
                WacomMTFingerCollection fingerCollection =
                    CMemUtils.PtrToStructure <WacomMTFingerCollection>(packet_I);

                // Recover the user data sent back.
                mUserDataStringReturned = CMemUtils.PtrToManagedString(userData_I);

                Invoke(mUpdateRealTimeLabel, fingerCollection);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }

            return(0);
        }
예제 #7
0
 private void DoUpdateGraphicsControl(ref WacomMTFingerCollection fingercollection)
 {
     tabletPointer1.PaintFingerTraces(fingercollection);
 }
예제 #8
0
        private void DoSendMidiMessage(ref WacomMTFingerCollection fingercollection)
        {
            //if we decided to skip early frames
            if (skipEarlyFrames && fingercollection.FrameNumber >= framesToSkip)
            {

                if (!TouchHelper.AllFingersUp(ref fingercollection) && fingercollection.FingerCount <= 5)
                {
                    //X value for messages
                    MidiFingerMessage fmX = mtouchMessages[fingercollection.FingerCount - 1].MessageX;
                    int val = (int)(((fingercollection.GetFingerByIndex(0).X * 10000) * fmX.MaxValue) / 10000) + fmX.MinValue;
                    SendMidiMessage(fmX.MidiCtrlr, val, fmX.MidiChannel);

                    //Y value for messages
                    MidiFingerMessage fmY = mtouchMessages[fingercollection.FingerCount - 1].MessageY;
                    val = (int)(fmY.MaxValue - (((fingercollection.GetFingerByIndex(0).Y * 10000) * fmY.MaxValue) / 10000) + fmY.MinValue);
                    SendMidiMessage(fmY.MidiCtrlr, val, fmY.MidiChannel);
                }
            }
            
        }
예제 #9
0
 private void DoUpdateGraphicsControl(ref WacomMTFingerCollection fingercollection)
 {
    tabletPointer1.PaintFingerTraces(fingercollection);
 }