//events public void m_OnLogMessage(Constants.Log importance, string strMsg) { if (OnLogMessage != null) { OnLogMessage(importance, strMsg); } }
public static void Log(Constants.Log importance, string message) { #if !DEBUG if (importance == Constants.Log.Verbose) { return; } #endif CKernel.NewLogMessage(importance, CKernel.Globalization[message]); }
internal static void NewLogMessage(Constants.Log importance, string strMsg) { for (int i = 0; i <= InterfaceGateway.Length - 1; i++) { if (CKernel.InterfaceGateway[i] != null) { InterfaceGateway[i].NewLogMessage(importance, strMsg); } } }
private void m_Log(Constants.Log importance, string strMsg) { //if (importance==Constants.Log.Notify) labelmsg.Text=strMsg; string newline = DateTime.Now.ToShortTimeString() + " " + strMsg + "\n"; lock (txtServerLog) { buffer.Text = buffer.Text + newline; } }
public static void Log(Constants.Log importance, string message, Object arg1, Object arg2) { #if !DEBUG if (importance == Constants.Log.Verbose) { return; } #endif string translatedMsg = CKernel.Globalization[message]; try { CKernel.NewLogMessage(importance, String.Format(translatedMsg, arg1, arg2)); } catch { Debug.Write("Invalid message format:" + message + "\n"); } }
private void m_Log(object sender, Constants.Log importance, string strMsg) { if (importance == Constants.Log.Notify) { labelmsg.Text = strMsg; } string newline = DateTime.Now.ToShortTimeString() + " " + strMsg + "\n"; lock (richTextBoxLog) { richTextBoxLog.AppendText(newline); } Win32.SendMessage(richTextBoxLog.Handle, Win32.WM_VSCROLL, (IntPtr)Win32.SB_BOTTOM, (IntPtr)0); // if (richTextBoxLog.Lines.Length>richTextBoxLog.Height/richTextBoxLog.Font.Height) // { // Win32.SendMessage(richTextBoxLog.Handle, Win32.EM_LINESCROLL,(IntPtr)0, (IntPtr)(int)(richTextBoxLog.Lines.Length-richTextBoxLog.Height/richTextBoxLog.Font.Height)); // Debug.WriteLine((richTextBoxLog.Lines.Length-richTextBoxLog.Height/richTextBoxLog.Font.Height).ToString()); // } }
public void OnLog(Constants.Log importance, string strMsg) { this.BeginInvoke(logDelegate, new object[] { this, importance, strMsg }); }