Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 public long f1Fun(IntPtr es)
 {
     ltf.RunJavaScript("alert('C#执行了JS')");
     return(ltf.JsUndefined());
 }
Exemplo n.º 3
0
 public bool OnDragLeave()
 {
     ltf.RunJavaScript("$(\"#div1\").text('动作:DragLeave')");
     return(true);
 }