хз
This commit is contained in:
parent
21fc0e3e1d
commit
f6c9b56bb1
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<TargetFramework>net8.0-windows7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
@ -48,12 +48,9 @@ namespace Controls
|
||||
|
||||
Chart chart = new Chart(ChartType.Line);
|
||||
|
||||
//Задание легенды
|
||||
chart.Legend.Docking = (DockingType)legendAlign;
|
||||
chart.Legend.LineFormat.Visible = true;
|
||||
|
||||
|
||||
//Добавление серий
|
||||
foreach (var item in data)
|
||||
{
|
||||
Series series = chart.SeriesCollection.AddSeries();
|
||||
@ -67,7 +64,6 @@ namespace Controls
|
||||
series.Add(vals);
|
||||
}
|
||||
|
||||
//Объявление осей
|
||||
chart.XAxis.MajorTickMark = TickMarkType.Outside;
|
||||
chart.YAxis.MajorTickMark = TickMarkType.Outside;
|
||||
chart.YAxis.HasMajorGridlines = true;
|
||||
|
@ -55,21 +55,17 @@ namespace Controls
|
||||
|
||||
_section = _document.AddSection();
|
||||
|
||||
//Заголовок
|
||||
var paragraph = _section.AddParagraph(title);
|
||||
paragraph.Format.SpaceAfter = "0.3cm";
|
||||
|
||||
//Создание таблицы
|
||||
var table = _section.AddTable();
|
||||
table.Borders.Visible = true;
|
||||
|
||||
//Создание колонок
|
||||
for (int i = 0; i < colInfo.Count; i++)
|
||||
{
|
||||
table.AddColumn(colInfo[i].Width);
|
||||
}
|
||||
|
||||
//Создание строк
|
||||
if (mergeCells != null)
|
||||
{
|
||||
table.AddRow();
|
||||
@ -83,7 +79,6 @@ namespace Controls
|
||||
|
||||
List<int> MergeColls = new List<int>();
|
||||
|
||||
//Объединение ячеек в строке
|
||||
if (mergeCells != null)
|
||||
{
|
||||
foreach (var cell in mergeCells)
|
||||
@ -96,8 +91,6 @@ namespace Controls
|
||||
|
||||
int cellsCount = table.Rows[1].Cells.Count;
|
||||
|
||||
//Объединение ячеек в столбце
|
||||
|
||||
if (MergeColls.Count != 0)
|
||||
{
|
||||
for (int i = 0; i < cellsCount; i++)
|
||||
@ -111,8 +104,6 @@ namespace Controls
|
||||
}
|
||||
}
|
||||
|
||||
//Вывод данных в таблицу в файл
|
||||
|
||||
int rowData = 2;
|
||||
|
||||
foreach (var item in data)
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -24,9 +24,12 @@ namespace Forms
|
||||
|
||||
private void buttonLargeText_CLick(object sender, EventArgs e)
|
||||
{
|
||||
string[] strings = new string[] { "aboba", "not aboba", "best aboba" };
|
||||
LargeTextComponent largeText = new LargeTextComponent();
|
||||
largeText.CreateDocument("C:\\Ulstu\\COP\\Cop_25\\Controls\\docs\\text.pdf", "OMEGA LABA 2", strings);
|
||||
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)
|
||||
@ -40,7 +43,7 @@ namespace Forms
|
||||
|
||||
List<MergeCells> mergeCells = new List<MergeCells>()
|
||||
{
|
||||
new MergeCells("Данные", new int[] {0,1,3})
|
||||
new MergeCells("Данные", new int[] {0,2,2})
|
||||
};
|
||||
|
||||
List<Person> people = new List<Person>()
|
||||
@ -50,7 +53,8 @@ namespace Forms
|
||||
new Person("aboba3", "not aboba3", "20"),
|
||||
};
|
||||
|
||||
tableComponent1.CreateTable("C:\\Ulstu\\COP\\Cop_25\\Controls\\docs\\table.pdf", "TABLE LUTI", mergeCells, columnInfos, people);
|
||||
tableComponent1.CreateTable("C:\\Ulstu\\COP\\Cop_25\\Controls\\docs\\table.pdf",
|
||||
"TABLE LUTI", mergeCells, columnInfos, people);
|
||||
}
|
||||
|
||||
private void buttonDiagram_Click(object sender, EventArgs e)
|
||||
@ -60,7 +64,8 @@ namespace Forms
|
||||
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", "Заголовок", "Линейная диаграмма", data, LegendAlign.bottom);
|
||||
diagramComponent1.CreateLineDiagram("C:\\Ulstu\\COP\\Cop_25\\Controls\\docs\\diagram.pdf",
|
||||
"ZAGOLOVOK", "LINEYNAYA", data, LegendAlign.bottom);
|
||||
}
|
||||
|
||||
private void textBox1_TextChanged(object sender, EventArgs e)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<TargetFramework>net8.0-windows7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
Loading…
Reference in New Issue
Block a user