private void loadActions() { Action.ActionsCollection actions = new Action.ActionsCollection(); actions.Load(); foreach (Action.Action action in actions.Actions) { ActionRowControl row = new ActionRowControl(); row.Action = action; flowLayoutPanel1.Controls.Add(row); flowLayoutPanel1.Refresh(); } }
private void LoadActions() { Action.ActionsCollection actionCollection = new Action.ActionsCollection(); actionCollection.Load(); Control btnAddButton = flowLayoutPanel1.Controls[flowLayoutPanel1.Controls.Count - 1]; flowLayoutPanel1.Controls.Clear(); foreach (Action.Action action in actionCollection.Actions) { ActionExecuteControl button = new ActionExecuteControl(); button.Action = action; flowLayoutPanel1.Controls.Add(button); button.Click += button2_Click; } flowLayoutPanel1.Controls.Add(btnAddButton); }