private void UpdateChoreInView(Chore savedChore)
        {
            ListViewItem listviewitem = choresListview.Items[savedChore.Key];
            ChoreAdapter adapter      = new ChoreAdapter(savedChore);

            adapter.Update(listviewitem);
        }
Пример #2
0
 private void PopulateListWith(List <Chore> chores)
 {
     foreach (Chore chore in chores)
     {
         ListViewItem lvItem = new ChoreAdapter(chore).ToListViewItem();
         completedLv.Items.Add(lvItem);
     }
 }
Пример #3
0
        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);
        }
Пример #4
0
        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());
        }