Пример #1
0
        /// <summary>
        /// 提示
        /// </summary>
        /// <param name="type">提示类型</param>
        /// <param name="msg">提示信息</param>
        /// <param name="code">提示码</param>
        public void Show(Msg_Type type, string msg)
        {
            switch (type)
            {
            case Msg_Type.Error:
                BackColor = Color.Red;
                break;

            case Msg_Type.Operate:
                BackColor = Color.LightGreen;
                break;

            case Msg_Type.Warning:
                BackColor = Color.Yellow;
                break;

            default:
                return;
            }
            Visible        = true;
            label.Text     = msg;
            timer.Interval = 5000;
            timer.Start();
        }
Пример #2
0
 /// <summary>
 /// 发送消息
 /// </summary>
 /// <param name="type"></param>
 /// <param name="msg"></param>
 public static void ShowMessage(Msg_Type type, string msg) => Default?.Show(type, msg);