private void Print(string text) { if (this.richTextBox1.InvokeRequired) { PrintCallback d = new PrintCallback(Print); this.Invoke(d, new object[] { text }); } else { this.richTextBox1.AppendText(text); } }
public override PrintCallbackInfo RegisterPrintCallback(OutputLevel outputLevel, PrintCallback callback, object data = null) { var info = new PrintCallbackInfo { OutputLevel = outputLevel, Callback = callback, Data = data }; PrintCallbacks.Add(info); return(info); }
private void Print(string s) { if (this.logTextBox.InvokeRequired) { PrintCallback d = new PrintCallback(Print); this.Invoke(d, new object[] { s }); } else { logTextBox.AppendText(s); logTextBox.AppendText("\r\n"); } }
public LuaState() { myStatePtr = LuaDLL.luaL_newstate(); LuaDLL.luaL_openlibs(myStatePtr); LuaDLL.lua_getglobal(myStatePtr, "_G"); myGlobalTable = new LuaObject(this, -1); myPrintFuction = new LuaCSFunction(print); LuaDLL.lua_pushcclosure(myStatePtr, myPrintFuction, 0); LuaDLL.lua_setglobal(myStatePtr, "print"); printCallback = new PrintCallback(defaultPrint); }
private void Print(String str) { if (IsDisposed) { Console.Write(str); } else { if (base.InvokeRequired) { PrintCallback d = new PrintCallback(Print); this.Invoke(d, new object[] { str }); } else { base.AppendText(str); } } }
private extern static void RegisterPrintCallback(PrintCallback callback);
public abstract PrintCallbackInfo RegisterPrintCallback(OutputLevel outputLevel, PrintCallback callback, object data = null);
static public void SetPrintCallback(PrintCallback cb) { _PrintCallback = cb; }