/// <summary> /// This constructor will initialise the internal members /// </summary> public AvailableReports(Workshare.Reports.MailMessage.Message[] msgs) { if (msgs == null) { System.Diagnostics.Trace.WriteLine(Workshare.Reports.Properties.Resources.TRACE_NULL, "AvailableReports"); throw (new ArgumentNullException("messages", Workshare.Reports.Properties.Resources.TRACE_NULL)); } InitializeComponent(); m_msgs = new Collection<Workshare.Reports.MailMessage.Message>(msgs); m_viewer = new ReportViewer(); foreach (Workshare.Reports.MailMessage.Message msg in m_msgs) m_viewer.AddMessage(msg); }
private static void ShowSingleReport(Workshare.Reports.MailMessage.Message message) { if (message == null) return; ReportViewer rv = new ReportViewer(); rv.Report = ReportType.MessageReport; //if (m_settings.IsProtectInstalled) //{ // if (string.Compare(message.ChannelType, "SMTP", true, System.Threading.Thread.CurrentThread.CurrentCulture) == 0) // rv.Report = ReportType.FullMessageReport; // else if (string.Compare(message.ChannelType, "ActiveContent", true, System.Threading.Thread.CurrentThread.CurrentCulture) == 0) // rv.Report = ReportType.FullFileReport; //} rv.AddMessage(message); rv.Show(); }