Zakharov_Rostislav d99c4b78a0 feat(lab2): do lab2
task 1 complete

task2

task2 change test data initialization

task3

task2 fix

fixes

add percents

minor fixes
2024-10-11 15:38:17 +04:00

46 lines
1008 B
C#

using ComponentLibrary1.office_package;
using ComponentLibrary1.office_package.HelperEnums;
using ComponentLibrary1.office_package.HelperModels;
using ComponentLibrary1.office_package.Implements;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComponentLibrary1.pdf_diagram
{
public partial class PdfDiagram : Component
{
ISaveToPdf SaveToPdf = new SaveToPdf();
public PdfDiagram()
{
InitializeComponent();
}
public PdfDiagram(IContainer container)
{
container.Add(this);
InitializeComponent();
}
public void CreateDiagram(PdfDiagramInfo info)
{
info.CheckFields();
SaveToPdf.CreatePdf(info);
SaveToPdf.CreateParagraph(new PdfParagraph
{
Text = info.Title,
Style = "NormalTitle",
ParagraphAlignment = PdfParagraphAlignmentType.Center
});
SaveToPdf.CreatePieChart(info);
SaveToPdf.SavePdf(info);
}
}
}