private void OnRunComplete(Report report,RunLogItem logitem)
        {
            _shellService.PostStatusMessage(StatusCatgory.Info, "Complete");

            RunCodeInUiThread(() =>
            {
                _shellService.OpenChildView("ReportViewer", "Report Viewer", option: new ViewOptions { Height = 600, Width = 800, Payload = logitem });
            });
        }
Example #2
0
        private string SaveReportToFile(Report report)
        {
            try
            {
                if (!Directory.Exists(_dirReports))
                {
                    Directory.CreateDirectory(_dirReports);
                }

                var path = string.Format("{0}\\{1}_{2:yyyyMMddHHmmss}.xml",
                    _dirReports, report.Project, DateTime.Now);

                using (var fs = XmlWriter.Create(path))
                {
                    var xs = new XmlSerializer(typeof(Report));

                    xs.Serialize(fs, report);
                }

                return path;
            }
            catch (Exception ex)
            {
                throw new Exception("Error occured when saving report to file", ex);
            }
        }