internal void LoadSettings(DateTime end)
 {
     settings = new TaskSettings();
     settings = settings.Load();
     destination_email_address.Text = settings.weeklyDestination;
     email_subject.Text = "Work Report for week " + (int)(end.DayOfYear*0.142857143) + ", " + end.Year;
     Reports report = new Reports();
     email_body.Buffer.Text = report.CompileWeeklyReport(end);
 }
 static void Daily()
 {
     Reports dailyreport = new Reports();
     dailyreportmessage = dailyreport.CompileDailyReport(selected);
     Notification notify = new Notification();
     notify.Summary = "Daily Report " + selected.ToShortDateString();
     notify.Body = dailyreportmessage;
     notify.AddAction("send", "Send", HandleSendReport);
     notify.Urgency = Urgency.Critical;
     notify.Show();
 }
Exemple #3
0
 static void HandleDailyReportActivated(object sender, EventArgs e)
 {
     Reports dailyreport = new Reports();
     dailyreportmessage = dailyreport.CompileDailyReport();
     Notification notify = new Notification();
     notify.Summary = "Daily Report";
     notify.Body = dailyreportmessage;
     notify.AddAction("send", "Send", HandleSendDaily);
     notify.AddAction("select", "Select Date", HandleSelectedReportActivated);
     notify.Urgency = Urgency.Critical;
     notify.Show();
 }
Exemple #4
0
 static void HandleSendDaily(object sender, ActionArgs e)
 {
     Reports.SendReport(dailyreportmessage);
 }
Exemple #5
0
 static void HandleSendReport(object sender, ActionArgs e)
 {
     Reports.SendReport(dailyreportmessage, selected);
 }