示例#1
0
 protected override void WndProc(ref Message m)
 {
     base.WndProc(ref m);
     if (m.Msg == 512)
     {
         TimerSession.userOperation();
     }
     if (m.Msg == 32752)
     {
         PACKET?nullable = HuionApi.SafeMsg2Packet(m);
         if (!nullable.HasValue)
         {
             return;
         }
         HNStruct.globalInfo.penData.ps = nullable.Value.pkNormalPressure;
         this.onPressValueHandle((int)HNStruct.globalInfo.penData.ps);
         this.drawLineHelper.onDrawline();
     }
     else
     {
         if (m.Msg != 1064)
         {
             return;
         }
         HNStruct.globalInfo.penData = TouchInfoReader.Msg2Packet(m);
         this.onPressValueHandle((int)HNStruct.globalInfo.penData.ps);
         this.drawLineHelper.onDrawline();
     }
 }
示例#2
0
 public void stopDrawLine()
 {
     HuionApi.stopListenDeviceInfo();
     this.releasePen();
 }
示例#3
0
 public void startDrawLine(Form form)
 {
     this.initPen();
     HuionApi.listenDeviceInfo(form.Handle);
 }