|
public partial class Form1 : Form
{
BusyIndicator busyIndicator = new BusyIndicator();
Timer timer = new Timer();
public Form1()
{
InitializeComponent();
timer.Tick += Timer_Tick;
}
private void sfButton1_Click(object sender, EventArgs e)
{
timer.Enabled = true;
busyIndicator.Show(this);
timer.Start();
timer.Interval=10000;
this.sfButton1.Text = string.Empty;
}
private void Timer_Tick(object sender, EventArgs e)
{
busyIndicator.Hide();
}
} |