public Int32 HandleUserMessage(IntPtr hwnd, uint uMsg, uint wParam, int lParam) { switch (uMsg) { case 0x0113: { switch (wParam) { case 8888888: { PROCESS_MEMORY_COUNTERS pmc; pmc.cb = (uint)Marshal.SizeOf(typeof(PROCESS_MEMORY_COUNTERS)); GetProcessMemoryInfo(hProcess, out pmc, pmc.cb); int fCurUse = (int)(pmc.WorkingSetSize / (1024 * 1024)); string ss = string.Format("showmemory('{0}')", fCurUse.ToString()); ltf.RunJavaScript(ss); } break; } } break; } return(ltf.HandleMessage(hwnd, uMsg, wParam, lParam)); }
public long f1Fun(IntPtr es) { ltf.RunJavaScript("alert('C#执行了JS')"); return(ltf.JsUndefined()); }
public bool OnDragLeave() { ltf.RunJavaScript("$(\"#div1\").text('动作:DragLeave')"); return(true); }