diff --git a/KOP/Ivanov_App/EmployerForm.Designer.cs b/KOP/Ivanov_App/EmployerForm.Designer.cs index 8fdd250..a71071a 100644 --- a/KOP/Ivanov_App/EmployerForm.Designer.cs +++ b/KOP/Ivanov_App/EmployerForm.Designer.cs @@ -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; } -}*/ \ No newline at end of file +} \ No newline at end of file diff --git a/KOP/Ivanov_App/EmployerForm.cs b/KOP/Ivanov_App/EmployerForm.cs index 3879902..7e6b452 100644 --- a/KOP/Ivanov_App/EmployerForm.cs +++ b/KOP/Ivanov_App/EmployerForm.cs @@ -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 } } } -*/ \ No newline at end of file diff --git a/KOP/Ivanov_App/FormMain.Designer.cs b/KOP/Ivanov_App/FormMain.Designer.cs index 6da60e2..ed459ec 100644 --- a/KOP/Ivanov_App/FormMain.Designer.cs +++ b/KOP/Ivanov_App/FormMain.Designer.cs @@ -1,4 +1,4 @@ -/*namespace Ivanov_App +namespace Ivanov_App { partial class FormMain { @@ -170,4 +170,4 @@ private ToolStripMenuItem pdfToolStripMenuItem; private ToolStripMenuItem directoryToolStripMenuItem; } -}*/ \ No newline at end of file +} \ No newline at end of file diff --git a/KOP/Ivanov_App/FormMain.cs b/KOP/Ivanov_App/FormMain.cs index b46fdee..3dc705d 100644 --- a/KOP/Ivanov_App/FormMain.cs +++ b/KOP/Ivanov_App/FormMain.cs @@ -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 } } } -*/ \ No newline at end of file diff --git a/KOP/Ivanov_App/Ivanov_App.csproj b/KOP/Ivanov_App/Ivanov_App.csproj index 618c1b1..6af7198 100644 --- a/KOP/Ivanov_App/Ivanov_App.csproj +++ b/KOP/Ivanov_App/Ivanov_App.csproj @@ -9,15 +9,21 @@ + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - \ No newline at end of file diff --git a/KOP/Ivanov_App/Program.cs b/KOP/Ivanov_App/Program.cs index 7e68c26..c067e96 100644 --- a/KOP/Ivanov_App/Program.cs +++ b/KOP/Ivanov_App/Program.cs @@ -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 { - /// - /// The main entry point for the application. - /// + 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()); + } + + private static IUnityContainer BuildUnityContainer() + { + var currentContainer = new UnityContainer(); + + currentContainer.RegisterType(new HierarchicalLifetimeManager()); + currentContainer.RegisterType(new HierarchicalLifetimeManager()); + + currentContainer.RegisterType(new HierarchicalLifetimeManager()); + currentContainer.RegisterType(new HierarchicalLifetimeManager()); + + currentContainer.RegisterType(); + currentContainer.RegisterType(); + + return currentContainer; } } } \ No newline at end of file diff --git a/KOP/Ivanov_App/Student.cs b/KOP/Ivanov_App/Student.cs deleted file mode 100644 index 1fc01a6..0000000 --- a/KOP/Ivanov_App/Student.cs +++ /dev/null @@ -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() { } - } -} diff --git a/KOP/Ivanov_components/Ivanov_components.csproj b/KOP/Ivanov_components/Ivanov_components.csproj index abce47b..2b7ed38 100644 --- a/KOP/Ivanov_components/Ivanov_components.csproj +++ b/KOP/Ivanov_components/Ivanov_components.csproj @@ -5,6 +5,7 @@ enable true enable + True diff --git a/KOP/Ivanov_visual_components/Ivanov_visual_components.csproj b/KOP/Ivanov_visual_components/Ivanov_visual_components.csproj index 060aa1c..730bfcd 100644 --- a/KOP/Ivanov_visual_components/Ivanov_visual_components.csproj +++ b/KOP/Ivanov_visual_components/Ivanov_visual_components.csproj @@ -5,6 +5,7 @@ enable true enable + True diff --git a/KOP/KOP.sln b/KOP/KOP.sln index 4e28c0b..cb98aa9 100644 --- a/KOP/KOP.sln +++ b/KOP/KOP.sln @@ -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