From 92d10ad7dff5178bb926c64529201c62f3cf3a7f Mon Sep 17 00:00:00 2001 From: GokaPek Date: Mon, 25 Nov 2024 12:04:26 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D1=82=D1=80=D0=B0=D0=B4=D0=B0=D0=BB?= =?UTF-8?q?=D1=8C=D1=87=D0=B5=D1=81=D0=BA=D0=BE=D0=B5=20=D0=BD=D0=B0=D1=87?= =?UTF-8?q?=D0=B0=D0=BB=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library14Petrushin/Library14Petrushin.sln | 6 ++ .../Plugins/IPluginsConvention.cs | 66 +++++++++++++++++++ .../Plugins/PluginsConventionElement.cs | 13 ++++ .../Plugins/PluginsConventionSaveDocument.cs | 13 ++++ .../PluginsConventionLibrary.csproj | 14 ++++ 5 files changed, 112 insertions(+) create mode 100644 PluginsConventionLibrary/Plugins/IPluginsConvention.cs create mode 100644 PluginsConventionLibrary/Plugins/PluginsConventionElement.cs create mode 100644 PluginsConventionLibrary/Plugins/PluginsConventionSaveDocument.cs create mode 100644 PluginsConventionLibrary/PluginsConventionLibrary.csproj diff --git a/Library14Petrushin/Library14Petrushin.sln b/Library14Petrushin/Library14Petrushin.sln index ad6a1c3..7d6f1d1 100644 --- a/Library14Petrushin/Library14Petrushin.sln +++ b/Library14Petrushin/Library14Petrushin.sln @@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "View", "..\Laba3\View.cspro EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Data", "..\Models\Data.csproj", "{DC70937E-903F-4BAA-A774-80D01EC5B75A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluginsConventionLibrary", "..\PluginsConventionLibrary\PluginsConventionLibrary.csproj", "{3E1D3C18-6808-408F-B8C9-CD63F22E4A4A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +29,10 @@ Global {DC70937E-903F-4BAA-A774-80D01EC5B75A}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC70937E-903F-4BAA-A774-80D01EC5B75A}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC70937E-903F-4BAA-A774-80D01EC5B75A}.Release|Any CPU.Build.0 = Release|Any CPU + {3E1D3C18-6808-408F-B8C9-CD63F22E4A4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E1D3C18-6808-408F-B8C9-CD63F22E4A4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E1D3C18-6808-408F-B8C9-CD63F22E4A4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E1D3C18-6808-408F-B8C9-CD63F22E4A4A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/PluginsConventionLibrary/Plugins/IPluginsConvention.cs b/PluginsConventionLibrary/Plugins/IPluginsConvention.cs new file mode 100644 index 0000000..664ebc4 --- /dev/null +++ b/PluginsConventionLibrary/Plugins/IPluginsConvention.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PluginsConventionLibrary.Plugins +{ + public interface IPluginsConvention + { + /// + /// Название плагина + /// + string PluginName { get; } + + /// + /// Получение контрола для вывода набора данных + /// + UserControl GetControl { get; } + + /// + /// Получение элемента, выбранного в контроле + /// + PluginsConventionElement GetElement { get; } + + /// + /// Получение формы для создания/редактирования объекта + /// + /// + /// + Form GetForm(PluginsConventionElement element); + + /// + /// Удаление элемента + /// + /// + /// + bool DeleteElement(PluginsConventionElement element); + + /// + /// Обновление набора данных в контроле + /// + void ReloadData(); + + /// + /// Создание простого документа + /// + /// + /// + bool CreateWord(PluginsConventionSaveDocument saveDocument); + + /// + /// Создание простого документа + /// + /// + /// + bool CreateExcel(PluginsConventionSaveDocument saveDocument); + + /// + /// Создание документа с диаграммой + /// + /// + /// + bool CreatePdf(PluginsConventionSaveDocument saveDocument); + } +} diff --git a/PluginsConventionLibrary/Plugins/PluginsConventionElement.cs b/PluginsConventionLibrary/Plugins/PluginsConventionElement.cs new file mode 100644 index 0000000..1dea201 --- /dev/null +++ b/PluginsConventionLibrary/Plugins/PluginsConventionElement.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PluginsConventionLibrary.Plugins +{ + public class PluginsConventionElement + { + public int Id { get; set; } + } +} diff --git a/PluginsConventionLibrary/Plugins/PluginsConventionSaveDocument.cs b/PluginsConventionLibrary/Plugins/PluginsConventionSaveDocument.cs new file mode 100644 index 0000000..614962e --- /dev/null +++ b/PluginsConventionLibrary/Plugins/PluginsConventionSaveDocument.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PluginsConventionLibrary.Plugins +{ + public class PluginsConventionSaveDocument + { + public string FileName { get; set; } + } +} diff --git a/PluginsConventionLibrary/PluginsConventionLibrary.csproj b/PluginsConventionLibrary/PluginsConventionLibrary.csproj new file mode 100644 index 0000000..9fccf9f --- /dev/null +++ b/PluginsConventionLibrary/PluginsConventionLibrary.csproj @@ -0,0 +1,14 @@ + + + + net8.0 + enable + enable + + + + + + + +