示例#1
0
 //events
 public void m_OnLogMessage(Constants.Log importance, string strMsg)
 {
     if (OnLogMessage != null)
     {
         OnLogMessage(importance, strMsg);
     }
 }
示例#2
0
        public static void Log(Constants.Log importance, string message)
        {
#if !DEBUG
            if (importance == Constants.Log.Verbose)
            {
                return;
            }
#endif
            CKernel.NewLogMessage(importance, CKernel.Globalization[message]);
        }
示例#3
0
 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);
         }
     }
 }
示例#4
0
        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;
            }
        }
示例#5
0
        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");
            }
        }
示例#6
0
        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());
//			}
        }
示例#7
0
 public void OnLog(Constants.Log importance, string strMsg)
 {
     this.BeginInvoke(logDelegate, new object[] { this, importance, strMsg });
 }