Готовая Lab_8

This commit is contained in:
Максим Егоров 2024-10-06 23:38:02 +04:00
parent b3513987ac
commit b3fd431a14
2 changed files with 100 additions and 37 deletions

View File

@ -29,31 +29,31 @@ namespace Sailboat
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.pictureBoxCollection = new System.Windows.Forms.PictureBox(); pictureBoxCollection = new PictureBox();
this.panelTools = new System.Windows.Forms.Panel(); panelTools = new Panel();
this.buttonSortByColor = new System.Windows.Forms.Button(); buttonSortByColor = new Button();
this.buttonSortByType = new System.Windows.Forms.Button(); buttonSortByType = new Button();
this.panelCollection = new System.Windows.Forms.Panel(); panelCollection = new Panel();
this.buttonDelObject = new System.Windows.Forms.Button(); buttonDelObject = new Button();
this.listBoxStorages = new System.Windows.Forms.ListBox(); listBoxStorages = new ListBox();
this.buttonAddObject = new System.Windows.Forms.Button(); buttonAddObject = new Button();
this.textBoxStorageName = new System.Windows.Forms.TextBox(); textBoxStorageName = new TextBox();
this.maskedTextBoxNumber = new System.Windows.Forms.MaskedTextBox(); maskedTextBoxNumber = new MaskedTextBox();
this.buttonRefreshCollection = new System.Windows.Forms.Button(); buttonRefreshCollection = new Button();
this.buttonRemoveBoat = new System.Windows.Forms.Button(); buttonRemoveBoat = new Button();
this.buttonAddBoat = new System.Windows.Forms.Button(); buttonAddBoat = new Button();
this.menuStrip = new System.Windows.Forms.MenuStrip(); menuStrip = new MenuStrip();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); toolStripMenuItem1 = new ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ToolStripMenuItem = new ToolStripMenuItem();
this.SaveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); SaveToolStripMenuItem = new ToolStripMenuItem();
this.LoadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); LoadToolStripMenuItem = new ToolStripMenuItem();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); openFileDialog = new OpenFileDialog();
this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); saveFileDialog = new SaveFileDialog();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCollection)).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureBoxCollection).BeginInit();
this.panelTools.SuspendLayout(); panelTools.SuspendLayout();
this.panelCollection.SuspendLayout(); panelCollection.SuspendLayout();
this.menuStrip.SuspendLayout(); menuStrip.SuspendLayout();
this.SuspendLayout(); SuspendLayout();
// //
// pictureBoxCollection // pictureBoxCollection
// //
@ -68,13 +68,15 @@ namespace Sailboat
// panelTools // panelTools
// //
panelTools.BackColor = SystemColors.ScrollBar; panelTools.BackColor = SystemColors.ScrollBar;
panelTools.Controls.Add(buttonSortByColor);
panelTools.Controls.Add(buttonSortByType);
panelTools.Controls.Add(panelCollection); panelTools.Controls.Add(panelCollection);
panelTools.Controls.Add(maskedTextBoxNumber); panelTools.Controls.Add(maskedTextBoxNumber);
panelTools.Controls.Add(buttonRefreshCollection); panelTools.Controls.Add(buttonRefreshCollection);
panelTools.Controls.Add(buttonRemoveBoat); panelTools.Controls.Add(buttonRemoveBoat);
panelTools.Controls.Add(buttonAddBoat); panelTools.Controls.Add(buttonAddBoat);
panelTools.Controls.Add(menuStrip); panelTools.Controls.Add(menuStrip);
panelTools.Location = new Point(689, 0); panelTools.Location = new Point(681, 0);
panelTools.Margin = new Padding(3, 2, 3, 2); panelTools.Margin = new Padding(3, 2, 3, 2);
panelTools.Name = "panelTools"; panelTools.Name = "panelTools";
panelTools.Size = new Size(183, 542); panelTools.Size = new Size(183, 542);
@ -82,9 +84,10 @@ namespace Sailboat
// //
// buttonSortByColor // buttonSortByColor
// //
buttonSortByColor.Location = new System.Drawing.Point(20, 479); buttonSortByColor.Location = new Point(18, 366);
buttonSortByColor.Margin = new Padding(3, 2, 3, 2);
buttonSortByColor.Name = "buttonSortByColor"; buttonSortByColor.Name = "buttonSortByColor";
buttonSortByColor.Size = new System.Drawing.Size(180, 34); buttonSortByColor.Size = new Size(158, 26);
buttonSortByColor.TabIndex = 7; buttonSortByColor.TabIndex = 7;
buttonSortByColor.Text = "Сортировать по цвету"; buttonSortByColor.Text = "Сортировать по цвету";
buttonSortByColor.UseVisualStyleBackColor = true; buttonSortByColor.UseVisualStyleBackColor = true;
@ -92,9 +95,10 @@ namespace Sailboat
// //
// buttonSortByType // buttonSortByType
// //
buttonSortByType.Location = new System.Drawing.Point(20, 439); buttonSortByType.Location = new Point(18, 336);
buttonSortByType.Margin = new Padding(3, 2, 3, 2);
buttonSortByType.Name = "buttonSortByType"; buttonSortByType.Name = "buttonSortByType";
buttonSortByType.Size = new System.Drawing.Size(180, 34); buttonSortByType.Size = new Size(158, 26);
buttonSortByType.TabIndex = 6; buttonSortByType.TabIndex = 6;
buttonSortByType.Text = "Сортировать по типу"; buttonSortByType.Text = "Сортировать по типу";
buttonSortByType.UseVisualStyleBackColor = true; buttonSortByType.UseVisualStyleBackColor = true;
@ -107,7 +111,7 @@ namespace Sailboat
panelCollection.Controls.Add(listBoxStorages); panelCollection.Controls.Add(listBoxStorages);
panelCollection.Controls.Add(buttonAddObject); panelCollection.Controls.Add(buttonAddObject);
panelCollection.Controls.Add(textBoxStorageName); panelCollection.Controls.Add(textBoxStorageName);
panelCollection.Location = new Point(18, 124); panelCollection.Location = new Point(18, 96);
panelCollection.Margin = new Padding(3, 2, 3, 2); panelCollection.Margin = new Padding(3, 2, 3, 2);
panelCollection.Name = "panelCollection"; panelCollection.Name = "panelCollection";
panelCollection.Size = new Size(158, 215); panelCollection.Size = new Size(158, 215);
@ -156,7 +160,7 @@ namespace Sailboat
// //
// maskedTextBoxNumber // maskedTextBoxNumber
// //
maskedTextBoxNumber.Location = new Point(43, 425); maskedTextBoxNumber.Location = new Point(44, 446);
maskedTextBoxNumber.Margin = new Padding(3, 2, 3, 2); maskedTextBoxNumber.Margin = new Padding(3, 2, 3, 2);
maskedTextBoxNumber.Name = "maskedTextBoxNumber"; maskedTextBoxNumber.Name = "maskedTextBoxNumber";
maskedTextBoxNumber.Size = new Size(110, 23); maskedTextBoxNumber.Size = new Size(110, 23);
@ -175,7 +179,7 @@ namespace Sailboat
// //
// buttonRemoveBoat // buttonRemoveBoat
// //
buttonRemoveBoat.Location = new Point(18, 465); buttonRemoveBoat.Location = new Point(18, 482);
buttonRemoveBoat.Margin = new Padding(3, 2, 3, 2); buttonRemoveBoat.Margin = new Padding(3, 2, 3, 2);
buttonRemoveBoat.Name = "buttonRemoveBoat"; buttonRemoveBoat.Name = "buttonRemoveBoat";
buttonRemoveBoat.Size = new Size(158, 26); buttonRemoveBoat.Size = new Size(158, 26);
@ -186,7 +190,7 @@ namespace Sailboat
// //
// buttonAddBoat // buttonAddBoat
// //
buttonAddBoat.Location = new Point(18, 368); buttonAddBoat.Location = new Point(18, 408);
buttonAddBoat.Margin = new Padding(3, 2, 3, 2); buttonAddBoat.Margin = new Padding(3, 2, 3, 2);
buttonAddBoat.Name = "buttonAddBoat"; buttonAddBoat.Name = "buttonAddBoat";
buttonAddBoat.Size = new Size(158, 26); buttonAddBoat.Size = new Size(158, 26);
@ -216,7 +220,6 @@ namespace Sailboat
ToolStripMenuItem.Name = "ToolStripMenuItem"; ToolStripMenuItem.Name = "ToolStripMenuItem";
ToolStripMenuItem.Size = new Size(48, 20); ToolStripMenuItem.Size = new Size(48, 20);
ToolStripMenuItem.Text = "Файл"; ToolStripMenuItem.Text = "Файл";
ToolStripMenuItem.Size = new System.Drawing.Size(59, 24);
// //
// SaveToolStripMenuItem // SaveToolStripMenuItem
// //
@ -245,7 +248,7 @@ namespace Sailboat
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(884, 546); ClientSize = new Size(865, 546);
Controls.Add(panelTools); Controls.Add(panelTools);
Controls.Add(pictureBoxCollection); Controls.Add(pictureBoxCollection);
MainMenuStrip = menuStrip; MainMenuStrip = menuStrip;

View File

@ -1,4 +1,64 @@
<root> <?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: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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">