Skip to content

Commit a69bb7c

Browse files
committed
fix crash
1 parent 8f94ca3 commit a69bb7c

5 files changed

Lines changed: 4 additions & 4 deletions

File tree

.vs/LFAR/v16/.suo

-2.5 KB
Binary file not shown.
0 Bytes
Binary file not shown.

LFAR/Form1.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ private void Form1_Load(object sender, EventArgs e)
102102
catch (Exception exception) { MessageBox.Show(exception.Message); }
103103

104104
// focus on last row
105-
dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.RowCount - 1].Cells[0];
105+
try { dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.RowCount - 1].Cells[0]; } catch { }
106+
107+
label1.Text = "Total: " + dataGridView1.RowCount.ToString() + " lines";
106108
}
107109

108110
private void deleteCollectionButton_Click(object sender, EventArgs e)
@@ -170,7 +172,7 @@ private void button7_Click(object sender, EventArgs e)
170172
dataGridView1.Rows.Add(false, "......", "......", "......");
171173

172174
// focus on last row
173-
dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.RowCount - 1].Cells[0];
175+
try { dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.RowCount - 1].Cells[0]; } catch { }
174176
}
175177

176178
private void buttonSelectPathOfFile(object sender, EventArgs e)
@@ -192,8 +194,6 @@ private void buttonDoReplaceJob_Click(object sender, EventArgs e)
192194
DialogResult result = MessageBox.Show("This action will replace all lines with the values specified.", "Confirmation", MessageBoxButtons.YesNo);
193195
if (result == DialogResult.Yes)
194196
{
195-
label1.Text = "Attempting new jobs..";
196-
197197
foreach (DataGridViewRow row in dataGridView1.Rows)
198198
{
199199
// find and replace line from datagridview

LFAR/obj/Debug/LFAR.exe

0 Bytes
Binary file not shown.

LFAR/obj/Debug/LFAR.pdb

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)