From 871774e43343b534177c7b66b6c78ffc90cb1a75 Mon Sep 17 00:00:00 2001 From: bekodeg Date: Sun, 24 Nov 2024 13:46:01 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=20=D0=B3=D1=80=D0=B0=D0=BC=D0=BC?= =?UTF-8?q?=D0=B0=D1=82=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=B8=D1=85=20=D0=BE?= =?UTF-8?q?=D1=88=D0=B8=D0=B1=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cop.Borovkov.Var3/Cop.Borovkov.Var3.sln | 6 ++ .../Models/PdfHistigramInfo.cs | 4 +- .../Models/PdfTableWithGroupingInfo.cs | 2 +- .../PdfCreator/Enums/PdfMargin.cs | 2 +- .../PdfCreator/Models/ImageModels/PdfImage.cs | 2 +- .../Models/PieChartModel/PdfHistogramData.cs | 2 +- .../Models/PieChartModel/PdfHistogramModel.cs | 2 +- .../Models/PieChartModel/PdfPieChartData.cs | 2 +- .../Models/TableModels/PDFSimpleTable.cs | 2 +- .../Models/TableModels/PDFSimpleTableRow.cs | 2 +- .../PdfCreator/Models/TableModels/PdfTable.cs | 2 +- .../PdfCreator/Models/TextModels/PdfList.cs | 7 +- .../Models/TextModels/PdfParagraph.cs | 2 +- .../Forms/Interfaces/IPluginsConvention.cs | 65 +++++++++++++++++++ Cop.Borovkov.Var3/Lab4/Lab4.csproj | 11 ++++ .../Lab4/Models/PluginsConventionElement.cs | 7 ++ Cop.Borovkov.Var3/Lab4/Program.cs | 17 +++++ 17 files changed, 119 insertions(+), 18 deletions(-) create mode 100644 Cop.Borovkov.Var3/Lab4/Forms/Interfaces/IPluginsConvention.cs create mode 100644 Cop.Borovkov.Var3/Lab4/Lab4.csproj create mode 100644 Cop.Borovkov.Var3/Lab4/Models/PluginsConventionElement.cs create mode 100644 Cop.Borovkov.Var3/Lab4/Program.cs diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3.sln b/Cop.Borovkov.Var3/Cop.Borovkov.Var3.sln index 1c8d7d9..ac79906 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3.sln +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3.sln @@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lab3", "Lab3\Lab3.csproj", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lab3.Database", "Lab3.Database\Lab3.Database.csproj", "{698DE9E8-7885-4F98-AFE3-9A9C6CD2FCF5}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lab4", "Lab4\Lab4.csproj", "{FAE92C0B-0A2D-48B6-A55C-DE58A310CD58}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -33,6 +35,10 @@ Global {698DE9E8-7885-4F98-AFE3-9A9C6CD2FCF5}.Debug|Any CPU.Build.0 = Debug|Any CPU {698DE9E8-7885-4F98-AFE3-9A9C6CD2FCF5}.Release|Any CPU.ActiveCfg = Release|Any CPU {698DE9E8-7885-4F98-AFE3-9A9C6CD2FCF5}.Release|Any CPU.Build.0 = Release|Any CPU + {FAE92C0B-0A2D-48B6-A55C-DE58A310CD58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FAE92C0B-0A2D-48B6-A55C-DE58A310CD58}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FAE92C0B-0A2D-48B6-A55C-DE58A310CD58}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FAE92C0B-0A2D-48B6-A55C-DE58A310CD58}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/Models/PdfHistigramInfo.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/Models/PdfHistigramInfo.cs index 5b5f839..607fad5 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/Models/PdfHistigramInfo.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/Models/PdfHistigramInfo.cs @@ -3,7 +3,7 @@ namespace Cop.Borovkov.Var3.Models { /// - /// Параметры для создания линейной диограммы + /// Параметры для создания линейной диаграммы /// public record PdfHistigramInfo { @@ -18,7 +18,7 @@ namespace Cop.Borovkov.Var3.Models public string DocumentTitle { get; init; } = "Гистограмма"; /// - /// Заголовок диограммы + /// Заголовок диаграммы /// public string HistogramTitle { get; init; } = "Гистограмма"; diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/Models/PdfTableWithGroupingInfo.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/Models/PdfTableWithGroupingInfo.cs index f920b4e..20f5b1f 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/Models/PdfTableWithGroupingInfo.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/Models/PdfTableWithGroupingInfo.cs @@ -1,7 +1,7 @@ namespace Cop.Borovkov.Var3.Models { /// - /// Параметры для создания таблици в пдф с группировкой по 1 столбцу + /// Параметры для создания таблицы в пдф с группировкой по 1 столбцу /// public class PdfTableWithGroupingInfo where TType : class { diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Enums/PdfMargin.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Enums/PdfMargin.cs index 6553cec..fed1c83 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Enums/PdfMargin.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Enums/PdfMargin.cs @@ -15,7 +15,7 @@ namespace PIHelperSh.PdfCreator.Enums /// /// Отступа нет /// - [TypeValue("ocm")] + [TypeValue("0cm")] None, /// /// Отступ небольшой diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/ImageModels/PdfImage.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/ImageModels/PdfImage.cs index 60d52a5..6b52099 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/ImageModels/PdfImage.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/ImageModels/PdfImage.cs @@ -29,7 +29,7 @@ namespace PIHelperSh.PdfCreator.Models.ImageModels public int? Height { get; set; } = null; /// - /// Выравнивание текста внутри параграфа (по умолчанию - по левой строне) + /// Выравнивание текста внутри параграфа (по умолчанию - по левой стороне) /// public PdfAlignmentType ImageAlignment { get; set; } = PdfAlignmentType.Left; diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfHistogramData.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfHistogramData.cs index b518631..6bb07bb 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfHistogramData.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfHistogramData.cs @@ -18,7 +18,7 @@ namespace PIHelperSh.PdfCreator.Models.PieChartModel public IEnumerable<(string Name, double Value)> Value { get; set; } /// - /// Цвет области на диаграме. При null будет использоватсся выдача цветов по умолчанию) + /// Цвет области на диаграмме. При null будет использоваться выдача цветов по умолчанию) /// public Color? Color { get; set; } = null; diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfHistogramModel.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfHistogramModel.cs index b6c7bb2..c4fe900 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfHistogramModel.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfHistogramModel.cs @@ -1,7 +1,7 @@ namespace PIHelperSh.PdfCreator.Models.PieChartModel { /// - /// Модель линейной диограммы + /// Модель линейной диаграммы /// public class PdfHistogramModel : PdfPieChartModel { diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfPieChartData.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfPieChartData.cs index 4542f04..2ac3137 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfPieChartData.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/PieChartModel/PdfPieChartData.cs @@ -18,7 +18,7 @@ namespace PIHelperSh.PdfCreator.Models.PieChartModel public double Value { get; set; } /// - /// Цвет области на диаграме. При null будет использоватсся выдача цветов по умолчанию) + /// Цвет области на диаграмме. При null будет использоваться выдача цветов по умолчанию) /// public Color? Color { get; set; } = null; diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PDFSimpleTable.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PDFSimpleTable.cs index 9c93e1b..c87f560 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PDFSimpleTable.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PDFSimpleTable.cs @@ -34,7 +34,7 @@ namespace PIHelperSh.PdfCreator.Models.TableModels public PdfStyleType RowStyle = PdfStyleType.Basic; /// - /// Базовое выравнивание элементов сторок + /// Базовое выравнивание элементов в строке /// public PdfAlignmentType RowHorizontalAlignment = PdfAlignmentType.Rigth; diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PDFSimpleTableRow.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PDFSimpleTableRow.cs index 8b7e30a..cda561a 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PDFSimpleTableRow.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PDFSimpleTableRow.cs @@ -13,7 +13,7 @@ namespace PIHelperSh.PdfCreator.Models.TableModels public class PDFSimpleTableRow { /// - /// Элемменты данной стоки + /// Элементы данной стоки /// public List Items = new List(); diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PdfTable.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PdfTable.cs index 8941931..5812616 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PdfTable.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TableModels/PdfTable.cs @@ -35,7 +35,7 @@ namespace PIHelperSh.PdfCreator.Models.TableModels public PdfStyleType RecordStyle { get; set; } = PdfStyleType.Basic; /// - /// Выравнивание текста объектов в таблице (по умолчанию - по левой строне) + /// Выравнивание текста объектов в таблице (по умолчанию - по левой стороне) /// public PdfAlignmentType RecordHorizontalAlignment { get; set; } = PdfAlignmentType.Left; diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TextModels/PdfList.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TextModels/PdfList.cs index 17b210e..4ae06ae 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TextModels/PdfList.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TextModels/PdfList.cs @@ -1,10 +1,5 @@ using PIHelperSh.PdfCreator.Enums; using PIHelperSh.PdfCreator.Interfaces; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace PIHelperSh.PdfCreator.Models.TextModels { @@ -14,7 +9,7 @@ namespace PIHelperSh.PdfCreator.Models.TextModels public class PdfList : IPdfElement { /// - /// Элементы списка (параграфы или иные спсики) + /// Элементы списка (параграфы или иные списки) /// public List Content { get; set; } = new(); diff --git a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TextModels/PdfParagraph.cs b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TextModels/PdfParagraph.cs index 60282bd..d3df994 100644 --- a/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TextModels/PdfParagraph.cs +++ b/Cop.Borovkov.Var3/Cop.Borovkov.Var3/PdfCreator/Models/TextModels/PdfParagraph.cs @@ -24,7 +24,7 @@ namespace PIHelperSh.PdfCreator.Models.TextModels public PdfStyleType Style { get; set; } = PdfStyleType.Basic; /// - /// Выравнивание текста внутри параграфа (по умолчанию - по левой строне) + /// Выравнивание текста внутри параграфа (по умолчанию - по левой стороне) /// public PdfAlignmentType ParagraphAlignment { get; set; } = PdfAlignmentType.Left; diff --git a/Cop.Borovkov.Var3/Lab4/Forms/Interfaces/IPluginsConvention.cs b/Cop.Borovkov.Var3/Lab4/Forms/Interfaces/IPluginsConvention.cs new file mode 100644 index 0000000..5046865 --- /dev/null +++ b/Cop.Borovkov.Var3/Lab4/Forms/Interfaces/IPluginsConvention.cs @@ -0,0 +1,65 @@ +namespace Lab4.Forms.Interfaces +{ + public interface IPluginsConvention + { + /// + /// Название плагина + /// + string PluginName { get; } + + /// + /// Получение контрола для вывода набора данных + /// + UserControl GetControl { get; } + + /// + /// Получение элемента, выбранного в контроле + /// + PluginsConventionElement GetElement { get; } + /// + /// Получение формы для создания/редактирования объекта + /// + /// + /// + Form GetForm(PluginsConventionElement element); + /// + /// Получение формы для работы со справочником + /// + /// + Form GetThesaurus(); + + /// + /// Удаление элемента + /// + /// + /// + bool DeleteElement(PluginsConventionElement element); + + /// + /// Обновление набора данных в контроле + /// + void ReloadData(); + + /// + /// Создание простого документа + /// + /// + /// + bool CreateSimpleDocument(PluginsConventionSaveDocument saveDocument); + + /// + /// Создание простого документа + /// + /// + /// + bool CreateTableDocument(PluginsConventionSaveDocument saveDocument); + + /// + /// Создание документа с диаграммой + /// + /// + /// + bool CreateChartDocument(PluginsConventionSaveDocument saveDocument); + } + +} diff --git a/Cop.Borovkov.Var3/Lab4/Lab4.csproj b/Cop.Borovkov.Var3/Lab4/Lab4.csproj new file mode 100644 index 0000000..663fdb8 --- /dev/null +++ b/Cop.Borovkov.Var3/Lab4/Lab4.csproj @@ -0,0 +1,11 @@ + + + + WinExe + net8.0-windows + enable + true + enable + + + \ No newline at end of file diff --git a/Cop.Borovkov.Var3/Lab4/Models/PluginsConventionElement.cs b/Cop.Borovkov.Var3/Lab4/Models/PluginsConventionElement.cs new file mode 100644 index 0000000..c5b9472 --- /dev/null +++ b/Cop.Borovkov.Var3/Lab4/Models/PluginsConventionElement.cs @@ -0,0 +1,7 @@ +namespace Lab4.Models +{ + public class PluginsConventionElement + { + public Guid Id { get; set; } + } +} diff --git a/Cop.Borovkov.Var3/Lab4/Program.cs b/Cop.Borovkov.Var3/Lab4/Program.cs new file mode 100644 index 0000000..6270a9b --- /dev/null +++ b/Cop.Borovkov.Var3/Lab4/Program.cs @@ -0,0 +1,17 @@ +namespace Lab4 +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new Form1()); + } + } +} \ No newline at end of file