private void UpdateChoreInView(Chore savedChore) { ListViewItem listviewitem = choresListview.Items[savedChore.Key]; ChoreAdapter adapter = new ChoreAdapter(savedChore); adapter.Update(listviewitem); }
private void PopulateListWith(List <Chore> chores) { foreach (Chore chore in chores) { ListViewItem lvItem = new ChoreAdapter(chore).ToListViewItem(); completedLv.Items.Add(lvItem); } }
private List <Chore> SelectedChores() { List <Chore> selected = new List <Chore>(); foreach (ListViewItem lvItem in choresLv.SelectedItems) { Chore chore = ChoreAdapter.ParseChore(lvItem); selected.Add(chore); } return(selected); }
private double TallySelectedChores() { double talliedtotal = 0; foreach (ListViewItem lvItem in choresLv.SelectedItems) { Chore chore = ChoreAdapter.ParseChore(lvItem); talliedtotal += chore.Value; } return(talliedtotal); }
private void AddChoreToView(Chore chore) { ChoreAdapter adapter = new ChoreAdapter(chore); choresListview.Items.Add(adapter.ToListViewItem()); }