Страдальческое начало
This commit is contained in:
parent
d31a0e155a
commit
92d10ad7df
@ -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
|
||||
|
66
PluginsConventionLibrary/Plugins/IPluginsConvention.cs
Normal file
66
PluginsConventionLibrary/Plugins/IPluginsConvention.cs
Normal file
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Название плагина
|
||||
/// </summary>
|
||||
string PluginName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Получение контрола для вывода набора данных
|
||||
/// </summary>
|
||||
UserControl GetControl { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Получение элемента, выбранного в контроле
|
||||
/// </summary>
|
||||
PluginsConventionElement GetElement { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Получение формы для создания/редактирования объекта
|
||||
/// </summary>
|
||||
/// <param name="element"></param>
|
||||
/// <returns></returns>
|
||||
Form GetForm(PluginsConventionElement element);
|
||||
|
||||
/// <summary>
|
||||
/// Удаление элемента
|
||||
/// </summary>
|
||||
/// <param name="element"></param>
|
||||
/// <returns></returns>
|
||||
bool DeleteElement(PluginsConventionElement element);
|
||||
|
||||
/// <summary>
|
||||
/// Обновление набора данных в контроле
|
||||
/// </summary>
|
||||
void ReloadData();
|
||||
|
||||
/// <summary>
|
||||
/// Создание простого документа
|
||||
/// </summary>
|
||||
/// <param name="saveDocument"></param>
|
||||
/// <returns></returns>
|
||||
bool CreateWord(PluginsConventionSaveDocument saveDocument);
|
||||
|
||||
/// <summary>
|
||||
/// Создание простого документа
|
||||
/// </summary>
|
||||
/// <param name="saveDocument"></param>
|
||||
/// <returns></returns>
|
||||
bool CreateExcel(PluginsConventionSaveDocument saveDocument);
|
||||
|
||||
/// <summary>
|
||||
/// Создание документа с диаграммой
|
||||
/// </summary>
|
||||
/// <param name="saveDocument"></param>
|
||||
/// <returns></returns>
|
||||
bool CreatePdf(PluginsConventionSaveDocument saveDocument);
|
||||
}
|
||||
}
|
13
PluginsConventionLibrary/Plugins/PluginsConventionElement.cs
Normal file
13
PluginsConventionLibrary/Plugins/PluginsConventionElement.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
14
PluginsConventionLibrary/PluginsConventionLibrary.csproj
Normal file
14
PluginsConventionLibrary/PluginsConventionLibrary.csproj
Normal file
@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Forms\" />
|
||||
<Folder Include="MyPlugin\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user