| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using Core.Mes.Client.Comm;
- namespace Core.StlMes.Client.LgResMgt.Mcms
- {
- public partial class ShowMsg : UserControl
- {
- public ShowMsg()
- {
- InitializeComponent();
- }
- public void Clear()
- {
- uteMsg.Value= "";
- }
- public void AddMsg(string msg)
- {
- AddMsg(msg, true, false, false);
- }
- public void AddError(string msg)
- {
- AddMsg(msg,true,false,true);
- }
- public void AddMsg(string msg, bool addTime ,bool bold, bool showRedText)
- {
- StringBuilder sb = new StringBuilder();
- sb.Append(
- "<span style=\"color:Blue; font-family:Arial; font-style:italic;\">" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "</span>");
- sb.Append("<br/>");
- sb.Append("<span style=\"font-family:宋体;" + (bold ? "font-weight:bold; " : "") + (showRedText ? "color:Red; " : "") + " font-size:+3pt;\">" + msg +
- "</span>");
- sb.Append("<br/><br/>");
- if(uteMsg.Value.ToString3().Length <= 50000)
- sb.Append(uteMsg.Value.ToString2());
- uteMsg.Value = sb.ToString();
- }
- }
- }
|