77 lines
2.5 KiB
C#
77 lines
2.5 KiB
C#
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();
|
|
|
|
}
|
|
|
|
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<ColumnInfo> columnInfos = new List<ColumnInfo>()
|
|
{
|
|
new ColumnInfo("FirstName","Имя",50),
|
|
new ColumnInfo("LastName","Фамилия",100),
|
|
new ColumnInfo("Age","Возраст",75),
|
|
};
|
|
|
|
List<MergeCells> mergeCells = new List<MergeCells>()
|
|
{
|
|
new MergeCells("Данные", new int[] {0,2,2})
|
|
};
|
|
|
|
List<Person> people = new List<Person>()
|
|
{
|
|
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<string, List<Double>> data = new Dictionary<string, List<Double>>();
|
|
data.Add("aboba1", new List<double> { 12, 1, 2, 5, 2 });
|
|
data.Add("aboba2", new List<double> { 3, 2, 1, 3, 6 });
|
|
data.Add("aboba3", new List<double> { 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)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|