This commit is contained in:
2024-09-18 14:28:52 +04:00
parent a29a9928ea
commit a887e43aba
10 changed files with 55 additions and 60 deletions

View File

@@ -1,4 +1,4 @@
/*namespace Ivanov_App
namespace Ivanov_App
{
partial class EmployerForm
{
@@ -32,7 +32,7 @@
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.customInputRangeNumber = new MyCustomComponents.CustomInputRangeNumber();
this.dropDownList = new Kashin_1.DropDownList();
this.dropDownList = new CustomComponent.DropDownList();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.textBoxPosts = new System.Windows.Forms.TextBox();
@@ -160,10 +160,10 @@
private Label label1;
private Label label2;
private MyCustomComponents.CustomInputRangeNumber customInputRangeNumber;
private Kashin_1.DropDownList dropDownList;
private CustomComponent.DropDownList dropDownList;
private Label label3;
private Label label4;
private TextBox textBoxPosts;
private Button buttonCreate;
}
}*/
}

View File

@@ -1,4 +1,6 @@
/*using EnterpriseContracts.BusinessLogicContracts;
using EnterpriseContracts.BindingModels;
using EnterpriseContracts.BusinessLogicContracts;
using EnterpriseContracts.ViewModels;
using System.Data;
namespace Ivanov_App
@@ -76,4 +78,3 @@ namespace Ivanov_App
}
}
}
*/

View File

@@ -1,4 +1,4 @@
/*namespace Ivanov_App
namespace Ivanov_App
{
partial class FormMain
{
@@ -170,4 +170,4 @@
private ToolStripMenuItem pdfToolStripMenuItem;
private ToolStripMenuItem directoryToolStripMenuItem;
}
}*/
}

View File

@@ -1,7 +1,9 @@
/*using EnterpriseContracts.BindingModels;
using EnterpriseContracts.BindingModels;
using EnterpriseContracts.BusinessLogicContracts;
using EnterpriseContracts.ViewModels;
using MyCustomComponents.Models;
using System.Data;
using Unity;
namespace Ivanov_App
{
@@ -187,4 +189,3 @@ namespace Ivanov_App
}
}
}
*/

View File

@@ -9,15 +9,21 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CustomComponent" Version="1.0.0" />
<PackageReference Include="Ivanov_components" Version="1.0.0" />
<PackageReference Include="Ivanov_visual_components" Version="1.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.11">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MyCustomComponents" Version="1.0.0" />
<PackageReference Include="Unity" Version="5.11.10" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EnterpriseBusinessLogic\EnterpriseBusinessLogic.csproj" />
<ProjectReference Include="..\EnterpriseContracts\EnterpriseContracts.csproj" />
<ProjectReference Include="..\EnterpriseDataBaseImplement\EnterpriseDataBaseImplement.csproj" />
<ProjectReference Include="..\Ivanov_components\Ivanov_components.csproj" />
<ProjectReference Include="..\Ivanov_visual_components\Ivanov_visual_components.csproj" />
</ItemGroup>
</Project>

View File

@@ -1,17 +1,40 @@
using EnterpriseBusinessLogic.BusinessLogics;
using EnterpriseContracts.BusinessLogicContracts;
using EnterpriseContracts.StorageContracts;
using EnterpriseDataBaseImplement.Implements;
using Unity.Lifetime;
using Unity;
namespace Ivanov_App
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
private static IUnityContainer container = null;
public static IUnityContainer Container { get { container ??= BuildUnityContainer(); return container; } }
[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 Form());
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(Container.Resolve<FormMain>());
}
private static IUnityContainer BuildUnityContainer()
{
var currentContainer = new UnityContainer();
currentContainer.RegisterType<IEmployeeStorage, EmployeeStorage>(new HierarchicalLifetimeManager());
currentContainer.RegisterType<ISubdivisionStorage, SubdivisionStorage>(new HierarchicalLifetimeManager());
currentContainer.RegisterType<IEmployeeLogic, EmployeeLogic>(new HierarchicalLifetimeManager());
currentContainer.RegisterType<ISubdivisionLogic, SubdivisionLogic>(new HierarchicalLifetimeManager());
currentContainer.RegisterType<EmployerForm>();
currentContainer.RegisterType<Directory>();
return currentContainer;
}
}
}

View File

@@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ivanov_App
{
public class Student
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Surname { get; set; } = string.Empty;
public int Course { get; set; }
public Student(int id, string name, string surname, int course)
{
Id = id;
Name = name;
Surname = surname;
Course = course;
}
public Student() { }
}
}

View File

@@ -5,6 +5,7 @@
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
<ItemGroup>

View File

@@ -5,6 +5,7 @@
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
</Project>

View File

@@ -3,17 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.10.35122.118
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ivanov_visual_components", "Ivanov_visual_components\Ivanov_visual_components.csproj", "{3FEAB427-D75C-442E-B5FE-6285202B442C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ivanov_App", "Ivanov_App\Ivanov_App.csproj", "{64CD7137-E0BF-4F35-8F33-B07AFED1393F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ivanov_components", "Ivanov_components\Ivanov_components.csproj", "{E162208D-662D-4419-9B33-A61189E0CC20}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnterpriseContracts", "EnterpriseContracts\EnterpriseContracts.csproj", "{196E0D33-EA70-42F0-AF4F-BD66843AB836}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EnterpriseContracts", "EnterpriseContracts\EnterpriseContracts.csproj", "{196E0D33-EA70-42F0-AF4F-BD66843AB836}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnterpriseBusinessLogic", "EnterpriseBusinessLogic\EnterpriseBusinessLogic.csproj", "{45AFE8E1-F8F4-4D8C-8385-00E2C370EB3C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EnterpriseBusinessLogic", "EnterpriseBusinessLogic\EnterpriseBusinessLogic.csproj", "{45AFE8E1-F8F4-4D8C-8385-00E2C370EB3C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EnterpriseDataBaseImplement", "EnterpriseDataBaseImplement\EnterpriseDataBaseImplement.csproj", "{FAFF75D4-135E-40E3-BC83-A3B41C3D167E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnterpriseDataBaseImplement", "EnterpriseDataBaseImplement\EnterpriseDataBaseImplement.csproj", "{FAFF75D4-135E-40E3-BC83-A3B41C3D167E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -21,18 +17,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3FEAB427-D75C-442E-B5FE-6285202B442C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FEAB427-D75C-442E-B5FE-6285202B442C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3FEAB427-D75C-442E-B5FE-6285202B442C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3FEAB427-D75C-442E-B5FE-6285202B442C}.Release|Any CPU.Build.0 = Release|Any CPU
{64CD7137-E0BF-4F35-8F33-B07AFED1393F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64CD7137-E0BF-4F35-8F33-B07AFED1393F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64CD7137-E0BF-4F35-8F33-B07AFED1393F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{64CD7137-E0BF-4F35-8F33-B07AFED1393F}.Release|Any CPU.Build.0 = Release|Any CPU
{E162208D-662D-4419-9B33-A61189E0CC20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E162208D-662D-4419-9B33-A61189E0CC20}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E162208D-662D-4419-9B33-A61189E0CC20}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E162208D-662D-4419-9B33-A61189E0CC20}.Release|Any CPU.Build.0 = Release|Any CPU
{196E0D33-EA70-42F0-AF4F-BD66843AB836}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{196E0D33-EA70-42F0-AF4F-BD66843AB836}.Debug|Any CPU.Build.0 = Debug|Any CPU
{196E0D33-EA70-42F0-AF4F-BD66843AB836}.Release|Any CPU.ActiveCfg = Release|Any CPU