//}}} // LOG ================================================================={{{ // ======================================================================== // log log_left log_center log_arobas {{{ public static void Log(string caller, string msg) { if (AppLogger == null) { return; } bool has_linefeed = msg.EndsWith("\n"); if (!has_linefeed) { linefeed_required = true; } else if (linefeed_required) { msg += "\n"; has_linefeed = true; linefeed_required = false; } AppLogger.Invoke((MethodInvoker) delegate() { AppLogger.log(caller, msg); }); // AppLogger.log(caller, msg); /*// {{{ * if(log_autoscroll) * { * scrolled_by_log_time = System.currentTimeMillis(); * log_container.fullScroll( View.FOCUS_DOWN ); * * update_log_container_scrolling(); * } */ // }}} }
public static void Log(string msg) { if (((Control)AppLogger).InvokeRequired) { AppLogger.Invoke((MethodInvoker) delegate() { AppLogger.log(msg); }); // async call to UI Thread } else { AppLogger.log(msg); // direct call from UI Thread } }