private void save() { try { ReadWriteXml.savedata(druhowie, "supernazwa.xml"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void Window_Initialized(object sender, EventArgs e) { druhowie = (List <Druh>)ReadWriteXml.readdata("", ""); List <Druh> koniecKolejki = new List <Druh>(); foreach (var item in druhowie) { if (item.DataUrodzin.DayOfYear >= DateTime.Today.DayOfYear) { lvCommingSoon.Items.Add(item); } else { koniecKolejki.Add(item); } } koniecKolejki.Sort(comparer); foreach (var item in koniecKolejki) { lvCommingSoon.Items.Add(item); } }