protected override void GenerateSignatures() { if (this.isSignatureShown) { float signatureRowHeight = 25f; this.GenerateReportFooter(); this.AddNewPage(); SectionControl sectionSignature = new SectionControl(false); sectionSignature.IsCellBorderShown = true; sectionSignature.IsBorderShown = false; sectionSignature.IsAllowNewLine = true; sectionSignature.Width = DefaultSectionWidth; sectionSignature.DefaultRowHeight = signatureRowHeight; sectionSignature.SetSectionTitle("Electronic Signatures"); for (int i = 0; i < this.signatureList.Count; i++) { sectionSignature.AddRow(new string[] { (i + 1).ToString(), this.signatureList[i].ToString(Common.GlobalProfile.DateTimeFormator) }); } sectionSignature.InitializeLayout(new float[] { 0.05f, 0.95f }); sectionSignature.PaintByUser(); this.rowsInfectedBySignature = (int)Math.Ceiling(((sectionSignature.Height + sectionMargin * 3) / this.dataListContentCellHeight)); this.AddSection(sectionSignature); } }
protected override void GenerateLoggingSummary() { SectionControl sectionLoggingSummary = new SectionControl(); sectionLoggingSummary.Width = DefaultSectionWidth; sectionLoggingSummary.SetSectionTitle("Logging Summary"); IDictionary <string, string[]> loggingSummaryContents = this.reportdataGenerator.GetLoggingSummaryColumsContents(this.device, this.deviceDataFrom); string[] column1Contents = loggingSummaryContents["column1Contents"]; string[] column2Contents = loggingSummaryContents["column2Contents"]; sectionLoggingSummary.AddRow(new string[] { column1Contents[0], column2Contents[0] }); sectionLoggingSummary.AddRow(new string[] { column1Contents[1], column2Contents[1] }); sectionLoggingSummary.AddRow(new string[] { column1Contents[2], column2Contents[2] }); sectionLoggingSummary.AddRow(new string[] { column1Contents[3], column2Contents[3] }); sectionLoggingSummary.AddRow(new string[] { column1Contents[4], column2Contents[4] }); sectionLoggingSummary.InitializeLayout(new float[] { 0.5f, 0.5f }); this.AddSection(sectionLoggingSummary); }
protected override void GenerateDeviceConfigurationAndTripInfomation() { int widthBetweenTwoSection = 20; SectionControl sectionDeviceConfig = new SectionControl(); sectionDeviceConfig.Width = (PageWidth - PageHorizonalPadding * 2) / 2 - widthBetweenTwoSection / 2; sectionDeviceConfig.SetSectionTitle("Device Configuration"); IDictionary <string, string[]> deviceConfigurationContents = this.reportdataGenerator.GetDeviceConfigurationTripInfoRowsContents(this.device); string[] row1Contents = deviceConfigurationContents["row1Contents"]; string[] row2Contents = deviceConfigurationContents["row2Contents"]; string[] row3Contents = deviceConfigurationContents["row3Contents"]; string[] tripInfoContents = deviceConfigurationContents["tripInfoContents"]; sectionDeviceConfig.AddRow(row1Contents); sectionDeviceConfig.AddRow(row2Contents); sectionDeviceConfig.AddRow(row3Contents); sectionDeviceConfig.InitializeLayout(new float[] { 0.42f, 0.58f }); this.AddSection(sectionDeviceConfig); SectionControl sectionTripInfo = new SectionControl(); sectionTripInfo.Top = sectionDeviceConfig.Top; sectionTripInfo.Width = sectionDeviceConfig.Width; sectionTripInfo.Left = sectionDeviceConfig.Right + widthBetweenTwoSection; sectionTripInfo.IsAllowNewLine = true; sectionTripInfo.IsTripInfoSection = true; sectionTripInfo.SetSectionTitle(string.Format("Trip Information_{0}", reportdataGenerator.GetLocalTimeZoneString())); sectionTripInfo.AddRow(new string[] { "Trip Number:", tripInfoContents[0] }); sectionTripInfo.AddRow(new string[] { tripInfoContents[1].Trim(), tripInfoContents[2] }); sectionTripInfo.AddRow(new string[] { string.Empty, string.Empty }); sectionTripInfo.InitializeLayout(new float[] { 0.203f, 0.797f }); this.AddSection(sectionTripInfo); }
protected override void GenerateAlarms() { SectionControl sectionAlarm = new SectionControl(); sectionAlarm.HorizonalTextAlignment = ContentAlignment.MiddleCenter; sectionAlarm.Width = DefaultSectionWidth; sectionAlarm.SetSectionTitle(this.reportdataGenerator.GetAlarmSectionTitle(this.device)); IDictionary <string, string[]> alarmDataContents = this.reportdataGenerator.GetAlarmRowContents(this.device); string[] highRowContents = alarmDataContents["highRowContents"]; string[] lowRowContents = alarmDataContents["lowRowContents"]; string[] a1RowContents = alarmDataContents["a1RowContents"]; string[] a2RowContents = alarmDataContents["a2RowContents"]; string[] a3RowContents = alarmDataContents["a3RowContents"]; string[] a4RowContents = alarmDataContents["a4RowContents"]; string[] a5RowContents = alarmDataContents["a5RowContents"]; string[] a6RowContents = alarmDataContents["a6RowContents"]; int totalRows = 6; if (this.device.AlarmMode == 0) { // nothing to do } else if (device.AlarmMode == 1) { sectionAlarm.SetHeader(new string[] { "Alarm Zones", "Alarm Delay", "Total Time", "Events", "First Triggered", "Alarm Status" }); if (reportdataGenerator.IsStringArrayNotEmpty(highRowContents)) { sectionAlarm.AddRow(highRowContents); totalRows--; } if (reportdataGenerator.IsStringArrayNotEmpty(lowRowContents)) { sectionAlarm.AddRow(lowRowContents); totalRows--; } } else if (device.AlarmMode == 2) { sectionAlarm.SetHeader(new string[] { "Alarm Zones", "Alarm Delay", "Total Time", "Events", "First Triggered", "Alarm Status" }); if (reportdataGenerator.IsStringArrayNotEmpty(a1RowContents)) { sectionAlarm.AddRow(a1RowContents); totalRows--; } if (reportdataGenerator.IsStringArrayNotEmpty(a2RowContents)) { sectionAlarm.AddRow(a2RowContents); totalRows--; } if (reportdataGenerator.IsStringArrayNotEmpty(a3RowContents)) { sectionAlarm.AddRow(a3RowContents); totalRows--; } if (reportdataGenerator.IsStringArrayNotEmpty(a4RowContents)) { sectionAlarm.AddRow(a4RowContents); totalRows--; } if (reportdataGenerator.IsStringArrayNotEmpty(a5RowContents)) { sectionAlarm.AddRow(a5RowContents); totalRows--; } if (reportdataGenerator.IsStringArrayNotEmpty(a6RowContents)) { sectionAlarm.AddRow(a6RowContents); totalRows--; } } for (int i = 0; i < totalRows; i++) { sectionAlarm.AddRow(new string[6]); } sectionAlarm.InitializeLayout(new float[] { 0.18f, 0.19f, 0.17f, 0.10f, 0.23f, 0.13f }, new ContentAlignment[] { ContentAlignment.MiddleLeft, ContentAlignment.MiddleLeft, ContentAlignment.MiddleLeft, ContentAlignment.MiddleLeft, ContentAlignment.MiddleLeft, ContentAlignment.MiddleRight }); this.AddSection(sectionAlarm); }