diff --git a/Cop_25/Controls/Controls.csproj b/Cop_25/Controls/Controls.csproj index aa50cf5..e34ea45 100644 --- a/Cop_25/Controls/Controls.csproj +++ b/Cop_25/Controls/Controls.csproj @@ -1,7 +1,7 @@  - net6.0-windows + net8.0-windows7.0 enable true enable diff --git a/Cop_25/Controls/DiagramComponent.cs b/Cop_25/Controls/DiagramComponent.cs index 6e46d9f..78cf7cb 100644 --- a/Cop_25/Controls/DiagramComponent.cs +++ b/Cop_25/Controls/DiagramComponent.cs @@ -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; diff --git a/Cop_25/Controls/TableComponent.cs b/Cop_25/Controls/TableComponent.cs index 930e3b8..98fd405 100644 --- a/Cop_25/Controls/TableComponent.cs +++ b/Cop_25/Controls/TableComponent.cs @@ -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 MergeColls = new List(); - //Объединение ячеек в строке 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) diff --git a/Cop_25/Controls/docs/diagram.pdf b/Cop_25/Controls/docs/diagram.pdf index bdca766..14f5aa0 100644 Binary files a/Cop_25/Controls/docs/diagram.pdf and b/Cop_25/Controls/docs/diagram.pdf differ diff --git a/Cop_25/Controls/docs/table.pdf b/Cop_25/Controls/docs/table.pdf index 5065266..39573f1 100644 Binary files a/Cop_25/Controls/docs/table.pdf and b/Cop_25/Controls/docs/table.pdf differ diff --git a/Cop_25/Controls/docs/text.pdf b/Cop_25/Controls/docs/text.pdf index 9c9a15c..bd60b39 100644 Binary files a/Cop_25/Controls/docs/text.pdf and b/Cop_25/Controls/docs/text.pdf differ diff --git a/Cop_25/Forms/FormMain.cs b/Cop_25/Forms/FormMain.cs index 2f643b0..8fb21b4 100644 --- a/Cop_25/Forms/FormMain.cs +++ b/Cop_25/Forms/FormMain.cs @@ -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 = new List() { - new MergeCells("Данные", new int[] {0,1,3}) + new MergeCells("Данные", new int[] {0,2,2}) }; List people = new List() @@ -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 { 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", "Заголовок", "Линейная диаграмма", 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) diff --git a/Cop_25/Forms/Forms.csproj b/Cop_25/Forms/Forms.csproj index 7be99e4..a01475b 100644 --- a/Cop_25/Forms/Forms.csproj +++ b/Cop_25/Forms/Forms.csproj @@ -2,7 +2,7 @@ WinExe - net6.0-windows + net8.0-windows7.0 enable true enable