diff --git a/COP/COP.sln b/COP/COP.sln index d90f173..51e0959 100644 --- a/COP/COP.sln +++ b/COP/COP.sln @@ -15,7 +15,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PortalAccountsDatabaseImple EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PortalAccountsDataModels", "PortalAccountsDataModels\PortalAccountsDataModels.csproj", "{FA4B05BE-8AEB-4D83-9381-53493BFFBCA1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PortalAccountsView", "PortalAccountsView\PortalAccountsView.csproj", "{36667C40-A6AE-422B-BFD2-BCEEC0A54EA2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PortalAccountsView", "PortalAccountsView\PortalAccountsView.csproj", "{36667C40-A6AE-422B-BFD2-BCEEC0A54EA2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PluginsApp", "PluginsApp\PluginsApp.csproj", "{9A329DF5-120D-4695-9E0D-F0727649C16D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PluginsConventionLibrary", "PluginsConventionLibrary\PluginsConventionLibrary.csproj", "{93871BA7-1708-4403-B01B-8D16B0D140C4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -51,6 +55,14 @@ Global {36667C40-A6AE-422B-BFD2-BCEEC0A54EA2}.Debug|Any CPU.Build.0 = Debug|Any CPU {36667C40-A6AE-422B-BFD2-BCEEC0A54EA2}.Release|Any CPU.ActiveCfg = Release|Any CPU {36667C40-A6AE-422B-BFD2-BCEEC0A54EA2}.Release|Any CPU.Build.0 = Release|Any CPU + {9A329DF5-120D-4695-9E0D-F0727649C16D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A329DF5-120D-4695-9E0D-F0727649C16D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A329DF5-120D-4695-9E0D-F0727649C16D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A329DF5-120D-4695-9E0D-F0727649C16D}.Release|Any CPU.Build.0 = Release|Any CPU + {93871BA7-1708-4403-B01B-8D16B0D140C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93871BA7-1708-4403-B01B-8D16B0D140C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {93871BA7-1708-4403-B01B-8D16B0D140C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93871BA7-1708-4403-B01B-8D16B0D140C4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/COP/PluginsApp/FormMain.Designer.cs b/COP/PluginsApp/FormMain.Designer.cs new file mode 100644 index 0000000..5b45822 --- /dev/null +++ b/COP/PluginsApp/FormMain.Designer.cs @@ -0,0 +1,173 @@ +namespace PluginsApp +{ + partial class FormMain + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + menuStrip = new MenuStrip(); + ControlsStripMenuItem = new ToolStripMenuItem(); + ActionsToolStripMenuItem = new ToolStripMenuItem(); + ThesaurusToolStripMenuItem = new ToolStripMenuItem(); + AddElementToolStripMenuItem = new ToolStripMenuItem(); + UpdElementToolStripMenuItem = new ToolStripMenuItem(); + DelElementToolStripMenuItem = new ToolStripMenuItem(); + DocsToolStripMenuItem = new ToolStripMenuItem(); + SimpleDocToolStripMenuItem = new ToolStripMenuItem(); + TableDocToolStripMenuItem = new ToolStripMenuItem(); + ChartDocToolStripMenuItem = new ToolStripMenuItem(); + panelControl = new Panel(); + menuStrip.SuspendLayout(); + SuspendLayout(); + // + // menuStrip + // + menuStrip.Items.AddRange(new ToolStripItem[] { ControlsStripMenuItem, ActionsToolStripMenuItem, DocsToolStripMenuItem }); + menuStrip.Location = new Point(0, 0); + menuStrip.Name = "menuStrip"; + menuStrip.Size = new Size(800, 24); + menuStrip.TabIndex = 0; + menuStrip.Text = "Меню"; + // + // ControlsStripMenuItem + // + ControlsStripMenuItem.Name = "ControlsStripMenuItem"; + ControlsStripMenuItem.Size = new Size(90, 20); + ControlsStripMenuItem.Text = "Компоненты"; + // + // ActionsToolStripMenuItem + // + ActionsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ThesaurusToolStripMenuItem, AddElementToolStripMenuItem, UpdElementToolStripMenuItem, DelElementToolStripMenuItem }); + ActionsToolStripMenuItem.Name = "ActionsToolStripMenuItem"; + ActionsToolStripMenuItem.Size = new Size(70, 20); + ActionsToolStripMenuItem.Text = "Действия"; + // + // ThesaurusToolStripMenuItem + // + ThesaurusToolStripMenuItem.Name = "ThesaurusToolStripMenuItem"; + ThesaurusToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.I; + ThesaurusToolStripMenuItem.Size = new Size(180, 22); + ThesaurusToolStripMenuItem.Text = "Справочник"; + ThesaurusToolStripMenuItem.Click += ThesaurusToolStripMenuItem_Click; + // + // AddElementToolStripMenuItem + // + AddElementToolStripMenuItem.Name = "AddElementToolStripMenuItem"; + AddElementToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.A; + AddElementToolStripMenuItem.Size = new Size(180, 22); + AddElementToolStripMenuItem.Text = "Добавить"; + AddElementToolStripMenuItem.Click += AddElementToolStripMenuItem_Click; + // + // UpdElementToolStripMenuItem + // + UpdElementToolStripMenuItem.Name = "UpdElementToolStripMenuItem"; + UpdElementToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.U; + UpdElementToolStripMenuItem.Size = new Size(180, 22); + UpdElementToolStripMenuItem.Text = "Изменить"; + UpdElementToolStripMenuItem.Click += UpdElementToolStripMenuItem_Click; + // + // DelElementToolStripMenuItem + // + DelElementToolStripMenuItem.Name = "DelElementToolStripMenuItem"; + DelElementToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.D; + DelElementToolStripMenuItem.Size = new Size(180, 22); + DelElementToolStripMenuItem.Text = "Удалить"; + DelElementToolStripMenuItem.Click += DelElementToolStripMenuItem_Click; + // + // DocsToolStripMenuItem + // + DocsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { SimpleDocToolStripMenuItem, TableDocToolStripMenuItem, ChartDocToolStripMenuItem }); + DocsToolStripMenuItem.Name = "DocsToolStripMenuItem"; + DocsToolStripMenuItem.Size = new Size(82, 20); + DocsToolStripMenuItem.Text = "Документы"; + // + // SimpleDocToolStripMenuItem + // + SimpleDocToolStripMenuItem.Name = "SimpleDocToolStripMenuItem"; + SimpleDocToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.S; + SimpleDocToolStripMenuItem.Size = new Size(232, 22); + SimpleDocToolStripMenuItem.Text = "Простой документ"; + SimpleDocToolStripMenuItem.Click += SimpleDocToolStripMenuItem_Click; + // + // TableDocToolStripMenuItem + // + TableDocToolStripMenuItem.Name = "TableDocToolStripMenuItem"; + TableDocToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.T; + TableDocToolStripMenuItem.Size = new Size(232, 22); + TableDocToolStripMenuItem.Text = "Документ с таблицей"; + TableDocToolStripMenuItem.Click += TableDocToolStripMenuItem_Click; + // + // ChartDocToolStripMenuItem + // + ChartDocToolStripMenuItem.Name = "ChartDocToolStripMenuItem"; + ChartDocToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.C; + ChartDocToolStripMenuItem.Size = new Size(232, 22); + ChartDocToolStripMenuItem.Text = "Диаграмма"; + ChartDocToolStripMenuItem.Click += ChartDocToolStripMenuItem_Click; + // + // panelControl + // + panelControl.Dock = DockStyle.Fill; + panelControl.Location = new Point(0, 24); + panelControl.Name = "panelControl"; + panelControl.Size = new Size(800, 426); + panelControl.TabIndex = 1; + // + // FormMain + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(panelControl); + Controls.Add(menuStrip); + MainMenuStrip = menuStrip; + Name = "FormMain"; + StartPosition = FormStartPosition.CenterScreen; + Text = "Главная форма"; + WindowState = FormWindowState.Maximized; + KeyDown += FormMain_KeyDown; + menuStrip.ResumeLayout(false); + menuStrip.PerformLayout(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private System.Windows.Forms.MenuStrip menuStrip; + private System.Windows.Forms.ToolStripMenuItem ControlsStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem DocsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem SimpleDocToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem TableDocToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ChartDocToolStripMenuItem; + private System.Windows.Forms.Panel panelControl; + private System.Windows.Forms.ToolStripMenuItem ActionsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ThesaurusToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem AddElementToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem UpdElementToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem DelElementToolStripMenuItem; + } +} diff --git a/COP/PluginsApp/FormMain.cs b/COP/PluginsApp/FormMain.cs new file mode 100644 index 0000000..1fd4116 --- /dev/null +++ b/COP/PluginsApp/FormMain.cs @@ -0,0 +1,243 @@ +using PluginsConventionLibrary; +using System.Reflection; + +namespace PluginsApp +{ + public partial class FormMain : Form + { + private readonly Dictionary _plugins; + + private string _selectedPlugin; + + public FormMain() + { + InitializeComponent(); + _plugins = LoadPlugins(); + _selectedPlugin = string.Empty; + } + + private Dictionary LoadPlugins() + { + var plugins = new Dictionary(); + string pluginsDir = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory())!.Parent!.Parent!.FullName, "Plugins"); + if (!Directory.Exists(pluginsDir)) + { + MessageBox.Show($" {pluginsDir} .", "", MessageBoxButtons.OK, MessageBoxIcon.Error); + return plugins; + } + foreach (string dllFile in Directory.EnumerateFiles(pluginsDir, "*.dll", SearchOption.AllDirectories)) + { + try + { + Assembly assembly = Assembly.LoadFrom(dllFile); + Type[] types = assembly.GetTypes(); + foreach (var type in types) + { + if (typeof(IPluginsConvention).IsAssignableFrom(type) && !type.IsInterface && !type.IsAbstract) + { + var plugin = (IPluginsConvention)Activator.CreateInstance(type)!; + plugins.Add(plugin.PluginName, plugin); + CreateToolStripMenuItem(plugin.PluginName); + } + } + } + catch (Exception ex) + { + MessageBox.Show($" {dllFile}: {ex.Message}", "", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + return plugins; + } + + private void CreateToolStripMenuItem(string pluginName) + { + var menuItem = new ToolStripMenuItem(pluginName); + menuItem.Click += (object? sender, EventArgs e) => + { + _selectedPlugin = pluginName; + IPluginsConvention plugin = _plugins![pluginName]; + UserControl userControl = plugin?.GetControl ?? throw new Exception(" "); + panelControl.Controls.Clear(); + plugin.ReloadData(); + userControl.Dock = DockStyle.Fill; + panelControl.Controls.Add(userControl); + }; + ControlsStripMenuItem.DropDownItems.Add(menuItem); + } + + private void FormMain_KeyDown(object sender, KeyEventArgs e) + { + if (string.IsNullOrEmpty(_selectedPlugin) || !_plugins.ContainsKey(_selectedPlugin)) + { + return; + } + if (!e.Control) + { + return; + } + switch (e.KeyCode) + { + case Keys.I: + ShowThesaurus(); + break; + case Keys.A: + AddNewElement(); + break; + case Keys.U: + UpdateElement(); + break; + case Keys.D: + DeleteElement(); + break; + case Keys.S: + CreateSimpleDoc(); + break; + case Keys.T: + CreateTableDoc(); + break; + case Keys.C: + CreateChartDoc(); + break; + } + } + + private void ShowThesaurus() + { + _plugins[_selectedPlugin].GetThesaurus()?.Show(); + } + + private void AddNewElement() + { + var form = _plugins[_selectedPlugin].GetForm(null); + if (form != null && form.ShowDialog() == DialogResult.OK) + { + _plugins[_selectedPlugin].ReloadData(); + } + } + + private void UpdateElement() + { + var element = _plugins[_selectedPlugin].GetElement; + if (element == null) + { + MessageBox.Show(" ", "", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + var form = _plugins[_selectedPlugin].GetForm(element); + if (form != null && form.ShowDialog() == DialogResult.OK) + { + _plugins[_selectedPlugin].ReloadData(); + } + } + + private void DeleteElement() + { + if (MessageBox.Show(" ", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) + { + return; + } + var element = _plugins[_selectedPlugin].GetElement; + if (element == null) + { + MessageBox.Show(" ", "", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + if (_plugins[_selectedPlugin].DeleteElement(element)) + { + _plugins[_selectedPlugin].ReloadData(); + } + } + + private void CreateSimpleDoc() + { + using var dialog = new SaveFileDialog + { + Filter = "docx|*.docx" + }; + if (dialog.ShowDialog() == DialogResult.OK) + { + try + { + if (_plugins[_selectedPlugin].CreateSimpleDocument(new PluginsConventionSaveDocument() { FileName = dialog.FileName } )) + { + MessageBox.Show(" ", " ", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else + { + MessageBox.Show(" ", "", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + catch (Exception ex) + { + MessageBox.Show(" : " + ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + private void CreateTableDoc() + { + using var dialog = new SaveFileDialog + { + Filter = "PDF Files|*.pdf" + }; + if (dialog.ShowDialog() == DialogResult.OK) + { + try + { + if (_plugins[_selectedPlugin].CreateTableDocument(new PluginsConventionSaveDocument() { FileName = dialog.FileName })) + { + MessageBox.Show(" ", " ", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else + { + MessageBox.Show(" ", "", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + catch (Exception ex) + { + MessageBox.Show(" : " + ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + private void CreateChartDoc() + { + using var dialog = new SaveFileDialog + { + Filter = "Excel Files|*.xlsx" + }; + if (dialog.ShowDialog() == DialogResult.OK) + { + try + { + if (_plugins[_selectedPlugin].CreateChartDocument(new PluginsConventionSaveDocument() { FileName = dialog.FileName })) + { + MessageBox.Show(" ", " ", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else + { + MessageBox.Show(" ", "", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + catch (Exception ex) + { + MessageBox.Show(" : " + ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + private void ThesaurusToolStripMenuItem_Click(object sender, EventArgs e) => ShowThesaurus(); + + private void AddElementToolStripMenuItem_Click(object sender, EventArgs e) => AddNewElement(); + + private void UpdElementToolStripMenuItem_Click(object sender, EventArgs e) => UpdateElement(); + + private void DelElementToolStripMenuItem_Click(object sender, EventArgs e) => DeleteElement(); + + private void SimpleDocToolStripMenuItem_Click(object sender, EventArgs e) => CreateSimpleDoc(); + + private void TableDocToolStripMenuItem_Click(object sender, EventArgs e) => CreateTableDoc(); + + private void ChartDocToolStripMenuItem_Click(object sender, EventArgs e) => CreateChartDoc(); + } +} \ No newline at end of file diff --git a/COP/PluginsApp/FormMain.resx b/COP/PluginsApp/FormMain.resx new file mode 100644 index 0000000..31084d5 --- /dev/null +++ b/COP/PluginsApp/FormMain.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/COP/PluginsApp/Plugins/BouncyCastle.Cryptography.dll b/COP/PluginsApp/Plugins/BouncyCastle.Cryptography.dll new file mode 100644 index 0000000..782adf4 Binary files /dev/null and b/COP/PluginsApp/Plugins/BouncyCastle.Cryptography.dll differ diff --git a/COP/PluginsApp/Plugins/Components.dll b/COP/PluginsApp/Plugins/Components.dll new file mode 100644 index 0000000..f1729ee Binary files /dev/null and b/COP/PluginsApp/Plugins/Components.dll differ diff --git a/COP/PluginsApp/Plugins/DocumentFormat.OpenXml.Framework.dll b/COP/PluginsApp/Plugins/DocumentFormat.OpenXml.Framework.dll new file mode 100644 index 0000000..895c615 Binary files /dev/null and b/COP/PluginsApp/Plugins/DocumentFormat.OpenXml.Framework.dll differ diff --git a/COP/PluginsApp/Plugins/DocumentFormat.OpenXml.dll b/COP/PluginsApp/Plugins/DocumentFormat.OpenXml.dll new file mode 100644 index 0000000..dbc29d1 Binary files /dev/null and b/COP/PluginsApp/Plugins/DocumentFormat.OpenXml.dll differ diff --git a/COP/PluginsApp/Plugins/EPPlus.Interfaces.dll b/COP/PluginsApp/Plugins/EPPlus.Interfaces.dll new file mode 100644 index 0000000..599a767 Binary files /dev/null and b/COP/PluginsApp/Plugins/EPPlus.Interfaces.dll differ diff --git a/COP/PluginsApp/Plugins/EPPlus.System.Drawing.dll b/COP/PluginsApp/Plugins/EPPlus.System.Drawing.dll new file mode 100644 index 0000000..8df125e Binary files /dev/null and b/COP/PluginsApp/Plugins/EPPlus.System.Drawing.dll differ diff --git a/COP/PluginsApp/Plugins/EPPlus.dll b/COP/PluginsApp/Plugins/EPPlus.dll new file mode 100644 index 0000000..7a1f5a3 Binary files /dev/null and b/COP/PluginsApp/Plugins/EPPlus.dll differ diff --git a/COP/PluginsApp/Plugins/Enums.NET.dll b/COP/PluginsApp/Plugins/Enums.NET.dll new file mode 100644 index 0000000..adc8614 Binary files /dev/null and b/COP/PluginsApp/Plugins/Enums.NET.dll differ diff --git a/COP/PluginsApp/Plugins/ExtendedNumerics.BigDecimal.dll b/COP/PluginsApp/Plugins/ExtendedNumerics.BigDecimal.dll new file mode 100644 index 0000000..bb107f9 Binary files /dev/null and b/COP/PluginsApp/Plugins/ExtendedNumerics.BigDecimal.dll differ diff --git a/COP/PluginsApp/Plugins/Humanizer.dll b/COP/PluginsApp/Plugins/Humanizer.dll new file mode 100644 index 0000000..c9a7ef8 Binary files /dev/null and b/COP/PluginsApp/Plugins/Humanizer.dll differ diff --git a/COP/PluginsApp/Plugins/ICSharpCode.SharpZipLib.dll b/COP/PluginsApp/Plugins/ICSharpCode.SharpZipLib.dll new file mode 100644 index 0000000..08de420 Binary files /dev/null and b/COP/PluginsApp/Plugins/ICSharpCode.SharpZipLib.dll differ diff --git a/COP/PluginsApp/Plugins/MathNet.Numerics.dll b/COP/PluginsApp/Plugins/MathNet.Numerics.dll new file mode 100644 index 0000000..b6b9e4b Binary files /dev/null and b/COP/PluginsApp/Plugins/MathNet.Numerics.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.Abstractions.dll b/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.Abstractions.dll new file mode 100644 index 0000000..96ea845 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.Abstractions.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.Design.dll b/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.Design.dll new file mode 100644 index 0000000..44b215b Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.Design.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.Relational.dll b/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.Relational.dll new file mode 100644 index 0000000..ca681c4 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.Relational.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.dll b/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.dll new file mode 100644 index 0000000..37ace74 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.EntityFrameworkCore.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.Caching.Abstractions.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.Caching.Abstractions.dll new file mode 100644 index 0000000..1ba13a8 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.Caching.Abstractions.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.Caching.Memory.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.Caching.Memory.dll new file mode 100644 index 0000000..c15d16e Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.Caching.Memory.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.Abstractions.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.Abstractions.dll new file mode 100644 index 0000000..a5ab313 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.Abstractions.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.FileExtensions.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.FileExtensions.dll new file mode 100644 index 0000000..19d8f5c Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.FileExtensions.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.Json.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.Json.dll new file mode 100644 index 0000000..9e50db0 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.Json.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.dll new file mode 100644 index 0000000..d3e5c22 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.Configuration.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.DependencyInjection.Abstractions.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.DependencyInjection.Abstractions.dll new file mode 100644 index 0000000..81ed3de Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.DependencyInjection.Abstractions.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.DependencyInjection.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.DependencyInjection.dll new file mode 100644 index 0000000..bd71a2b Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.DependencyInjection.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.DependencyModel.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.DependencyModel.dll new file mode 100644 index 0000000..c4fe0b9 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.DependencyModel.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.FileProviders.Abstractions.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.FileProviders.Abstractions.dll new file mode 100644 index 0000000..f907206 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.FileProviders.Abstractions.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.FileProviders.Physical.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.FileProviders.Physical.dll new file mode 100644 index 0000000..6fb7f47 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.FileProviders.Physical.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.FileSystemGlobbing.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.FileSystemGlobbing.dll new file mode 100644 index 0000000..e590735 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.FileSystemGlobbing.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.Logging.Abstractions.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.Logging.Abstractions.dll new file mode 100644 index 0000000..41909d2 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.Logging.Abstractions.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.Logging.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.Logging.dll new file mode 100644 index 0000000..f21b68b Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.Logging.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.Options.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.Options.dll new file mode 100644 index 0000000..1aa2d3f Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.Options.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.Extensions.Primitives.dll b/COP/PluginsApp/Plugins/Microsoft.Extensions.Primitives.dll new file mode 100644 index 0000000..c24f2a0 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.Extensions.Primitives.dll differ diff --git a/COP/PluginsApp/Plugins/Microsoft.IO.RecyclableMemoryStream.dll b/COP/PluginsApp/Plugins/Microsoft.IO.RecyclableMemoryStream.dll new file mode 100644 index 0000000..6e0ea40 Binary files /dev/null and b/COP/PluginsApp/Plugins/Microsoft.IO.RecyclableMemoryStream.dll differ diff --git a/COP/PluginsApp/Plugins/MigraDoc.DocumentObjectModel.dll b/COP/PluginsApp/Plugins/MigraDoc.DocumentObjectModel.dll new file mode 100644 index 0000000..2bf457c Binary files /dev/null and b/COP/PluginsApp/Plugins/MigraDoc.DocumentObjectModel.dll differ diff --git a/COP/PluginsApp/Plugins/MigraDoc.Rendering.dll b/COP/PluginsApp/Plugins/MigraDoc.Rendering.dll new file mode 100644 index 0000000..9c14fbe Binary files /dev/null and b/COP/PluginsApp/Plugins/MigraDoc.Rendering.dll differ diff --git a/COP/PluginsApp/Plugins/Mono.TextTemplating.dll b/COP/PluginsApp/Plugins/Mono.TextTemplating.dll new file mode 100644 index 0000000..d5a4b3c Binary files /dev/null and b/COP/PluginsApp/Plugins/Mono.TextTemplating.dll differ diff --git a/COP/PluginsApp/Plugins/NPOI.Core.dll b/COP/PluginsApp/Plugins/NPOI.Core.dll new file mode 100644 index 0000000..602dff1 Binary files /dev/null and b/COP/PluginsApp/Plugins/NPOI.Core.dll differ diff --git a/COP/PluginsApp/Plugins/NPOI.OOXML.dll b/COP/PluginsApp/Plugins/NPOI.OOXML.dll new file mode 100644 index 0000000..467ac71 Binary files /dev/null and b/COP/PluginsApp/Plugins/NPOI.OOXML.dll differ diff --git a/COP/PluginsApp/Plugins/NPOI.OpenXml4Net.dll b/COP/PluginsApp/Plugins/NPOI.OpenXml4Net.dll new file mode 100644 index 0000000..6ed120c Binary files /dev/null and b/COP/PluginsApp/Plugins/NPOI.OpenXml4Net.dll differ diff --git a/COP/PluginsApp/Plugins/NPOI.OpenXmlFormats.dll b/COP/PluginsApp/Plugins/NPOI.OpenXmlFormats.dll new file mode 100644 index 0000000..ac08117 Binary files /dev/null and b/COP/PluginsApp/Plugins/NPOI.OpenXmlFormats.dll differ diff --git a/COP/PluginsApp/Plugins/Npgsql.EntityFrameworkCore.PostgreSQL.dll b/COP/PluginsApp/Plugins/Npgsql.EntityFrameworkCore.PostgreSQL.dll new file mode 100644 index 0000000..f9970fe Binary files /dev/null and b/COP/PluginsApp/Plugins/Npgsql.EntityFrameworkCore.PostgreSQL.dll differ diff --git a/COP/PluginsApp/Plugins/Npgsql.dll b/COP/PluginsApp/Plugins/Npgsql.dll new file mode 100644 index 0000000..6b90121 Binary files /dev/null and b/COP/PluginsApp/Plugins/Npgsql.dll differ diff --git a/COP/PluginsApp/Plugins/OxyPlot.WindowsForms.dll b/COP/PluginsApp/Plugins/OxyPlot.WindowsForms.dll new file mode 100644 index 0000000..103acdd Binary files /dev/null and b/COP/PluginsApp/Plugins/OxyPlot.WindowsForms.dll differ diff --git a/COP/PluginsApp/Plugins/OxyPlot.Wpf.Shared.dll b/COP/PluginsApp/Plugins/OxyPlot.Wpf.Shared.dll new file mode 100644 index 0000000..f6012cd Binary files /dev/null and b/COP/PluginsApp/Plugins/OxyPlot.Wpf.Shared.dll differ diff --git a/COP/PluginsApp/Plugins/OxyPlot.Wpf.dll b/COP/PluginsApp/Plugins/OxyPlot.Wpf.dll new file mode 100644 index 0000000..7905954 Binary files /dev/null and b/COP/PluginsApp/Plugins/OxyPlot.Wpf.dll differ diff --git a/COP/PluginsApp/Plugins/OxyPlot.dll b/COP/PluginsApp/Plugins/OxyPlot.dll new file mode 100644 index 0000000..c652fdb Binary files /dev/null and b/COP/PluginsApp/Plugins/OxyPlot.dll differ diff --git a/COP/PluginsApp/Plugins/PdfSharp.Charting.dll b/COP/PluginsApp/Plugins/PdfSharp.Charting.dll new file mode 100644 index 0000000..384a0f0 Binary files /dev/null and b/COP/PluginsApp/Plugins/PdfSharp.Charting.dll differ diff --git a/COP/PluginsApp/Plugins/PdfSharp.dll b/COP/PluginsApp/Plugins/PdfSharp.dll new file mode 100644 index 0000000..aa564e1 Binary files /dev/null and b/COP/PluginsApp/Plugins/PdfSharp.dll differ diff --git a/COP/PluginsApp/Plugins/PluginsApp.dll b/COP/PluginsApp/Plugins/PluginsApp.dll new file mode 100644 index 0000000..acdbef0 Binary files /dev/null and b/COP/PluginsApp/Plugins/PluginsApp.dll differ diff --git a/COP/PluginsApp/Plugins/PluginsConventionLibrary.dll b/COP/PluginsApp/Plugins/PluginsConventionLibrary.dll new file mode 100644 index 0000000..c0c0c92 Binary files /dev/null and b/COP/PluginsApp/Plugins/PluginsConventionLibrary.dll differ diff --git a/COP/PluginsApp/Plugins/PortalAccountsBusinessLogic.dll b/COP/PluginsApp/Plugins/PortalAccountsBusinessLogic.dll new file mode 100644 index 0000000..e0ca86b Binary files /dev/null and b/COP/PluginsApp/Plugins/PortalAccountsBusinessLogic.dll differ diff --git a/COP/PluginsApp/Plugins/PortalAccountsContracts.dll b/COP/PluginsApp/Plugins/PortalAccountsContracts.dll new file mode 100644 index 0000000..1b8aa7b Binary files /dev/null and b/COP/PluginsApp/Plugins/PortalAccountsContracts.dll differ diff --git a/COP/PluginsApp/Plugins/PortalAccountsDataModels.dll b/COP/PluginsApp/Plugins/PortalAccountsDataModels.dll new file mode 100644 index 0000000..e22abb9 Binary files /dev/null and b/COP/PluginsApp/Plugins/PortalAccountsDataModels.dll differ diff --git a/COP/PluginsApp/Plugins/PortalAccountsDatabaseImplement.dll b/COP/PluginsApp/Plugins/PortalAccountsDatabaseImplement.dll new file mode 100644 index 0000000..a3fe40c Binary files /dev/null and b/COP/PluginsApp/Plugins/PortalAccountsDatabaseImplement.dll differ diff --git a/COP/PluginsApp/Plugins/PortalAccountsView.dll b/COP/PluginsApp/Plugins/PortalAccountsView.dll new file mode 100644 index 0000000..b628e7b Binary files /dev/null and b/COP/PluginsApp/Plugins/PortalAccountsView.dll differ diff --git a/COP/PluginsApp/Plugins/PutincevLibrary.dll b/COP/PluginsApp/Plugins/PutincevLibrary.dll new file mode 100644 index 0000000..4fdf204 Binary files /dev/null and b/COP/PluginsApp/Plugins/PutincevLibrary.dll differ diff --git a/COP/PluginsApp/Plugins/RodionovLibrary.dll b/COP/PluginsApp/Plugins/RodionovLibrary.dll new file mode 100644 index 0000000..378132d Binary files /dev/null and b/COP/PluginsApp/Plugins/RodionovLibrary.dll differ diff --git a/COP/PluginsApp/Plugins/SixLabors.Fonts.dll b/COP/PluginsApp/Plugins/SixLabors.Fonts.dll new file mode 100644 index 0000000..6fc5838 Binary files /dev/null and b/COP/PluginsApp/Plugins/SixLabors.Fonts.dll differ diff --git a/COP/PluginsApp/Plugins/SixLabors.ImageSharp.dll b/COP/PluginsApp/Plugins/SixLabors.ImageSharp.dll new file mode 100644 index 0000000..bec54fd Binary files /dev/null and b/COP/PluginsApp/Plugins/SixLabors.ImageSharp.dll differ diff --git a/COP/PluginsApp/Plugins/System.IO.Packaging.dll b/COP/PluginsApp/Plugins/System.IO.Packaging.dll new file mode 100644 index 0000000..eb95db7 Binary files /dev/null and b/COP/PluginsApp/Plugins/System.IO.Packaging.dll differ diff --git a/COP/PluginsApp/Plugins/System.Security.Cryptography.Pkcs.dll b/COP/PluginsApp/Plugins/System.Security.Cryptography.Pkcs.dll new file mode 100644 index 0000000..e521fd3 Binary files /dev/null and b/COP/PluginsApp/Plugins/System.Security.Cryptography.Pkcs.dll differ diff --git a/COP/PluginsApp/PluginsApp.csproj b/COP/PluginsApp/PluginsApp.csproj new file mode 100644 index 0000000..b511b7b --- /dev/null +++ b/COP/PluginsApp/PluginsApp.csproj @@ -0,0 +1,19 @@ + + + + WinExe + net8.0-windows7.0 + enable + true + enable + + + + + + + + + + + \ No newline at end of file diff --git a/COP/PluginsApp/Program.cs b/COP/PluginsApp/Program.cs new file mode 100644 index 0000000..1d6f10e --- /dev/null +++ b/COP/PluginsApp/Program.cs @@ -0,0 +1,17 @@ +namespace PluginsApp +{ + 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 FormMain()); + } + } +} \ No newline at end of file diff --git a/COP/PluginsConventionLibrary/IPluginsConvention.cs b/COP/PluginsConventionLibrary/IPluginsConvention.cs new file mode 100644 index 0000000..dd5ab3d --- /dev/null +++ b/COP/PluginsConventionLibrary/IPluginsConvention.cs @@ -0,0 +1,66 @@ +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/COP/PluginsConventionLibrary/PluginsConventionElement.cs b/COP/PluginsConventionLibrary/PluginsConventionElement.cs new file mode 100644 index 0000000..01caf21 --- /dev/null +++ b/COP/PluginsConventionLibrary/PluginsConventionElement.cs @@ -0,0 +1,7 @@ +namespace PluginsConventionLibrary +{ + public class PluginsConventionElement + { + public Guid Id { get; set; } + } +} diff --git a/COP/PluginsConventionLibrary/PluginsConventionLibrary.csproj b/COP/PluginsConventionLibrary/PluginsConventionLibrary.csproj new file mode 100644 index 0000000..060aa1c --- /dev/null +++ b/COP/PluginsConventionLibrary/PluginsConventionLibrary.csproj @@ -0,0 +1,10 @@ + + + + net6.0-windows + enable + true + enable + + + diff --git a/COP/PluginsConventionLibrary/PluginsConventionSaveDocument.cs b/COP/PluginsConventionLibrary/PluginsConventionSaveDocument.cs new file mode 100644 index 0000000..64491eb --- /dev/null +++ b/COP/PluginsConventionLibrary/PluginsConventionSaveDocument.cs @@ -0,0 +1,7 @@ +namespace PluginsConventionLibrary +{ + public class PluginsConventionSaveDocument + { + public string FileName { get; set; } + } +} diff --git a/COP/PortalAccountsView/PluginsConvention.cs b/COP/PortalAccountsView/PluginsConvention.cs new file mode 100644 index 0000000..7170f2e --- /dev/null +++ b/COP/PortalAccountsView/PluginsConvention.cs @@ -0,0 +1,224 @@ +using Components; +using Components.NonVisual; +using Components.SaveToPdfHelpers; +using NPOI.HPSF; +using PluginsConventionLibrary; +using PortalAccountsBusinessLogic.BusinessLogics; +using PortalAccountsContracts.BindingModels; +using PortalAccountsContracts.BusinessLogicsContracts; +using PortalAccountsContracts.ViewModels; +using PortalAccountsDatabaseImplement.Implements; +using PutincevLibrary; +using RodionovLibrary.NonVisualComponents; +using RodionovLibrary.NonVisualComponents.HelperModels; +using System.Text; + +namespace PortalAccountsView +{ + public class PluginsConvention : IPluginsConvention + { + private readonly IAccountLogic _accountLogic; + + private readonly IInterestLogic _interestLogic; + + private readonly CustomDataGridView _customDataGridViewTable = new(); + + private readonly ComponentExcelWithImage _componentExcelWithImage = new(); + + private readonly WordTableComponent _wordTableComponent = new(); + + private readonly HistogramPDF _histogrampdf = new(); + + public PluginsConvention() + { + _accountLogic = new AccountLogic(new AccountStorage()); + _interestLogic = new InterestLogic(new InterestStorage()); + ReloadData(); + } + + public string PluginName => "LabWork3 Plugin"; + + public UserControl GetControl => _customDataGridViewTable; + + public PluginsConventionElement GetElement + { + get + { + var selected = _customDataGridViewTable.GetSelectedObject() + ?? throw new Exception("Не удалось получить выбранный элемент"); + return new PluginsConventionAccount() + { + Id = IntToGuid(selected.Id), + Login = selected.Login, + AvatarPath = selected.AvatarPath, + InterestName = selected.InterestName, + Email = selected.Email + }; + } + } + + public Form GetForm(PluginsConventionElement element) + { + var formAccount = new FormAccount(_accountLogic, _interestLogic); + if (element != null) + { + formAccount.Id = element.Id.GetHashCode(); + } + return formAccount; + } + + public Form GetThesaurus() + { + return new FormInterests(_interestLogic); + } + + public bool DeleteElement(PluginsConventionElement element) + { + return _accountLogic.Delete( + new AccountBindingModel { Id = element.Id.GetHashCode() } + ); + } + + public void ReloadData() + { + try + { + var accounts = _accountLogic.ReadList(null) ?? throw new Exception("Не удалось получить список аккаунтов"); + + _customDataGridViewTable.ClearRows(); + + var tables = new List<(string, string, float)> { + ("Идентификатор", "Id", 1), + ("Логин", "Login", 1), + ("Интерес", "InterestName", 2), + ("Почта", "Email", 2) + }; + + _customDataGridViewTable.ConfigureColumns(tables); + + _customDataGridViewTable.FillData(accounts); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + public bool CreateSimpleDocument(PluginsConventionSaveDocument saveDocument) + { + try + { + List images = new List(); + var list = _accountLogic.ReadList(null); + if (list != null) + { + foreach (var item in list) + { + images.Add(item.AvatarPath); + } + string[] imagesArray = images.ToArray(); + + _componentExcelWithImage.CreateExcelWithImages(saveDocument.FileName, "Сканы чеков", imagesArray); + } + return true; + } + catch (Exception) + { + return false; + } + } + + public bool CreateTableDocument(PluginsConventionSaveDocument saveDocument) + { + Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + try + { + string title = "Документ с таблицей"; + + var mergedColumns = new List<(int, int)> + { + (1, 2), + }; + var columns = new List + { + new() { FirstRowHeader = "Идент", PropertyName = "Id", Width = 1.3 }, + new() { FirstRowHeader = "Личные данные", SecondRowHeader = "Логин", PropertyName = "Login", Width = 1.7 }, + new() { FirstRowHeader = "Личные данные", SecondRowHeader = "Почта", PropertyName = "Email", Width = 1.7 }, + new() { FirstRowHeader = "Интерес", PropertyName = "InterestName", Width = 1.7 }, + }; + + var list = _accountLogic.ReadList(null); + + var tableInfo = new WordTableInfo + { + FileName = saveDocument.FileName, + Title = title, + ColumnParameters = columns, + Items = list, + MergedColumns = mergedColumns + }; + _wordTableComponent.CreateTable(tableInfo); + return true; + } + catch (Exception) + { + return false; + } + } + + public bool CreateChartDocument(PluginsConventionSaveDocument saveDocument) + { + try + { + var accounts = _accountLogic.ReadList(null); + + + + var list = new ChartData(); + + var groupedAccounts = accounts.GroupBy(account => account.InterestName) + .Select(group => new + { + InterestName = group.Key, + AccountCount = group.Count() + }) + .ToList(); + + var data = new Dictionary(); + + foreach (var group in groupedAccounts) + { + data.Add(group.InterestName, (double)group.AccountCount); + } + + list.Data = data; + list.SeriesName = "Пользователи"; + var acc = new List(); + + acc.Add(list); + + var histogrammInfo = new HistogramData + { + FilePath = saveDocument.FileName, + DocumentTitle = "Гистограмма PDF", + ChartTitle = "Количетсво интересов у пользователей", + LegendPosition = LegendPositions.Bottom, + ChartData = acc, + }; + _histogrampdf.CreateHistogramPdf(histogrammInfo); + return true; + } + catch (Exception) + { + return false; + } + } + + private Guid IntToGuid(int value) + { + byte[] bytes = new byte[16]; + BitConverter.GetBytes(value).CopyTo(bytes, 0); + return new Guid(bytes); + } + } +} diff --git a/COP/PortalAccountsView/PluginsConventionAccount.cs b/COP/PortalAccountsView/PluginsConventionAccount.cs new file mode 100644 index 0000000..323c759 --- /dev/null +++ b/COP/PortalAccountsView/PluginsConventionAccount.cs @@ -0,0 +1,15 @@ +using PluginsConventionLibrary; + +namespace PortalAccountsView +{ + public class PluginsConventionAccount : PluginsConventionElement + { + public string Login { get; set; } = string.Empty; + + public string? AvatarPath { get; set; } + + public string InterestName { get; set; } = string.Empty; + + public string Email { get; set; } = string.Empty; + } +} diff --git a/COP/PortalAccountsView/PortalAccountsView.csproj b/COP/PortalAccountsView/PortalAccountsView.csproj index c4e6db9..74fbc5a 100644 --- a/COP/PortalAccountsView/PortalAccountsView.csproj +++ b/COP/PortalAccountsView/PortalAccountsView.csproj @@ -22,6 +22,8 @@ + +