Skip to content

Commit

Permalink
Added a button to (un)select all webhooks in log sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
Plenyx committed Aug 16, 2024
1 parent 5f90ae3 commit 932a328
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
15 changes: 14 additions & 1 deletion Forms/FormLogSession.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 18 additions & 2 deletions Forms/FormLogSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ private void RadioButtonExcludeSelectedWebhooks_CheckedChanged(object sender, Ev
ReloadWebhooks();
}

private void ButtonReloadWebhooks_Click(object sender, EventArgs e) => ReloadWebhooks();

private void RadioButtonAllActive_CheckedChanged(object sender, EventArgs e)
{
if (!radioButtonAllActive.Checked)
Expand All @@ -207,5 +205,23 @@ private void RadioButtonAllActive_CheckedChanged(object sender, EventArgs e)
groupBoxSelectedWebhooks.Enabled = false;
checkedListBoxSelectedWebhooks.Items.Clear();
}

private void ButtonReloadWebhooks_Click(object sender, EventArgs e) => ReloadWebhooks();

private void ButtonUnSelectAllWebhooks_Click(object sender, EventArgs e)
{
if (checkedListBoxSelectedWebhooks.CheckedItems.Count == checkedListBoxSelectedWebhooks.Items.Count)
{
for (int i = 0; i < checkedListBoxSelectedWebhooks.Items.Count; i++)
{
checkedListBoxSelectedWebhooks.SetItemChecked(i, false);
}
return;
}
for (int i = 0; i < checkedListBoxSelectedWebhooks.Items.Count; i++)
{
checkedListBoxSelectedWebhooks.SetItemChecked(i, true);
}
}
}
}

0 comments on commit 932a328

Please sign in to comment.