Skip to content

Commit

Permalink
nanabooboo. kanna no like wrapping (#2)
Browse files Browse the repository at this point in the history
* yes

* nanabooboo. kanna no like wrapping

---------

Co-authored-by: Kanna <[email protected]>
  • Loading branch information
zrodevkaan and MistressPlague committed Dec 22, 2023
1 parent 664fc76 commit efdeaa9
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions Easy Minecraft Modpacks/MainUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,19 +361,31 @@ private void MainUI_FormClosing(object sender, FormClosingEventArgs e)
}
}

private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
private void UpdateRows()
{
UpdateRow(1);
var intyes = 0;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
var Name = row.Cells[1]?.Value?.ToString();

if (Name == null) continue;
if (Name.ToLower().Contains(" api") || Name.ToLower().Contains(" config") || Name.ToLower().Contains(" lib")) continue;

intyes++;
}

label2.Text = $"{dataGridView1.Rows.Count} ({intyes})";

}

private void dataGridView1_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e)
private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
{
UpdateRow(-1);
UpdateRows();
}

private void UpdateRow(int stuff)
private void dataGridView1_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e)
{
label2.Text = (int.Parse(label2.Text) + stuff).ToString();
UpdateRows();
}
}

Expand Down

0 comments on commit efdeaa9

Please sign in to comment.