Ejemplo n.º 1
0
        public void SaveList()
        {
            FitnessInfoViewModel fi = new FitnessInfoViewModel();

            // Writing obervable collection to file
            FitnessInfoViewModel.SaveLocaFitnessData(fitnessInfoList);
        }
Ejemplo n.º 2
0
        public void AddToList(FitnessInfoViewModel item)
        {
            // add an entry to the list
            FitnessInfoViewModel fivm = new FitnessInfoViewModel();

            fivm.DateToStore = DateTime.Now;
            fitnessInfoList.Add(fivm);
        }
Ejemplo n.º 3
0
        public void ClearUserInput()
        {
            FitnessInfoViewModel fivm = new FitnessInfoViewModel();

            fivm.DateToStore = DateTime.Now.ToLocalTime();
        }
Ejemplo n.º 4
0
 // Methods
 public void ReadList()
 {
     fitnessInfoList = FitnessInfoViewModel.ReadLocalFitnessData(); // Read list of fitness info
 }
Ejemplo n.º 5
0
 public void DeleteOneEntry(FitnessInfoViewModel item)
 {
     fitnessInfoList.Remove(item);
     // Save on delete
     FitnessInfoViewModel.SaveLocaFitnessData(fitnessInfoList);
 }
Ejemplo n.º 6
0
        private void BtnSaveFile_Clicked(object sender, EventArgs e)
        {
            FitnessInfoViewModel fitnessEntry = (sender as MenuItem).CommandParameter as FitnessInfoViewModel;

            (BindingContext as MainPageViewModel).SaveListCommand.Execute(fitnessEntry);
        }