Ejemplo n.º 1
0
 public ReportExporter(DeviceDataFrom deviceDataFrom, SuperDevice device, IList <DigitalSignature> signatureList, string fileNameWithFullPath, bool isTempfile)
 {
     this.reportdataGenerator = new ReportDataGenerator();
     this.device               = device;
     this.deviceDataFrom       = deviceDataFrom;
     this.fileNameWithFullPath = fileNameWithFullPath;
     this.IsTempFile           = isTempfile;
     this.signatureList        = signatureList;
     unit = "°C";
     if ("F".Equals(this.device.TempUnit, StringComparison.Ordinal))
     {
         unit = "°F";
     }
     this.checkWhetherSectionShouldBeShown();
 }
Ejemplo n.º 2
0
 public ReportEditorExporter(DeviceDataFrom deviceDataFrom, SuperDevice device, IList <DigitalSignature> signatureList, Panel documentPanel, TextBox tbReportTitle, TextBox tbReportComment, Label lblReportEditorTip)
     : base(deviceDataFrom, device, signatureList)
 {
     if (Common.IsAuthorized(RightsText.CommentRecords))
     {
         this.isCommentShown = true;
     }
     this.tbReportTitle      = tbReportTitle;
     this.tbReportComment    = tbReportComment;
     this.lblReportEditorTip = lblReportEditorTip;
     this.documentPanel      = documentPanel;
     this.calculateSectionMargin();
     documentPanel.SizeChanged += new EventHandler(documentPanel_SizeChanged);
     documentPanel.Controls.Clear();
     this.AddNewPage();
     if (this.tbReportTitle != null)
     {
         this.tbReportTitle.TextChanged += new EventHandler(tbReportTitle_TextChanged);
     }
 }
Ejemplo n.º 3
0
 public ExcelReportExporter(DeviceDataFrom deviceDataFrom, SuperDevice device, IList <DigitalSignature> signatureList, string fileNameWithFullPath)
     : base(deviceDataFrom, device, signatureList, fileNameWithFullPath)
 {
 }
Ejemplo n.º 4
0
        public IDictionary <string, string[]> GetLoggingSummaryColumsContents(SuperDevice device, DeviceDataFrom deviceDatafrom)
        {
            IDictionary <string, string[]> result = new Dictionary <string, string[]>();

            string[] column1Contents = new string[5];
            string[] column2Contents = new string[5];

            result.Add("column1Contents", column1Contents);
            result.Add("column2Contents", column2Contents);

            column1Contents[0] = string.Format("Highest Temperature: {0}", Common.SetTempTimeFormat(device.HighestC));
            column1Contents[1] = string.Format("Lowest Temperature: {0}", Common.SetTempTimeFormat(device.LowestC));
            column1Contents[2] = string.Format("Average Temperature: {0}{1}", device.AverageC, string.IsNullOrEmpty(device.AverageC) ? string.Empty : "°" + device.TempUnit);
            column1Contents[3] = string.Format("Mean Kinetic Temperature: {0}{1}", device.MKT, string.IsNullOrEmpty(device.MKT) ? string.Empty : "°" + device.TempUnit);
            string finalString      = string.Empty;
            int    maxDisplayLength = 10;
            string loggerReader     = device.LoggerRead;

            if (loggerReader == null)
            {
                loggerReader = string.Empty;
            }
            string[] loggerReadereString = loggerReader.Split(new char[] { '@' });
            if (loggerReadereString.Length >= 2)
            {
                if (Common.Versions == SoftwareVersions.S || string.IsNullOrWhiteSpace(loggerReadereString[0]))
                {
                    finalString = string.Format("Logger Read: @{0}", TempsenFormatHelper.GetFormattedDateTime(Convert.ToDateTime(loggerReadereString[1])));
                }
                else if (Common.Versions == SoftwareVersions.Pro)
                {
                    if (loggerReadereString[0].Length > maxDisplayLength)
                    {
                        finalString = string.Format("Logger Read: By {0}@{1}", loggerReadereString[0].Substring(0, maxDisplayLength) + "...", TempsenFormatHelper.GetFormattedDateTime(Convert.ToDateTime(loggerReadereString[1])));
                    }
                    else
                    {
                        finalString = string.Format("Logger Read: By {0}@{1}", loggerReadereString[0], TempsenFormatHelper.GetFormattedDateTime(Convert.ToDateTime(loggerReadereString[1])));
                    }
                }
            }
            else
            {
                finalString = "Logger Read:";
            }

            column1Contents[4] = finalString;

            column2Contents[0] = string.Format("Start Time/First Point: {0}", device.LoggingStart == DateTime.MinValue ? string.Empty : TempsenFormatHelper.GetFormattedDateTime(device.LoggingStart.ToLocalTime()));
            column2Contents[1] = string.Format("Stop Time: {0}", device.LoggingEnd == DateTime.MinValue ? string.Empty : TempsenFormatHelper.GetFormattedDateTime(device.LoggingEnd.ToLocalTime()));
            column2Contents[2] = string.Format("Data Points: {0}", device.DataPoints == 0 ? string.Empty : device.DataPoints.ToString());
            column2Contents[3] = string.Format("Trip Length: {0}", device.TripLength);
            column2Contents[4] = string.Empty;
            return(result);
        }
Ejemplo n.º 5
0
 public PDFReportExporter(DeviceDataFrom deviceDataFrom, SuperDevice device, IList <DigitalSignature> signatureList, string fileNameWithFullPath, bool isTempFile)
     : base(deviceDataFrom, device, signatureList, fileNameWithFullPath, isTempFile)
 {
     this.calculateSectionMargin();
 }
Ejemplo n.º 6
0
 public ReportExporter(DeviceDataFrom deviceDataFrom, SuperDevice device, IList <DigitalSignature> signatureList, string fileNameWithFullPath)
     : this(deviceDataFrom, device, signatureList, fileNameWithFullPath, false)
 {
 }
Ejemplo n.º 7
0
 public ReportExporter(DeviceDataFrom deviceDataFrom, SuperDevice device, IList <DigitalSignature> signatureList) : this(deviceDataFrom, device, signatureList, "memory")
 {
 }