From 943f6ee0ecd487827c2adc7198ba98c1e1ce5c97 Mon Sep 17 00:00:00 2001 From: ksenianeva <95441235+ksenianeva@users.noreply.github.com> Date: Fri, 1 Dec 2023 02:33:47 +0400 Subject: [PATCH] Create convention library --- .../IPluginsConvention.cs | 64 +++++++++++++++++++ .../PluginsConventionElement.cs | 13 ++++ .../PluginsConventionLibrary.csproj | 10 +++ .../PluginsConventionSaveDocument.cs | 13 ++++ 4 files changed, 100 insertions(+) create mode 100644 NevaevaLibrary/PluginsConventionLibrary/IPluginsConvention.cs create mode 100644 NevaevaLibrary/PluginsConventionLibrary/PluginsConventionElement.cs create mode 100644 NevaevaLibrary/PluginsConventionLibrary/PluginsConventionLibrary.csproj create mode 100644 NevaevaLibrary/PluginsConventionLibrary/PluginsConventionSaveDocument.cs diff --git a/NevaevaLibrary/PluginsConventionLibrary/IPluginsConvention.cs b/NevaevaLibrary/PluginsConventionLibrary/IPluginsConvention.cs new file mode 100644 index 0000000..d7ae658 --- /dev/null +++ b/NevaevaLibrary/PluginsConventionLibrary/IPluginsConvention.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PluginsConventionLibrary +{ + 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/NevaevaLibrary/PluginsConventionLibrary/PluginsConventionElement.cs b/NevaevaLibrary/PluginsConventionLibrary/PluginsConventionElement.cs new file mode 100644 index 0000000..775c74a --- /dev/null +++ b/NevaevaLibrary/PluginsConventionLibrary/PluginsConventionElement.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PluginsConventionLibrary +{ + public class PluginsConventionElement + { + public Guid Id { get; set; } + } +} diff --git a/NevaevaLibrary/PluginsConventionLibrary/PluginsConventionLibrary.csproj b/NevaevaLibrary/PluginsConventionLibrary/PluginsConventionLibrary.csproj new file mode 100644 index 0000000..aefee8c --- /dev/null +++ b/NevaevaLibrary/PluginsConventionLibrary/PluginsConventionLibrary.csproj @@ -0,0 +1,10 @@ + + + + net6.0-windows + enable + enable + true + + + diff --git a/NevaevaLibrary/PluginsConventionLibrary/PluginsConventionSaveDocument.cs b/NevaevaLibrary/PluginsConventionLibrary/PluginsConventionSaveDocument.cs new file mode 100644 index 0000000..f902bc6 --- /dev/null +++ b/NevaevaLibrary/PluginsConventionLibrary/PluginsConventionSaveDocument.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PluginsConventionLibrary +{ + public class PluginsConventionSaveDocument + { + public string FileName { get; set; } + } +}