private void createGroup(string name, Color backColor, List <word> Words) { UCGroup gr = new UCGroup(); gr.setWordsPanel(WordsPanel); gr.setBackColor(backColor); gr.setName(name); gr.setWords(Words); panel.Controls.Add(gr); }
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); }