public UIClass() { int ww = 700, wh = 500; Rectangle rect = Lib.CenterWindow(ww, wh); ltf = new LTFrameNetClass("LTFrame-Canvas", "MemoryManager", IntPtr.Zero, Win32DataType.WS_POPUP | Win32DataType.WS_VISIBLE, rect.Left, rect.Top, ww, wh, IntPtr.Zero); fn1 = new LTNativeFunction(DragWindowFun); fn2 = new LTNativeFunction(QuitAppFun); fn3 = new LTNativeFunction(MinWindowFun); fn4 = new LTNativeFunction(JobStartFun); fn5 = new LTNativeFunction(AutoGCFun); fn6 = new LTNativeFunction(CleanMemoryFun); ltf.BindUserFunction("DragWindow", fn1, 0); ltf.BindUserFunction("QuitApp", fn2, 0); ltf.BindUserFunction("MinWindow", fn3, 0); ltf.BindUserFunction("JobStart", fn4, 0); ltf.BindUserFunction("AutoGC", fn5, 1); ltf.BindUserFunction("CleanMemory", fn6, 0); h1 = new HandleUserMessageCallBack(HandleUserMessage); ltf.SetHandleUserMessageCallBack(h1); uint dwProcessId; GetWindowThreadProcessId(ltf.windowHandle(), out dwProcessId); hProcess = OpenProcess(0x0400 | 0x0010, false, dwProcessId); ltf.loadFile(Lib.GetAppPath + @"./template/MemoryManager.html"); ltf.EnableDragFrameChangeSize(false); ltf.MessageLoop(); }
public UIClass() { int ww = 700, wh = 550; Rectangle rect = Lib.CenterWindow(ww, wh); ltf = new LTFrameNetClass("LTFrame-transparent", "LTFrameExmaple", IntPtr.Zero, Win32DataType.WS_POPUP | Win32DataType.WS_VISIBLE, rect.Left, rect.Top, ww, wh, IntPtr.Zero); fn1 = new LTNativeFunction(DragWindowFun); fn2 = new LTNativeFunction(QuitAppFun); fn3 = new LTNativeFunction(MinWindowFun); fn4 = new LTNativeFunction(OpenSubWindowFun); fn5 = new LTNativeFunction(OpenApplactionFun); fn6 = new LTNativeFunction(OpenTransparentWindowFun); fn7 = new LTNativeFunction(OpenCrossDomain); h1 = new HandleUserMessageCallBack(HandleUserMessage); ltf.SetHandleUserMessageCallBack(h1); ltf.BindUserFunction("DragWindow", fn1, 1); ltf.BindUserFunction("QuitApp", fn2, 0); ltf.BindUserFunction("MinWindow", fn3, 0); ltf.BindUserFunction("OpenSubWindow", fn4, 0); ltf.BindUserFunction("OpenApplaction", fn5, 0); ltf.BindUserFunction("OpenTransparentWindow", fn6, 1); ltf.BindUserFunction("OpenCrossDomain", fn7, 1); ltf.loadFile(Lib.GetAppPath + @"./template/Index.html"); ltf.EnableDragFrameChangeSize(false); ltf.MessageLoop(); }
public UIClass() { int ww = 700, wh = 500; Rectangle rect = Lib.CenterWindow(ww, wh); ltf = new LTFrameNetClass("LTFrame-Plugin", "Plugin", IntPtr.Zero, Win32DataType.WS_POPUP | Win32DataType.WS_VISIBLE, rect.Left, rect.Top, ww, wh, IntPtr.Zero); fn1 = new LTNativeFunction(DragWindowFun); fn2 = new LTNativeFunction(QuitAppFun); fn3 = new LTNativeFunction(MinWindowFun); ltf.BindUserFunction("DragWindow", fn1, 1); ltf.BindUserFunction("QuitApp", fn2, 0); ltf.BindUserFunction("MinWindow", fn3, 0); ltf.loadFile(Lib.GetAppPath + @"./template/plugin.html"); ltf.EnableDragFrameChangeSize(false); ltf.MessageLoop(); }
public void CreateSubWindow(LTFrameNetClass dddddd) { int ww = 640, wh = 510; Rectangle rect = Lib.CenterWindow(ww, wh); LTFrameNetClass ltf = new LTFrameNetClass("LTFrame-transparent", "SubWindow", dddddd.windowHandle(), Win32DataType.WS_POPUP | Win32DataType.WS_VISIBLE, 0, 0, ww, wh, IntPtr.Zero); ltf.loadFile(Lib.GetAppPath + @"./template/SubWindow.html"); ltf.EnableDragFrameChangeSize(false); subwindowlist.Add(ltf.windowHandle(), ltf); fn1 = new LTNativeFunction(DragWindowFun); fn2 = new LTNativeFunction(CloseWindowFun); ltf.BindUserFunction("DragWindow", fn1, 1); ltf.BindUserFunction("CloseWindow", fn2, 0); h1 = new HandleUserMessageCallBack(HandleUserMessage); ltf.SetHandleUserMessageCallBack(h1); }
public UIClass(string path) { int ww = 864, wh = 662; if (path == "doraemon") { wh = 600; } Rectangle rect = Lib.CenterWindow(ww, wh); ltf = new LTFrameNetClass("LTFrame-transparent", "Transparent", IntPtr.Zero, Win32DataType.WS_POPUP | Win32DataType.WS_VISIBLE, rect.Left, rect.Top, ww, wh, IntPtr.Zero); fn1 = new LTNativeFunction(DragWindowFun); fn2 = new LTNativeFunction(QuitAppFun); fn3 = new LTNativeFunction(MinWindowFun); fn4 = new LTNativeFunction(SetLayerWindowFun); ltf.BindUserFunction("DragWindow", fn1, 1); ltf.BindUserFunction("QuitApp", fn2, 0); ltf.BindUserFunction("MinWindow", fn3, 0); ltf.BindUserFunction("SetLayerWindow", fn4, 1); ltf.loadFile(Lib.GetAppPath + @"./template/" + path + ".html"); ltf.EnableDragFrameChangeSize(false); ltf.SetViewTransparent(true); ltf.MessageLoop(); }
public void BindUserFunction(string name, LTNativeFunction fn, int argCount) { LTFrameExtern.BindUserFunctionNet(_inst, name, fn, argCount); }
public static extern void BindUserFunctionNet(IntPtr es, string name, LTNativeFunction fn, int argCount);