/// <summary> /// If the application is started with the SHIFT key pressed, warnings and errors are reported on a window. /// </summary> /// <param name="type">See <see cref="StartUp.DEBUG_TYPE"/> for the possible values. </param> /// <param name="text">Text to show in the dialog window.</param> public static void AddDebugInfo(DEBUG_TYPE type, string text) { if (debug != null) { debug.AddDebugInfo(type, text); } }
/// <summary> /// If the application is started with the SHIFT key pressed, warnings and errors are reported on a window. /// </summary> /// <param name="type">See <see cref="StartUp.DEBUG_TYPE"/> for the possible values. </param> /// <param name="text">Text to show in the dialog window.</param> public static void AddDebugInfo(DEBUG_TYPE type, string text) { if (debug != null) { if (debug.InvokeRequired) { debug.BeginInvoke(new MethodInvoker(delegate { debug.AddDebugInfo(type, text); })); } else { debug.AddDebugInfo(type, text); } } }
void LogToBuff(DEBUG_TYPE eDebugType, LOG_TYPE eLogType, string strMsg) { string strTime = System.DateTime.Now.ToString("HH:mm:ss"); string strBuffer = System.String.Empty; if (eDebugType == DEBUG_TYPE.DEBUG_GM) { string strType = eDebugType.ToString(); string[] strArray = strType.Split('_'); mLogType = strArray[1]; strBuffer = string.Format("[{0}][{1}]:[{2}]", strTime, strArray[1], strMsg); if (mLogGm.Count == MAX_LOG_SIZE) { mLogGm.Dequeue(); } mLogGm.Enqueue(strBuffer); if (mLogType.ToLower() == "gm" || mLogType.ToLower() == "all") { outPutAppend(strBuffer); } } else if (eDebugType == DEBUG_TYPE.DEBUG_LOG) { string strType = eLogType.ToString(); string[] strArray = strType.Split('_'); strBuffer = string.Format("[{0}][{1}]:[{2}]", strTime, strArray[1], strMsg); if (eLogType == LOG_TYPE.LOG_TRACE) { if (mLogTrace.Count == MAX_LOG_SIZE) { mLogTrace.Dequeue(); } mLogTrace.Enqueue(strBuffer); if (mLogType == "trace" || mLogType == "all") { outPutAppend(strBuffer); } } else if (eLogType == LOG_TYPE.LOG_ERROR) { if (mLogError.Count == MAX_LOG_SIZE) { mLogError.Dequeue(); } mLogError.Enqueue(strBuffer); if (mLogType == "error" || mLogType == "all") { outPutAppend(strBuffer); } } } }
public static void AddDebugInfo(DEBUG_TYPE type, string text) { }