private void WriteToCSV()
        {
            // Don't write if a task is currently being tracked
            if (IsTracking)
            {
                Trace.WriteLine("Currently tracking: " + IsTracking.ToString());
                return;
            }

            CsvExport myExport  = new CsvExport(includeColumnSeparatorDefinitionPreamble: false);
            string    writeDate = TrackingDate.ToString("MM/dd");
            int       numRows   = 0;



            foreach (TaskViewModel taskVM in TaskViewModelsView)
            {
                TaskItem ti = taskVM.MainTask;
                if (ti.WBSCode != null)
                {
                    if (ti.SecondsTracked != null)
                    {
                        myExport.AddRow();
                        myExport["Date"]        = writeDate;
                        myExport["WBS Code"]    = ti.WBSCode.Code;
                        myExport["Description"] = ti.Description;
                        myExport["Hours"]       = Math.Round((double)ti.SecondsTracked / 3600, 1);
                        myExport["Tax Area"]    = "110";

                        numRows += 1;
                    }
                }
            }

            if (numRows > 0)
            {
                myExport.ExportToFile("extract.csv");
            }
        }
 private void ChangeDisplayDate(int daysToAdd)
 {
     TrackingDate = TrackingDate.AddDays(daysToAdd);
     TaskViewModelsView.Refresh();
     UpdateTotalTime();
 }