start View project

This commit is contained in:
ShabOl 2024-02-20 23:51:24 +04:00
parent 6eea8a37f5
commit 4cb2a32dae
8 changed files with 269 additions and 10 deletions

View File

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34511.84
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoWorkshop", "AutoWorkshop\AutoWorkshop.csproj", "{54087BAE-4821-4266-9968-190F9F4355C8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoWorkshopView", "AutoWorkshop\AutoWorkshopView.csproj", "{54087BAE-4821-4266-9968-190F9F4355C8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoWorkshopDataModels", "AutoWorkshopDataModels\AutoWorkshopDataModels.csproj", "{D52094D2-A57E-4BAD-B049-3B64065463DA}"
EndProject

View File

@ -8,4 +8,9 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\AutoWorkshopContracts\AutoWorkshopContracts.csproj" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
namespace AutoWorkshop
namespace AutoWorkshopView
{
partial class Form1
{

View File

@ -1,4 +1,4 @@
namespace AutoWorkshop
namespace AutoWorkshopView
{
public partial class Form1 : Form
{

View File

@ -0,0 +1,115 @@
namespace AutoWorkshopView.Forms
{
partial class FormComponent
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
ComponentNameLabel = new Label();
ComponentPriceLabel = new Label();
ComponentNameTextBox = new TextBox();
ComponentPriceTextBox = new TextBox();
CancelButton = new Button();
SaveButton = new Button();
SuspendLayout();
//
// ComponentNameLabel
//
ComponentNameLabel.AutoSize = true;
ComponentNameLabel.Location = new Point(12, 15);
ComponentNameLabel.Name = "ComponentNameLabel";
ComponentNameLabel.Size = new Size(62, 15);
ComponentNameLabel.TabIndex = 0;
ComponentNameLabel.Text = "Название:";
//
// ComponentPriceLabel
//
ComponentPriceLabel.AutoSize = true;
ComponentPriceLabel.Location = new Point(12, 44);
ComponentPriceLabel.Name = "ComponentPriceLabel";
ComponentPriceLabel.Size = new Size(38, 15);
ComponentPriceLabel.TabIndex = 1;
ComponentPriceLabel.Text = "Цена:";
//
// ComponentNameTextBox
//
ComponentNameTextBox.Location = new Point(80, 12);
ComponentNameTextBox.Name = "ComponentNameTextBox";
ComponentNameTextBox.Size = new Size(221, 23);
ComponentNameTextBox.TabIndex = 2;
//
// ComponentPriceTextBox
//
ComponentPriceTextBox.Location = new Point(80, 41);
ComponentPriceTextBox.Name = "ComponentPriceTextBox";
ComponentPriceTextBox.Size = new Size(140, 23);
ComponentPriceTextBox.TabIndex = 3;
//
// CancelButton
//
CancelButton.Location = new Point(226, 74);
CancelButton.Name = "CancelButton";
CancelButton.Size = new Size(75, 23);
CancelButton.TabIndex = 4;
CancelButton.Text = "Отмена";
CancelButton.UseVisualStyleBackColor = true;
//
// SaveButton
//
SaveButton.Location = new Point(145, 74);
SaveButton.Name = "SaveButton";
SaveButton.Size = new Size(75, 23);
SaveButton.TabIndex = 5;
SaveButton.Text = "Сохранить";
SaveButton.UseVisualStyleBackColor = true;
//
// FormComponent
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(324, 110);
Controls.Add(SaveButton);
Controls.Add(CancelButton);
Controls.Add(ComponentPriceTextBox);
Controls.Add(ComponentNameTextBox);
Controls.Add(ComponentPriceLabel);
Controls.Add(ComponentNameLabel);
Name = "FormComponent";
Text = "Компонент";
ResumeLayout(false);
PerformLayout();
}
#endregion
private Label ComponentNameLabel;
private Label ComponentPriceLabel;
private TextBox ComponentNameTextBox;
private TextBox ComponentPriceTextBox;
private Button CancelButton;
private Button SaveButton;
}
}

View File

@ -0,0 +1,24 @@
using AutoWorkshopContracts.BusinessLogicContracts;
using Microsoft.Extensions.Logging;
namespace AutoWorkshopView.Forms
{
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<FormComponent> Logger, IComponentLogic Logic)
{
InitializeComponent();
_logger = Logger;
_logic = Logic;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,17 +1,12 @@
namespace AutoWorkshop
namespace AutoWorkshopView
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[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 Form1());
}
}
}
}