Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list<int> listName = new list<int>();
- for(int i; i <= listName[0];i++)
- {
- button(i).Enabled = false;
- }
- List<Button> buttonsToDisable = new List<Button>()
- {
- button1,
- button2
- };
- foreach (var button in buttonsToDisable)
- {
- button.Enabled = false;
- }
- foreach(var button in groupBox1.Controls.OfType<Button>())
- {
- button.Enabled = false;
- }
- List<int> buttonSubfixId = new List<int>()
- {
- 1,
- 2
- };
- foreach (var id in buttonSubfixId)
- {
- var controls = this.Controls.Find("button" + id.ToString(), true).OfType<Button>();
- if (controls.Count()>0)
- {
- foreach (var button in controls)
- {
- button.Enabled = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement