private static void onRead() { int num1 = (int)HuionDriverDLL.timeBeginPeriod(1U); while (reading) { HNStruct.HNPenData p = new HNStruct.HNPenData(); try { HuionDriverDLL.hndh_get_cursor(ref p); } catch (Exception ex) { HuionLog.saveLog("Get Touch Info", ex.Message); HuionLog.saveLog("Get Touch Info", ex.StackTrace); } if (p.btn > (byte)0) { if (touchInfoListener != null) { touchInfoListener(p); } IntPtr num2 = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(HNStruct.HNPenData))); Marshal.StructureToPtr((object)p, num2, false); HuionDriverDLL.PostMessage(mHandle, 1064, num2, IntPtr.Zero); Marshal.FreeHGlobal(num2); } Thread.Sleep(1); } int num3 = (int)HuionDriverDLL.timeEndPeriod(1U); }
private static void Main(string[] args) { HNStruct.OemType = DeployConfig.getOemType(); HuionLog.listenGlobalCrashLog(); ResourceCulture.init(); TimerSession.startListenUserOperation(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool flag = false; try { flag = Utils.isAppRunning(); } catch { Utils.runAsAdmin(true); return; } if (new Mutex(true, "OnlyRun").WaitOne(0, false)) { Application.Run((Form) new HuionTalbet()); } else { if (Utils.isStartup(args) || HuionDriverDLL.PostMessage(HuionDriverDLL.FindWindow((string)null, Fixer4Main.FormTitle()), 1054, IntPtr.Zero, IntPtr.Zero) != 0) { return; } Utils.runAsAdmin(true); } }
private static void invokePostConnectionMessage() { HuionDriverDLL.PostMessage(mMainForm.Handle, 1044, IntPtr.Zero, IntPtr.Zero); }
private string onKeyChangedListener(HuionKeyEventArgs keyEvent) { SettingsUtil.ShowUIShortcut = keyEvent; HuionDriverDLL.PostMessage(this.mMainFormHandle, 1064, IntPtr.Zero, IntPtr.Zero); return(KBTable.getKBTable8Keys(keyEvent.KeyCode).KeyName); }