/// <summary> /// Rises when user pressed left mouse button. /// </summary> /// <param name="mouseStruct">Low level event arguments from WinAPI.</param> private void _mouseHook_LeftButtonDown(MouseHook.MSLLHOOKSTRUCT mouseStruct) { /* * If user enabled left mouse fix then * doing following code. */ if (leftButtonFixCheckBox.Checked) { /* * Printing second and millisecond when user pressed * left mouse button. Then blocking global system * input for delay given from trackbar. */ historyRichTextBox.AppendText($"LMB Down: {DateTime.Now.Second}s:{DateTime.Now.Millisecond}ms\n"); NativeSupport.BlockInput(new TimeSpan(0, 0, 0, 0, leftButtonTrackBar.Value)); } }
public static byte[] ReadFileFromPak(ArrayByte dis, int size, LPKTable fileTable) { dis.Skip(fileTable.GetOffSet() - size); int fileLength = (int)fileTable.GetFileSize(); byte[] fileBuff = new byte[fileLength]; int readLength = dis.Read(fileBuff, 0, fileLength); if (readLength < fileLength) { return(null); } else { NativeSupport.MakeBuffer(fileBuff, readLength, 0xF7); return(fileBuff); } }