/// <summary> /// The command action to generate an html document for the selected month. /// </summary> public void PostToBlogCommandAction(object parameter) { if (MonthlyReportDocument == null) { return; } ExportMonthlyReportToToHtml exporter = new ExportMonthlyReportToToHtml(SelectedMonthTally, ReportsTallies, new List <string>(), true); string title; string content; if (exporter.GetAsBlogPost(out title, out content)) { BlogReadWrite.ViewModels.AddBlogPostViewModel addPostVM = new BlogReadWrite.ViewModels.AddBlogPostViewModel() { BlogPostTitle = title, BlogPostContent = content, ApplictionName = "Books DB", WindowTitle = "Books Blogger" }; BlogReadWrite.Views.AddBlogPostView bloggerDialog = new BlogReadWrite.Views.AddBlogPostView { DataContext = addPostVM }; bloggerDialog.ShowDialog(); } }
/// <summary> /// The command action to generate an html document for the selected month. /// </summary> public void SaveAsHtmlCommandAction(object parameter) { if (MonthlyReportDocument == null) { return; } // Create image files for the charts. IList <string> chartFiles = new List <string>(); GetChartFilesForPlots(chartFiles); ExportMonthlyReportToToHtml exporter = new ExportMonthlyReportToToHtml(SelectedMonthTally, ReportsTallies, chartFiles); string outfile; if (exporter.WriteToFile(out outfile)) { } }