Skip to content

Commit 84b80fe

Browse files
committed
Update Form1.cs
1 parent 8742a4b commit 84b80fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Form1.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ private void btn_split_Click(object sender, EventArgs e)
7979

8080
try
8181
{
82+
btn_split.Enabled = false;
8283
List<ExcelSheetData> data = excelHelper.read_excel(tb_file_loc.Text);
8384
int max_total_rows = excelHelper.GetSheetWithMostRows(data).RowCount;
8485
int max_rows = (split_by_rows) ? split_num : (max_total_rows / split_num) + 1;
@@ -104,10 +105,12 @@ private void btn_split_Click(object sender, EventArgs e)
104105

105106
progressBar1.Value = 100;
106107
MessageBox.Show("Completed successfully!");
108+
btn_split.Enabled = true;
107109
}
108110
catch (Exception ex)
109111
{
110112
MessageBox.Show("Failed to split.");
113+
btn_split.Enabled = true;
111114
}
112115
}
113116
}

0 commit comments

Comments
 (0)