void Oznaci(String s, Label l) { uplateniBroeviTB.Text = ""; int tmp; int.TryParse(s, out tmp); l.BackColor = Color.Green; BrojUplateniBroevi++; OdigraniBroevi.Add(tmp); addLabel(l); if (OdigraniBroevi.Count > 0) { for (int i = 0; i < OdigraniBroevi.Count; i++) { uplateniBroeviTB.Text += OdigraniBroevi[i].ToString() + " "; } } }
void Remove(String s, Label l) { uplateniBroeviTB.Text = ""; int tmp; int.TryParse(s, out tmp); OdigraniBroevi.Remove(tmp); l.BackColor = Control.DefaultBackColor; BrojUplateniBroevi--; RemoveLabel(l); if (OdigraniBroevi.Count > 0) { for (int i = 0; i < OdigraniBroevi.Count; i++) { uplateniBroeviTB.Text += OdigraniBroevi[i].ToString() + " "; } } else { uplateniBroeviTB.Text = ""; } }