void userControlGra_Click(object sender, EventArgs e) { userControlGra uc = this; if (uc.Height == 159) { uc.Height = 335; } else { uc.Height = 159; } }
void filtrujGry(Gry gra) { if (listBoxGracze.SelectedItems.Contains(gra.Gracz) && gra.createDate >= ToUnixTime(dateTimePickerOd.Value) && gra.createDate <= ToUnixTime(dateTimePickerDo.Value)) { if (gra.Postac == comboBoxPostac.SelectedItem) { if (tabControl.SelectedIndex == 0) { userControlGra wyswietlanaGra = new userControlGra(gra); flowLayoutPanelGry.Controls.Add(wyswietlanaGra); } listaGry.Add(gra); } else if (comboBoxPostac.SelectedItem == "---------") { if (tabControl.SelectedIndex == 0) { userControlGra wyswietlanaGra = new userControlGra(gra); flowLayoutPanelGry.Controls.Add(wyswietlanaGra); } listaGry.Add(gra); } } }