public bool ReadData()
        {
            if (isIOInProgress)
            {
                return(false);
            }

            try
            {
                isIOInProgress = true;
                if (System.IO.File.Exists(strFilePath))
                {
                    TimerCollection.Clear();

                    // read the model...
                    IEnumerable <Data.ActivityTimerRow> rows;
                    using (System.IO.StreamReader sReader = new System.IO.StreamReader(strFilePath))
                        using (CsvHelper.CsvReader csvReader = new CsvHelper.CsvReader(sReader))
                        {
                            rows = csvReader.GetRecords <Data.ActivityTimerRow>();
                            foreach (Data.ActivityTimerRow row in rows)
                            {
                                // and update the ViewModel from the Model...
                                AddTimer(ActivityTimerVM.Create(TimeSpan.FromHours(row.TotalHours), row.ActivityText));
                            }
                        }
                    return(true);
                }
                return(false);
            }
            finally
            {
                isIOInProgress = false;
            }
        }
 protected void AddTimer(ActivityTimerVM timerVm)
 {
     timerVm.DeleteRequested += DeleteTimer;
     (timerVm as System.ComponentModel.INotifyPropertyChanged).PropertyChanged += TimerVM_PropertyChanged;
     TimerCollection.Add(timerVm);
 }
 public virtual void AddNewTimer()
 {
     AddTimer(ActivityTimerVM.Create());
 }