private bool checkGroupColor(Color c) { foreach (Control control in panel.Controls) { if (control is UCGroup) { UCGroup g = (UCGroup)control; Color color = g.getBackColor(); if (color == c) { return(false); } } } return(true); }
public List <group> getGroups() { List <group> g = new List <group>(); foreach (Control c in panel.Controls) { if (c is UCGroup) { UCGroup gr = (UCGroup)c; g.Add(new group() { name = gr.getName(), backColor = gr.getBackColor(), words = gr.getWords() }); } } return(g); }