1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace ShareWifi.Views.Components
- {
- /// <summary>
- /// 进度条弹框消息
- /// </summary>
- public partial class SimpleAlert : Form
- {
- public SimpleAlert()
- {
- InitializeComponent();
- }
- public static SimpleAlert getInstance()
- {
- return new SimpleAlert();
- }
- public void Show(string message)
- {
- lbMessage.Text = message;
- Show();
- }
- private void SimpleAlert_Load(object sender, EventArgs e)
- {
- timer1.Start();
- }
- /// <summary>
- /// 500 ms 之后窗体自动关闭
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void timer1_Tick(object sender, EventArgs e)
- {
- timer1.Stop();
- Close();
- }
- }
- }
|