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(); } }
public void stopDrawLine() { HuionApi.stopListenDeviceInfo(); this.releasePen(); }
public void startDrawLine(Form form) { this.initPen(); HuionApi.listenDeviceInfo(form.Handle); }