From 8d7daecf60b02861afc8f68c1aaddc08f4b5df25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B0=D0=BB=D0=B5=D1=80=D0=B8=D1=8F=20=D0=9D=D0=B8?= =?UTF-8?q?=D0=BA=D0=B8=D1=84=D0=BE=D1=80=D0=BE=D0=B2=D0=B0?= Date: Sun, 19 Feb 2023 22:43:34 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D1=8B=20?= =?UTF-8?q?=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8=20=D0=B8=20=D1=81=D0=B8?= =?UTF-8?q?=D0=BD=D0=B3=D0=BB=D1=82=D0=BE=D0=BD=20=D0=BA=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AircraftPlant/AircraftPlant.sln | 14 +++++--- .../AircraftPlantFileImplement.csproj | 9 +++++ .../DataFileSingleton.cs | 12 +++++++ .../Models/Component.cs | 33 +++++++++++++++++++ .../Models/Order.cs | 12 +++++++ .../Models/Plane.cs | 12 +++++++ 6 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 AircraftPlant/AircraftPlantFileImplement/AircraftPlantFileImplement.csproj create mode 100644 AircraftPlant/AircraftPlantFileImplement/DataFileSingleton.cs create mode 100644 AircraftPlant/AircraftPlantFileImplement/Models/Component.cs create mode 100644 AircraftPlant/AircraftPlantFileImplement/Models/Order.cs create mode 100644 AircraftPlant/AircraftPlantFileImplement/Models/Plane.cs diff --git a/AircraftPlant/AircraftPlant.sln b/AircraftPlant/AircraftPlant.sln index 94496dd..51bdeb6 100644 --- a/AircraftPlant/AircraftPlant.sln +++ b/AircraftPlant/AircraftPlant.sln @@ -5,13 +5,15 @@ VisualStudioVersion = 17.4.33213.308 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AircraftPlantView", "AircraftPlant\AircraftPlantView.csproj", "{E434A570-19A4-486C-AD38-3E2C07E6DB01}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AircraftPlantDataModels", "AircraftPlantDataModels\AircraftPlantDataModels.csproj", "{F35C01BC-BCB8-4870-8143-529291F7AD5D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AircraftPlantDataModels", "AircraftPlantDataModels\AircraftPlantDataModels.csproj", "{F35C01BC-BCB8-4870-8143-529291F7AD5D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AircraftPlantContracts", "AircraftPlantContracts\AircraftPlantContracts.csproj", "{ECC2CC21-2172-4E1A-8806-CD3EFDC33F12}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AircraftPlantContracts", "AircraftPlantContracts\AircraftPlantContracts.csproj", "{ECC2CC21-2172-4E1A-8806-CD3EFDC33F12}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AircraftPlantBusinessLogic", "AircraftPlantBusinessLogic\AircraftPlantBusinessLogic.csproj", "{65E42A4B-83FC-4029-B478-CE0E60A69F6B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AircraftPlantBusinessLogic", "AircraftPlantBusinessLogic\AircraftPlantBusinessLogic.csproj", "{65E42A4B-83FC-4029-B478-CE0E60A69F6B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AircraftPlantListImplement", "AircraftPlantListImplement\AircraftPlantListImplement.csproj", "{F25060DB-386E-4D7D-93BE-DA2873E7D074}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AircraftPlantListImplement", "AircraftPlantListImplement\AircraftPlantListImplement.csproj", "{F25060DB-386E-4D7D-93BE-DA2873E7D074}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AircraftPlantFileImplement", "AircraftPlantFileImplement\AircraftPlantFileImplement.csproj", "{26E801C2-11F3-499E-89A0-712C12318120}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -39,6 +41,10 @@ Global {F25060DB-386E-4D7D-93BE-DA2873E7D074}.Debug|Any CPU.Build.0 = Debug|Any CPU {F25060DB-386E-4D7D-93BE-DA2873E7D074}.Release|Any CPU.ActiveCfg = Release|Any CPU {F25060DB-386E-4D7D-93BE-DA2873E7D074}.Release|Any CPU.Build.0 = Release|Any CPU + {26E801C2-11F3-499E-89A0-712C12318120}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {26E801C2-11F3-499E-89A0-712C12318120}.Debug|Any CPU.Build.0 = Debug|Any CPU + {26E801C2-11F3-499E-89A0-712C12318120}.Release|Any CPU.ActiveCfg = Release|Any CPU + {26E801C2-11F3-499E-89A0-712C12318120}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/AircraftPlant/AircraftPlantFileImplement/AircraftPlantFileImplement.csproj b/AircraftPlant/AircraftPlantFileImplement/AircraftPlantFileImplement.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/AircraftPlant/AircraftPlantFileImplement/AircraftPlantFileImplement.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + diff --git a/AircraftPlant/AircraftPlantFileImplement/DataFileSingleton.cs b/AircraftPlant/AircraftPlantFileImplement/DataFileSingleton.cs new file mode 100644 index 0000000..78f4ebc --- /dev/null +++ b/AircraftPlant/AircraftPlantFileImplement/DataFileSingleton.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AircraftPlantFileImplement +{ + internal class DataFileSingleton + { + } +} diff --git a/AircraftPlant/AircraftPlantFileImplement/Models/Component.cs b/AircraftPlant/AircraftPlantFileImplement/Models/Component.cs new file mode 100644 index 0000000..9a23edf --- /dev/null +++ b/AircraftPlant/AircraftPlantFileImplement/Models/Component.cs @@ -0,0 +1,33 @@ +using AircraftPlantContracts.BindingModels; +using AircraftPlantDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AircraftPlantFileImplement.Models +{ + public class Component : IComponentModel + { + public string ComponentName { get; private set; } = string.Empty; + + public double Cost { get; set; } + + public int Id { get; private set; } + + public static Component? Create(ComponentBindingModel model) + { + if (model == null) + { + return null; + } + return new Component() + { + Id = model.Id, + ComponentName = model.ComponentName, + Cost = model.Cost + }; + } + } +} diff --git a/AircraftPlant/AircraftPlantFileImplement/Models/Order.cs b/AircraftPlant/AircraftPlantFileImplement/Models/Order.cs new file mode 100644 index 0000000..9617757 --- /dev/null +++ b/AircraftPlant/AircraftPlantFileImplement/Models/Order.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AircraftPlantFileImplement.Models +{ + internal class Order + { + } +} diff --git a/AircraftPlant/AircraftPlantFileImplement/Models/Plane.cs b/AircraftPlant/AircraftPlantFileImplement/Models/Plane.cs new file mode 100644 index 0000000..184f468 --- /dev/null +++ b/AircraftPlant/AircraftPlantFileImplement/Models/Plane.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AircraftPlantFileImplement.Models +{ + internal class Plane + { + } +}