public void MsgDialogShow(string pstrTitle, string pstrMessage, LogMan.LogLevel penmLevel) { if ((int)menmLogLevel >= (int)penmLevel) { switch (penmLevel) { case LogMan.LogLevel.Error: MessageBox.Show(pstrMessage, pstrTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); LogMan.Instance.WriteToLog(pstrMessage, penmLevel); break; case LogMan.LogLevel.Warn: MessageBox.Show(pstrMessage, pstrTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); LogMan.Instance.WriteToLog(pstrMessage, penmLevel); break; case LogMan.LogLevel.Info: MessageBox.Show(pstrMessage, pstrTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); LogMan.Instance.WriteToLog(pstrMessage, penmLevel); break; case LogMan.LogLevel.Verbose: MessageBox.Show(pstrMessage, pstrTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); LogMan.Instance.WriteToLog(pstrMessage, penmLevel); break; } } }
private MessageMan() { // // TODO: Add constructor logic here // string loglevel = Utils.GetAppConfig("LogLevel"); if (!string.IsNullOrEmpty(loglevel)) { menmLogLevel = (LogMan.LogLevel)(Convert.ToInt16(loglevel)); } }