From be276137565369f4fbe6a384c5d16917c66733d3 Mon Sep 17 00:00:00 2001 From: AnnZhimol Date: Mon, 30 Jan 2023 14:48:39 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BindingModels/ComponentBindingModel.cs | 4 +- .../BindingModels/OrderBindingModel.cs | 6 +- .../BindingModels/PackageBindingModel.cs | 4 +- .../IComponentLogic.cs | 8 +- .../BusinessLogicsContracts/IOrderLogic.cs | 8 +- .../BusinessLogicsContracts/IPackageLogic.cs | 8 +- .../SearchModels/ComponentSearchModel.cs | 2 +- .../SearchModels/OrderSearchModel.cs | 2 +- .../SearchModels/PackageSearchModel.cs | 2 +- ...j => SofrwareInstallationContracts.csproj} | 2 +- .../StoragesContracts/IComponentStorage.cs | 8 +- .../StoragesContracts/IOrderStorage.cs | 8 +- .../StoragesContracts/IPackageStorage.cs | 8 +- .../ViewModels/ComponentViewModel.cs | 4 +- .../ViewModels/OrderViewModel.cs | 6 +- .../ViewModels/PackageViewModel.cs | 4 +- .../BusinessLogic/ComponentLogic.cs | 12 +- .../BusinessLogic/OrderLogic.cs | 12 +- .../BusinessLogic/PackageLogic.cs | 12 +- ... SoftwareInstallationBusinessLogic.csproj} | 2 +- .../Enums/OrderStatus.cs | 2 +- .../IId.cs | 2 +- .../Models/IComponentModel.cs | 2 +- .../Models/IOrderModel.cs | 4 +- .../Models/IPackageModel.cs | 2 +- ... => SoftwareInstallationDataModels.csproj} | 0 .../DataListSingleton.cs | 4 +- .../Implements/ComponentStorage.cs | 12 +- .../Implements/OrderStorage.cs | 12 +- .../Implements/PackageStorage.cs | 12 +- .../Models/Component.cs | 8 +- .../Models/Order.cs | 10 +- .../Models/Package.cs | 8 +- ... SoftwareInstallationListImplement.csproj} | 4 +- .../AbstractSoftwareInstallationView.csproj | 9 ++ SoftwareInstallation/SoftwareInstallation.sln | 10 +- .../SoftwareInstallation/Form1.Designer.cs | 39 ------ .../SoftwareInstallation/Form1.cs | 10 -- .../SoftwareInstallation/Form1.resx | 120 ------------------ .../FormComponent.Designer.cs | 118 +++++++++++++++++ .../SoftwareInstallation/FormComponent.cs | 102 +++++++++++++++ .../SoftwareInstallation/FormComponent.resx | 60 +++++++++ .../FormComponents.Designer.cs | 61 +++++++++ .../SoftwareInstallation/FormComponents.cs | 20 +++ .../SoftwareInstallation/FormComponents.resx | 60 +++++++++ .../SoftwareInstallation/Program.cs | 4 +- .../Properties/launchSettings.json | 7 + ...csproj => SoftwareInstallationView.csproj} | 4 + 48 files changed, 551 insertions(+), 277 deletions(-) rename SoftwareInstallation/AbstractSofrwareInstallationContracts/{AbstractSofrwareInstallationContracts.csproj => SofrwareInstallationContracts.csproj} (97%) rename SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/{AbstractSoftwareInstallationBusinessLogic.csproj => SoftwareInstallationBusinessLogic.csproj} (97%) rename SoftwareInstallation/AbstractSoftwareInstallationDataModels/{AbstractSoftwareInstallationDataModels.csproj => SoftwareInstallationDataModels.csproj} (100%) rename SoftwareInstallation/AbstractSoftwareInstallationListImplement/{AbstractSoftwareInstallationListImplement.csproj => SoftwareInstallationListImplement.csproj} (75%) create mode 100644 SoftwareInstallation/AbstractSoftwareInstallationView/AbstractSoftwareInstallationView.csproj delete mode 100644 SoftwareInstallation/SoftwareInstallation/Form1.Designer.cs delete mode 100644 SoftwareInstallation/SoftwareInstallation/Form1.cs delete mode 100644 SoftwareInstallation/SoftwareInstallation/Form1.resx create mode 100644 SoftwareInstallation/SoftwareInstallation/FormComponent.Designer.cs create mode 100644 SoftwareInstallation/SoftwareInstallation/FormComponent.cs create mode 100644 SoftwareInstallation/SoftwareInstallation/FormComponent.resx create mode 100644 SoftwareInstallation/SoftwareInstallation/FormComponents.Designer.cs create mode 100644 SoftwareInstallation/SoftwareInstallation/FormComponents.cs create mode 100644 SoftwareInstallation/SoftwareInstallation/FormComponents.resx create mode 100644 SoftwareInstallation/SoftwareInstallation/Properties/launchSettings.json rename SoftwareInstallation/SoftwareInstallation/{SoftwareInstallation.csproj => SoftwareInstallationView.csproj} (93%) diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/ComponentBindingModel.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/ComponentBindingModel.cs index 1cc1f5d..8d77a7d 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/ComponentBindingModel.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/ComponentBindingModel.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSoftwareInstallationDataModels.Models; +using SoftwareInstallationDataModels.Models; -namespace AbstractSofrwareInstallationContracts.BindingModels +namespace SofrwareInstallationContracts.BindingModels { public class ComponentBindingModel : IComponentModel { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/OrderBindingModel.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/OrderBindingModel.cs index 9022854..6a84f1b 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/OrderBindingModel.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/OrderBindingModel.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSoftwareInstallationDataModels.Models; -using AbstractSoftwareInstallationDataModels.Enums; +using SoftwareInstallationDataModels.Models; +using SoftwareInstallationDataModels.Enums; -namespace AbstractSofrwareInstallationContracts.BindingModels +namespace SofrwareInstallationContracts.BindingModels { public class OrderBindingModel : IOrderModel { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/PackageBindingModel.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/PackageBindingModel.cs index 68ac9fb..a4bff75 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/PackageBindingModel.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BindingModels/PackageBindingModel.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSoftwareInstallationDataModels.Models; +using SoftwareInstallationDataModels.Models; -namespace AbstractSofrwareInstallationContracts.BindingModels +namespace SofrwareInstallationContracts.BindingModels { public class PackageBindingModel : IPackageModel { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IComponentLogic.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IComponentLogic.cs index 669c791..f469e51 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IComponentLogic.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IComponentLogic.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.ViewModels; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.ViewModels; -namespace AbstractSofrwareInstallationContracts.BusinessLogicsContracts +namespace SofrwareInstallationContracts.BusinessLogicsContracts { public interface IComponentLogic { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IOrderLogic.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IOrderLogic.cs index bb0bb61..438a365 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IOrderLogic.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IOrderLogic.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.ViewModels; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.ViewModels; -namespace AbstractSofrwareInstallationContracts.BusinessLogicsContracts +namespace SofrwareInstallationContracts.BusinessLogicsContracts { public interface IOrderLogic { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IPackageLogic.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IPackageLogic.cs index 031c33f..73acc0c 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IPackageLogic.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/BusinessLogicsContracts/IPackageLogic.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.ViewModels; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.ViewModels; -namespace AbstractSofrwareInstallationContracts.BusinessLogicsContracts +namespace SofrwareInstallationContracts.BusinessLogicsContracts { public interface IPackageLogic { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/ComponentSearchModel.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/ComponentSearchModel.cs index e350e90..56c891a 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/ComponentSearchModel.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/ComponentSearchModel.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace AbstractSofrwareInstallationContracts.SearchModels +namespace SofrwareInstallationContracts.SearchModels { public class ComponentSearchModel { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/OrderSearchModel.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/OrderSearchModel.cs index 2d26d68..470ed6e 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/OrderSearchModel.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/OrderSearchModel.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace AbstractSofrwareInstallationContracts.SearchModels +namespace SofrwareInstallationContracts.SearchModels { public class OrderSearchModel { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/PackageSearchModel.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/PackageSearchModel.cs index 38d81b0..f8484e3 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/PackageSearchModel.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/SearchModels/PackageSearchModel.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace AbstractSofrwareInstallationContracts.SearchModels +namespace SofrwareInstallationContracts.SearchModels { public class PackageSearchModel { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/AbstractSofrwareInstallationContracts.csproj b/SoftwareInstallation/AbstractSofrwareInstallationContracts/SofrwareInstallationContracts.csproj similarity index 97% rename from SoftwareInstallation/AbstractSofrwareInstallationContracts/AbstractSofrwareInstallationContracts.csproj rename to SoftwareInstallation/AbstractSofrwareInstallationContracts/SofrwareInstallationContracts.csproj index 9124162..4ed0801 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/AbstractSofrwareInstallationContracts.csproj +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/SofrwareInstallationContracts.csproj @@ -32,7 +32,7 @@ - + diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IComponentStorage.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IComponentStorage.cs index 79abead..9395f8a 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IComponentStorage.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IComponentStorage.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.ViewModels; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.ViewModels; -namespace AbstractSofrwareInstallationContracts.StoragesContracts +namespace SofrwareInstallationContracts.StoragesContracts { public interface IComponentStorage { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IOrderStorage.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IOrderStorage.cs index 37ef00f..057fbf3 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IOrderStorage.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IOrderStorage.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.ViewModels; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.ViewModels; -namespace AbstractSofrwareInstallationContracts.StoragesContracts +namespace SofrwareInstallationContracts.StoragesContracts { public interface IOrderStorage { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IPackageStorage.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IPackageStorage.cs index 8b212b5..fa07a03 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IPackageStorage.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/StoragesContracts/IPackageStorage.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.ViewModels; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.ViewModels; -namespace AbstractSofrwareInstallationContracts.StoragesContracts +namespace SofrwareInstallationContracts.StoragesContracts { public interface IPackageStorage { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/ComponentViewModel.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/ComponentViewModel.cs index 818b96f..0c89e77 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/ComponentViewModel.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/ComponentViewModel.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSoftwareInstallationDataModels.Models; +using SoftwareInstallationDataModels.Models; using System.ComponentModel; -namespace AbstractSofrwareInstallationContracts.ViewModels +namespace SofrwareInstallationContracts.ViewModels { public class ComponentViewModel : IComponentModel { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/OrderViewModel.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/OrderViewModel.cs index 561b89b..b9c46be 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/OrderViewModel.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/OrderViewModel.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSoftwareInstallationDataModels.Enums; -using AbstractSoftwareInstallationDataModels.Models; +using SoftwareInstallationDataModels.Enums; +using SoftwareInstallationDataModels.Models; using System.ComponentModel; -namespace AbstractSofrwareInstallationContracts.ViewModels +namespace SofrwareInstallationContracts.ViewModels { public class OrderViewModel : IOrderModel { diff --git a/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/PackageViewModel.cs b/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/PackageViewModel.cs index e23c2ab..fb6d599 100644 --- a/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/PackageViewModel.cs +++ b/SoftwareInstallation/AbstractSofrwareInstallationContracts/ViewModels/PackageViewModel.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSoftwareInstallationDataModels.Models; +using SoftwareInstallationDataModels.Models; using System.ComponentModel; -namespace AbstractSofrwareInstallationContracts.ViewModels +namespace SofrwareInstallationContracts.ViewModels { public class PackageViewModel : IPackageModel { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/ComponentLogic.cs b/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/ComponentLogic.cs index be3d8ed..280d347 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/ComponentLogic.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/ComponentLogic.cs @@ -3,14 +3,14 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.BusinessLogicsContracts; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.StoragesContracts; -using AbstractSofrwareInstallationContracts.ViewModels; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.BusinessLogicsContracts; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.StoragesContracts; +using SofrwareInstallationContracts.ViewModels; using Microsoft.Extensions.Logging; -namespace AbstractSoftwareInstallationBusinessLogic.BusinessLogic +namespace SoftwareInstallationBusinessLogic.BusinessLogic { public class ComponentLogic : IComponentLogic { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/OrderLogic.cs b/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/OrderLogic.cs index b22b746..40aef69 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/OrderLogic.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/OrderLogic.cs @@ -3,14 +3,14 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.BusinessLogicsContracts; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.StoragesContracts; -using AbstractSofrwareInstallationContracts.ViewModels; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.BusinessLogicsContracts; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.StoragesContracts; +using SofrwareInstallationContracts.ViewModels; using Microsoft.Extensions.Logging; -namespace AbstractSoftwareInstallationBusinessLogic.BusinessLogic +namespace SoftwareInstallationBusinessLogic.BusinessLogic { public class OrderLogic : IOrderLogic { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/PackageLogic.cs b/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/PackageLogic.cs index 4e96ce5..e9ee272 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/PackageLogic.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/BusinessLogic/PackageLogic.cs @@ -3,14 +3,14 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.BusinessLogicsContracts; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.StoragesContracts; -using AbstractSofrwareInstallationContracts.ViewModels; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.BusinessLogicsContracts; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.StoragesContracts; +using SofrwareInstallationContracts.ViewModels; using Microsoft.Extensions.Logging; -namespace AbstractSoftwareInstallationBusinessLogic.BusinessLogic +namespace SoftwareInstallationBusinessLogic.BusinessLogic { public class PackageLogic : IPackageLogic { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/AbstractSoftwareInstallationBusinessLogic.csproj b/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/SoftwareInstallationBusinessLogic.csproj similarity index 97% rename from SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/AbstractSoftwareInstallationBusinessLogic.csproj rename to SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/SoftwareInstallationBusinessLogic.csproj index 4dc4d8e..eb6364d 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/AbstractSoftwareInstallationBusinessLogic.csproj +++ b/SoftwareInstallation/AbstractSoftwareInstallationBusinessLogic/SoftwareInstallationBusinessLogic.csproj @@ -32,7 +32,7 @@ - + diff --git a/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Enums/OrderStatus.cs b/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Enums/OrderStatus.cs index ccf37ba..f83f095 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Enums/OrderStatus.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Enums/OrderStatus.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace AbstractSoftwareInstallationDataModels.Enums +namespace SoftwareInstallationDataModels.Enums { public enum OrderStatus { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationDataModels/IId.cs b/SoftwareInstallation/AbstractSoftwareInstallationDataModels/IId.cs index 661747b..4c444f5 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationDataModels/IId.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationDataModels/IId.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace AbstractSoftwareInstallationDataModels +namespace SoftwareInstallationDataModels { public interface IId { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IComponentModel.cs b/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IComponentModel.cs index f5478c6..685e812 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IComponentModel.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IComponentModel.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace AbstractSoftwareInstallationDataModels.Models +namespace SoftwareInstallationDataModels.Models { public interface IComponentModel : IId { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IOrderModel.cs b/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IOrderModel.cs index 73057e9..a02d9a6 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IOrderModel.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IOrderModel.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSoftwareInstallationDataModels.Enums; +using SoftwareInstallationDataModels.Enums; -namespace AbstractSoftwareInstallationDataModels.Models +namespace SoftwareInstallationDataModels.Models { public interface IOrderModel : IId { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IPackageModel.cs b/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IPackageModel.cs index 3c3f2ac..2422691 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IPackageModel.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationDataModels/Models/IPackageModel.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace AbstractSoftwareInstallationDataModels.Models +namespace SoftwareInstallationDataModels.Models { public interface IPackageModel : IId { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationDataModels/AbstractSoftwareInstallationDataModels.csproj b/SoftwareInstallation/AbstractSoftwareInstallationDataModels/SoftwareInstallationDataModels.csproj similarity index 100% rename from SoftwareInstallation/AbstractSoftwareInstallationDataModels/AbstractSoftwareInstallationDataModels.csproj rename to SoftwareInstallation/AbstractSoftwareInstallationDataModels/SoftwareInstallationDataModels.csproj diff --git a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/DataListSingleton.cs b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/DataListSingleton.cs index c04b520..051fc2c 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/DataListSingleton.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/DataListSingleton.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSoftwareInstallationListImplement.Models; +using SoftwareInstallationListImplement.Models; -namespace AbstractSoftwareInstallationListImplement +namespace SoftwareInstallationListImplement { public class DataListSingleton { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/ComponentStorage.cs b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/ComponentStorage.cs index ac7dca8..954b1d1 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/ComponentStorage.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/ComponentStorage.cs @@ -3,13 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.StoragesContracts; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.ViewModels; -using AbstractSoftwareInstallationListImplement.Models; +using SofrwareInstallationContracts.StoragesContracts; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.ViewModels; +using SoftwareInstallationListImplement.Models; -namespace AbstractSoftwareInstallationListImplement.Implements +namespace SoftwareInstallationListImplement.Implements { public class ComponentStorage : IComponentStorage { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/OrderStorage.cs b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/OrderStorage.cs index 15e4438..efb4dd7 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/OrderStorage.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/OrderStorage.cs @@ -3,13 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.StoragesContracts; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.ViewModels; -using AbstractSoftwareInstallationListImplement.Models; +using SofrwareInstallationContracts.StoragesContracts; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.ViewModels; +using SoftwareInstallationListImplement.Models; -namespace AbstractSoftwareInstallationListImplement.Implements +namespace SoftwareInstallationListImplement.Implements { public class OrderStorage : IOrderStorage { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/PackageStorage.cs b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/PackageStorage.cs index d0be364..ab5e15e 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/PackageStorage.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Implements/PackageStorage.cs @@ -3,13 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.StoragesContracts; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.SearchModels; -using AbstractSofrwareInstallationContracts.ViewModels; -using AbstractSoftwareInstallationListImplement.Models; +using SofrwareInstallationContracts.StoragesContracts; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.SearchModels; +using SofrwareInstallationContracts.ViewModels; +using SoftwareInstallationListImplement.Models; -namespace AbstractSoftwareInstallationListImplement.Implements +namespace SoftwareInstallationListImplement.Implements { public class PackageStorage : IPackageStorage { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Component.cs b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Component.cs index 81806b7..b4b1801 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Component.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Component.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.ViewModels; -using AbstractSoftwareInstallationDataModels.Models; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.ViewModels; +using SoftwareInstallationDataModels.Models; -namespace AbstractSoftwareInstallationListImplement.Models +namespace SoftwareInstallationListImplement.Models { public class Component : IComponentModel { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Order.cs b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Order.cs index fecc3d5..8d3e254 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Order.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Order.cs @@ -4,12 +4,12 @@ using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.ViewModels; -using AbstractSoftwareInstallationDataModels.Enums; -using AbstractSoftwareInstallationDataModels.Models; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.ViewModels; +using SoftwareInstallationDataModels.Enums; +using SoftwareInstallationDataModels.Models; -namespace AbstractSoftwareInstallationListImplement.Models +namespace SoftwareInstallationListImplement.Models { public class Order : IOrderModel { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Package.cs b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Package.cs index e9eb8d2..d837b90 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Package.cs +++ b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/Models/Package.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using AbstractSofrwareInstallationContracts.BindingModels; -using AbstractSofrwareInstallationContracts.ViewModels; -using AbstractSoftwareInstallationDataModels.Models; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.ViewModels; +using SoftwareInstallationDataModels.Models; -namespace AbstractSoftwareInstallationListImplement.Models +namespace SoftwareInstallationListImplement.Models { public class Package : IPackageModel { diff --git a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/AbstractSoftwareInstallationListImplement.csproj b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/SoftwareInstallationListImplement.csproj similarity index 75% rename from SoftwareInstallation/AbstractSoftwareInstallationListImplement/AbstractSoftwareInstallationListImplement.csproj rename to SoftwareInstallation/AbstractSoftwareInstallationListImplement/SoftwareInstallationListImplement.csproj index 8492836..05dacb5 100644 --- a/SoftwareInstallation/AbstractSoftwareInstallationListImplement/AbstractSoftwareInstallationListImplement.csproj +++ b/SoftwareInstallation/AbstractSoftwareInstallationListImplement/SoftwareInstallationListImplement.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/SoftwareInstallation/AbstractSoftwareInstallationView/AbstractSoftwareInstallationView.csproj b/SoftwareInstallation/AbstractSoftwareInstallationView/AbstractSoftwareInstallationView.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/SoftwareInstallation/AbstractSoftwareInstallationView/AbstractSoftwareInstallationView.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + diff --git a/SoftwareInstallation/SoftwareInstallation.sln b/SoftwareInstallation/SoftwareInstallation.sln index 0d73945..c44fcf1 100644 --- a/SoftwareInstallation/SoftwareInstallation.sln +++ b/SoftwareInstallation/SoftwareInstallation.sln @@ -3,15 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.3.32825.248 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SoftwareInstallation", "SoftwareInstallation\SoftwareInstallation.csproj", "{4FD4B54E-7826-42C3-AC7D-6DE0A0C32574}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SoftwareInstallationView", "SoftwareInstallation\SoftwareInstallationView.csproj", "{4FD4B54E-7826-42C3-AC7D-6DE0A0C32574}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbstractSoftwareInstallationDataModels", "AbstractSoftwareInstallationDataModels\AbstractSoftwareInstallationDataModels.csproj", "{FF4F8531-C712-400C-8F0E-D74867ACF0A3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SoftwareInstallationDataModels", "AbstractSoftwareInstallationDataModels\SoftwareInstallationDataModels.csproj", "{FF4F8531-C712-400C-8F0E-D74867ACF0A3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbstractSofrwareInstallationContracts", "AbstractSofrwareInstallationContracts\AbstractSofrwareInstallationContracts.csproj", "{58522156-D91F-4693-8EFC-7D47464FC4CE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SofrwareInstallationContracts", "AbstractSofrwareInstallationContracts\SofrwareInstallationContracts.csproj", "{58522156-D91F-4693-8EFC-7D47464FC4CE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbstractSoftwareInstallationBusinessLogic", "AbstractSoftwareInstallationBusinessLogic\AbstractSoftwareInstallationBusinessLogic.csproj", "{B159A640-39C5-4778-81B9-E6956009E8E0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SoftwareInstallationBusinessLogic", "AbstractSoftwareInstallationBusinessLogic\SoftwareInstallationBusinessLogic.csproj", "{B159A640-39C5-4778-81B9-E6956009E8E0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbstractSoftwareInstallationListImplement", "AbstractSoftwareInstallationListImplement\AbstractSoftwareInstallationListImplement.csproj", "{135DD9F6-73CE-4419-BA17-FE9E3262E0AE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SoftwareInstallationListImplement", "AbstractSoftwareInstallationListImplement\SoftwareInstallationListImplement.csproj", "{135DD9F6-73CE-4419-BA17-FE9E3262E0AE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/SoftwareInstallation/SoftwareInstallation/Form1.Designer.cs b/SoftwareInstallation/SoftwareInstallation/Form1.Designer.cs deleted file mode 100644 index 662fcdd..0000000 --- a/SoftwareInstallation/SoftwareInstallation/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace SoftwareInstallation -{ - partial class Form1 - { - /// - /// 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() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "Form1"; - } - - #endregion - } -} \ No newline at end of file diff --git a/SoftwareInstallation/SoftwareInstallation/Form1.cs b/SoftwareInstallation/SoftwareInstallation/Form1.cs deleted file mode 100644 index b325dd6..0000000 --- a/SoftwareInstallation/SoftwareInstallation/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace SoftwareInstallation -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/SoftwareInstallation/SoftwareInstallation/Form1.resx b/SoftwareInstallation/SoftwareInstallation/Form1.resx deleted file mode 100644 index 1af7de1..0000000 --- a/SoftwareInstallation/SoftwareInstallation/Form1.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/SoftwareInstallation/SoftwareInstallation/FormComponent.Designer.cs b/SoftwareInstallation/SoftwareInstallation/FormComponent.Designer.cs new file mode 100644 index 0000000..6380186 --- /dev/null +++ b/SoftwareInstallation/SoftwareInstallation/FormComponent.Designer.cs @@ -0,0 +1,118 @@ +namespace SoftwareInstallationView +{ + partial class FormComponent + { + /// + /// 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() + { + this.ComponentNameLabel = new System.Windows.Forms.Label(); + this.ComponentNameTextBox = new System.Windows.Forms.TextBox(); + this.CostLabel = new System.Windows.Forms.Label(); + this.CostTextBox = new System.Windows.Forms.TextBox(); + this.SaveButton = new System.Windows.Forms.Button(); + this.CancelButton = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // ComponentNameLabel + // + this.ComponentNameLabel.AutoSize = true; + this.ComponentNameLabel.Location = new System.Drawing.Point(19, 15); + this.ComponentNameLabel.Name = "ComponentNameLabel"; + this.ComponentNameLabel.Size = new System.Drawing.Size(65, 15); + this.ComponentNameLabel.TabIndex = 0; + this.ComponentNameLabel.Text = "Название: "; + // + // ComponentNameTextBox + // + this.ComponentNameTextBox.Location = new System.Drawing.Point(90, 12); + this.ComponentNameTextBox.Name = "ComponentNameTextBox"; + this.ComponentNameTextBox.Size = new System.Drawing.Size(209, 23); + this.ComponentNameTextBox.TabIndex = 2; + // + // CostLabel + // + this.CostLabel.AutoSize = true; + this.CostLabel.Location = new System.Drawing.Point(40, 54); + this.CostLabel.Name = "CostLabel"; + this.CostLabel.Size = new System.Drawing.Size(44, 15); + this.CostLabel.TabIndex = 3; + this.CostLabel.Text = "Цена: "; + // + // CostTextBox + // + this.CostTextBox.Location = new System.Drawing.Point(90, 51); + this.CostTextBox.Name = "CostTextBox"; + this.CostTextBox.Size = new System.Drawing.Size(209, 23); + this.CostTextBox.TabIndex = 4; + // + // SaveButton + // + this.SaveButton.Location = new System.Drawing.Point(143, 90); + this.SaveButton.Name = "SaveButton"; + this.SaveButton.Size = new System.Drawing.Size(75, 23); + this.SaveButton.TabIndex = 5; + this.SaveButton.Text = "Сохранить"; + this.SaveButton.UseVisualStyleBackColor = true; + this.SaveButton.Click += new System.EventHandler(this.SaveButton_Click); + // + // CancelButton + // + this.CancelButton.Location = new System.Drawing.Point(224, 90); + this.CancelButton.Name = "CancelButton"; + this.CancelButton.Size = new System.Drawing.Size(75, 23); + this.CancelButton.TabIndex = 6; + this.CancelButton.Text = "Отмена"; + this.CancelButton.UseVisualStyleBackColor = true; + this.CancelButton.Click += new System.EventHandler(this.CancelButton_Click); + // + // FormComponent + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(328, 125); + this.Controls.Add(this.CancelButton); + this.Controls.Add(this.SaveButton); + this.Controls.Add(this.CostTextBox); + this.Controls.Add(this.CostLabel); + this.Controls.Add(this.ComponentNameTextBox); + this.Controls.Add(this.ComponentNameLabel); + this.Name = "FormComponent"; + this.Text = "Компонент"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private Label ComponentNameLabel; + private TextBox ComponentNameTextBox; + private Label CostLabel; + private TextBox CostTextBox; + private Button SaveButton; + private Button CancelButton; + } +} \ No newline at end of file diff --git a/SoftwareInstallation/SoftwareInstallation/FormComponent.cs b/SoftwareInstallation/SoftwareInstallation/FormComponent.cs new file mode 100644 index 0000000..891bd87 --- /dev/null +++ b/SoftwareInstallation/SoftwareInstallation/FormComponent.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using SofrwareInstallationContracts.BindingModels; +using SofrwareInstallationContracts.BusinessLogicsContracts; +using SofrwareInstallationContracts.SearchModels; +using Microsoft.Extensions.Logging; + +namespace SoftwareInstallationView +{ + public partial class FormComponent : Form + { + private readonly ILogger _logger; + private readonly IComponentLogic _logic; + private int? _id; + public int Id { set { _id = value; } } + + public FormComponent(ILogger logger, IComponentLogic logic) + { + InitializeComponent(); + _logger = logger; + _logic = logic; + } + + private void FormComponent_Load(object sender,EventArgs e) + { + if (_id.HasValue) + { + try + { + _logger.LogInformation("Получение компонента"); + + var view = _logic.ReadElement(new ComponentSearchModel + { + Id = _id.Value + }); + + if (view != null) + { + ComponentNameTextBox.Text = view.ComponentName; + CostTextBox.Text = view.Cost.ToString(); + } + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка получения компонента"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, + MessageBoxIcon.Error); + } + } + } + + private void SaveButton_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(ComponentNameTextBox.Text)) + { + MessageBox.Show("Заполните название", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + + _logger.LogInformation("Сохранение компонента"); + + try + { + var model = new ComponentBindingModel + { + Id = _id ?? 0, + ComponentName = ComponentNameTextBox.Text, + Cost = Convert.ToDouble(CostTextBox.Text) + }; + + var operationResult = _id.HasValue ? _logic.Update(model) : _logic.Create(model); + + if (!operationResult) + { + throw new Exception("Ошибка при сохранении. Дополнительная информация в логах."); + } + + MessageBox.Show("Сохранение прошло успешно", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information); + DialogResult = DialogResult.OK; + Close(); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка сохранения компонента"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void CancelButton_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + Close(); + } + } +} diff --git a/SoftwareInstallation/SoftwareInstallation/FormComponent.resx b/SoftwareInstallation/SoftwareInstallation/FormComponent.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/SoftwareInstallation/SoftwareInstallation/FormComponent.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/SoftwareInstallation/SoftwareInstallation/FormComponents.Designer.cs b/SoftwareInstallation/SoftwareInstallation/FormComponents.Designer.cs new file mode 100644 index 0000000..637687b --- /dev/null +++ b/SoftwareInstallation/SoftwareInstallation/FormComponents.Designer.cs @@ -0,0 +1,61 @@ +namespace SoftwareInstallationView +{ + partial class FormComponents + { + /// + /// 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() + { + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView1 + // + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Location = new System.Drawing.Point(2, 0); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.RowTemplate.Height = 25; + this.dataGridView1.Size = new System.Drawing.Size(551, 551); + this.dataGridView1.TabIndex = 0; + // + // FormComponents + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(725, 552); + this.Controls.Add(this.dataGridView1); + this.Name = "FormComponents"; + this.Text = "Компоненты"; + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DataGridView dataGridView1; + } +} \ No newline at end of file diff --git a/SoftwareInstallation/SoftwareInstallation/FormComponents.cs b/SoftwareInstallation/SoftwareInstallation/FormComponents.cs new file mode 100644 index 0000000..cfb1026 --- /dev/null +++ b/SoftwareInstallation/SoftwareInstallation/FormComponents.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace SoftwareInstallationView +{ + public partial class FormComponents : Form + { + public FormComponents() + { + InitializeComponent(); + } + } +} diff --git a/SoftwareInstallation/SoftwareInstallation/FormComponents.resx b/SoftwareInstallation/SoftwareInstallation/FormComponents.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/SoftwareInstallation/SoftwareInstallation/FormComponents.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/SoftwareInstallation/SoftwareInstallation/Program.cs b/SoftwareInstallation/SoftwareInstallation/Program.cs index 4eda83e..df13930 100644 --- a/SoftwareInstallation/SoftwareInstallation/Program.cs +++ b/SoftwareInstallation/SoftwareInstallation/Program.cs @@ -1,3 +1,5 @@ +using SoftwareInstallationView; + namespace SoftwareInstallation { internal static class Program @@ -11,7 +13,7 @@ namespace SoftwareInstallation // To customize application configuration such as set high DPI settings or default font, // see https://aka.ms/applicationconfiguration. ApplicationConfiguration.Initialize(); - Application.Run(new Form1()); + Application.Run(new FormComponents()); } } } \ No newline at end of file diff --git a/SoftwareInstallation/SoftwareInstallation/Properties/launchSettings.json b/SoftwareInstallation/SoftwareInstallation/Properties/launchSettings.json new file mode 100644 index 0000000..8a978ef --- /dev/null +++ b/SoftwareInstallation/SoftwareInstallation/Properties/launchSettings.json @@ -0,0 +1,7 @@ +{ + "profiles": { + "SoftwareInstallationView": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/SoftwareInstallation/SoftwareInstallation/SoftwareInstallation.csproj b/SoftwareInstallation/SoftwareInstallation/SoftwareInstallationView.csproj similarity index 93% rename from SoftwareInstallation/SoftwareInstallation/SoftwareInstallation.csproj rename to SoftwareInstallation/SoftwareInstallation/SoftwareInstallationView.csproj index 5b1179d..ec277cf 100644 --- a/SoftwareInstallation/SoftwareInstallation/SoftwareInstallation.csproj +++ b/SoftwareInstallation/SoftwareInstallation/SoftwareInstallationView.csproj @@ -33,4 +33,8 @@ + + + + \ No newline at end of file