public void SaveList() { FitnessInfoViewModel fi = new FitnessInfoViewModel(); // Writing obervable collection to file FitnessInfoViewModel.SaveLocaFitnessData(fitnessInfoList); }
public void AddToList(FitnessInfoViewModel item) { // add an entry to the list FitnessInfoViewModel fivm = new FitnessInfoViewModel(); fivm.DateToStore = DateTime.Now; fitnessInfoList.Add(fivm); }
public void ClearUserInput() { FitnessInfoViewModel fivm = new FitnessInfoViewModel(); fivm.DateToStore = DateTime.Now.ToLocalTime(); }
// Methods public void ReadList() { fitnessInfoList = FitnessInfoViewModel.ReadLocalFitnessData(); // Read list of fitness info }
public void DeleteOneEntry(FitnessInfoViewModel item) { fitnessInfoList.Remove(item); // Save on delete FitnessInfoViewModel.SaveLocaFitnessData(fitnessInfoList); }
private void BtnSaveFile_Clicked(object sender, EventArgs e) { FitnessInfoViewModel fitnessEntry = (sender as MenuItem).CommandParameter as FitnessInfoViewModel; (BindingContext as MainPageViewModel).SaveListCommand.Execute(fitnessEntry); }