summaryrefslogtreecommitdiff
path: root/Aktywator/MainForm.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Aktywator/MainForm.cs')
-rw-r--r--Aktywator/MainForm.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs
index e254f9a..10fa819 100644
--- a/Aktywator/MainForm.cs
+++ b/Aktywator/MainForm.cs
@@ -310,6 +310,7 @@ namespace Aktywator
private void bMySQLTournament_Click(object sender, EventArgs e)
{
+ startLoading();
try
{
ChooseTournament choose = new ChooseTournament();
@@ -324,10 +325,12 @@ namespace Aktywator
{
MessageBox.Show(ee.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
+ stopLoading();
}
private void bRRBTournament_Click(object sender, EventArgs e)
{
+ startLoading();
try
{
OpenFileDialog fDialog = new OpenFileDialog();
@@ -344,6 +347,7 @@ namespace Aktywator
{
MessageBox.Show(ee.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
+ stopLoading();
}
private void updateTournamentInfo(Tournament tournament)
@@ -579,5 +583,17 @@ namespace Aktywator
{
teamNames.ShowDialog();
}
+
+ internal void startLoading()
+ {
+ tabControl1.Enabled = false;
+ this.Cursor = Cursors.WaitCursor;
+ }
+
+ internal void stopLoading()
+ {
+ tabControl1.Enabled = true;
+ this.Cursor = Cursors.Default;
+ }
}
}