using Controls; using Controls.Exceptions; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Controls.Models; using MigraDoc.DocumentObjectModel; namespace Forms { public partial class FormMain : Form { public FormMain() { InitializeComponent(); List people = new List() { new Person("aboba", "not aboba", "19"), new Person("aboba2", "not aboba2", "25"), new Person("aboba3", "not aboba3", "20"), }; customListBox1.setTemplate("Дорогой дневниов чтобы описать всю {FirstName} {LastName} возраста {Age}", "{", "}"); customListBox1.FillProperty(people[0], 0, "FirstName"); customListBox1.FillProperty(people[0], 0, "LastName"); customListBox1.FillProperty(people[0], 0, "Age"); customListBox1.FillProperty(people[1], 1, "FirstName"); customListBox1.FillProperty(people[1], 1, "LastName"); customListBox1.FillProperty(people[1], 1, "Age"); customListBox1.FillProperty(people[2], 2, "FirstName"); customListBox1.FillProperty(people[2], 2, "LastName"); customListBox1.FillProperty(people[2], 2, "Age"); } private void buttonLargeText_CLick(object sender, EventArgs e) { string[] strings = new string[] { "aboba", "тут я пишу супер много текста( ну или не супер много ) для сдачи", "best aboba", "гружу сюда супер большой тексттттт" }; largeTextComponent1.CreateDocument("C:\\Ulstu\\COP\\Cop_25\\Controls\\docs\\text.pdf", "OMEGA LABA 2", strings); } private void buttonCreateTable_Click(object sender, EventArgs e) { List columnInfos = new List() { new ColumnInfo("FirstName","Имя",50), new ColumnInfo("LastName","Фамилия",100), new ColumnInfo("Age","Возраст",75), }; List mergeCells = new List() { new MergeCells("Данные", new int[] {0,2,2}) }; List people = new List() { new Person("aboba", "not aboba", "19"), new Person("aboba2", "not aboba2", "25"), new Person("aboba3", "not aboba3", "20"), }; tableComponent1.CreateTable("C:\\Ulstu\\COP\\Cop_25\\Controls\\docs\\table.pdf", "TABLE LUTI", mergeCells, columnInfos, people); } private void buttonDiagram_Click(object sender, EventArgs e) { Dictionary> data = new Dictionary>(); data.Add("aboba1", new List { 12, 1, 2, 5, 2 }); data.Add("aboba2", new List { 3, 2, 1, 3, 6 }); data.Add("aboba3", new List { 7, 3, 1, 2, 5 }); diagramComponent1.CreateLineDiagram("C:\\Ulstu\\COP\\Cop_25\\Controls\\docs\\diagram.pdf", "ZAGOLOVOK", "LINEYNAYA", data, LegendAlign.bottom); } private void textBox1_TextChanged(object sender, EventArgs e) { } } }