Третий этап Lab8
This commit is contained in:
parent
dcb622b7d5
commit
3b2f788d4f
@ -13,10 +13,6 @@ namespace Sailboat.Entities
|
||||
public Color BodyColor { get; private set; }
|
||||
public void setBodyColor(Color color) { BodyColor = color; }
|
||||
public double Step => (double)Speed * 100 / Weight;
|
||||
public void ChangeColor(Color color)
|
||||
{
|
||||
BodyColor = color;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор с параметрами
|
||||
|
@ -12,10 +12,6 @@ namespace Sailboat.Entities
|
||||
public void setAdditionalColor(Color color) { AdditionalColor = color; }
|
||||
public bool Hull { get; private set; }
|
||||
public bool Sail { get; private set; }
|
||||
public void ChangeAddColor(Color color)
|
||||
{
|
||||
AdditionalColor = color;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Инициализация полей объекта-класса парусной лодки
|
||||
|
32
Sailboat/Sailboat/FormBoatCollection.Designer.cs
generated
32
Sailboat/Sailboat/FormBoatCollection.Designer.cs
generated
@ -183,7 +183,6 @@ namespace Sailboat
|
||||
menuStrip.Padding = new Padding(5, 2, 0, 2);
|
||||
menuStrip.Size = new Size(183, 24);
|
||||
menuStrip.TabIndex = 5;
|
||||
this.menuStrip.TabIndex = 5;
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
@ -196,8 +195,7 @@ namespace Sailboat
|
||||
ToolStripMenuItem.Name = "ToolStripMenuItem";
|
||||
ToolStripMenuItem.Size = new Size(48, 20);
|
||||
ToolStripMenuItem.Text = "Файл";
|
||||
this.ToolStripMenuItem.Size = new System.Drawing.Size(59, 24);
|
||||
this.ToolStripMenuItem.Text = "Файл";
|
||||
ToolStripMenuItem.Size = new System.Drawing.Size(59, 24);
|
||||
//
|
||||
// SaveToolStripMenuItem
|
||||
//
|
||||
@ -224,23 +222,23 @@ namespace Sailboat
|
||||
//
|
||||
// buttonSortByType
|
||||
//
|
||||
this.buttonSortByType.Location = new System.Drawing.Point(20, 448);
|
||||
this.buttonSortByType.Name = "buttonSortByType";
|
||||
this.buttonSortByType.Size = new System.Drawing.Size(180, 34);
|
||||
this.buttonSortByType.TabIndex = 6;
|
||||
this.buttonSortByType.Text = "Сортировать по типу";
|
||||
this.buttonSortByType.UseVisualStyleBackColor = true;
|
||||
this.buttonSortByType.Click += new System.EventHandler(this.buttonSortByType_Click);
|
||||
buttonSortByType.Location = new System.Drawing.Point(20, 348);
|
||||
buttonSortByType.Name = "buttonSortByType";
|
||||
buttonSortByType.Size = new System.Drawing.Size(180, 34);
|
||||
buttonSortByType.TabIndex = 6;
|
||||
buttonSortByType.Text = "Сортировать по типу";
|
||||
buttonSortByType.UseVisualStyleBackColor = true;
|
||||
buttonSortByType.Click += new System.EventHandler(this.buttonSortByType_Click);
|
||||
//
|
||||
// buttonSortByColor
|
||||
//
|
||||
this.buttonSortByColor.Location = new System.Drawing.Point(20, 488);
|
||||
this.buttonSortByColor.Name = "buttonSortByColor";
|
||||
this.buttonSortByColor.Size = new System.Drawing.Size(180, 34);
|
||||
this.buttonSortByColor.TabIndex = 7;
|
||||
this.buttonSortByColor.Text = "Сортировать по цвету";
|
||||
this.buttonSortByColor.UseVisualStyleBackColor = true;
|
||||
this.buttonSortByColor.Click += new System.EventHandler(this.buttonSortByColor_Click);
|
||||
buttonSortByColor.Location = new System.Drawing.Point(20, 488);
|
||||
buttonSortByColor.Name = "buttonSortByColor";
|
||||
buttonSortByColor.Size = new System.Drawing.Size(180, 34);
|
||||
buttonSortByColor.TabIndex = 7;
|
||||
buttonSortByColor.Text = "Сортировать по цвету";
|
||||
buttonSortByColor.UseVisualStyleBackColor = true;
|
||||
buttonSortByColor.Click += new System.EventHandler(this.buttonSortByColor_Click);
|
||||
//
|
||||
// FormBoatCollection
|
||||
//
|
||||
|
@ -1,64 +1,4 @@
|
||||
<?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.
|
||||
-->
|
||||
<root>
|
||||
<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">
|
||||
@ -117,4 +57,16 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>144, 0</value>
|
||||
</metadata>
|
||||
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>144, 0</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>25</value>
|
||||
</metadata>
|
||||
</root>
|
68
Sailboat/Sailboat/FormSailboat.Designer.cs
generated
68
Sailboat/Sailboat/FormSailboat.Designer.cs
generated
@ -29,28 +29,17 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormSailboat));
|
||||
this.pictureBoxSailboat = new System.Windows.Forms.PictureBox();
|
||||
this.buttonCreateBoat = new System.Windows.Forms.Button();
|
||||
this.buttonLeft = new System.Windows.Forms.Button();
|
||||
this.buttonUp = new System.Windows.Forms.Button();
|
||||
this.buttonRight = new System.Windows.Forms.Button();
|
||||
this.buttonDown = new System.Windows.Forms.Button();
|
||||
this.buttonCreateSailboat = new System.Windows.Forms.Button();
|
||||
this.comboBoxStrategy = new System.Windows.Forms.ComboBox();
|
||||
this.buttonStep = new System.Windows.Forms.Button();
|
||||
this.buttonSelectBoat = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxSailboat)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
pictureBoxSailboat = new PictureBox();
|
||||
buttonCreateBoat = new Button();
|
||||
buttonLeft = new Button();
|
||||
buttonUp = new Button();
|
||||
buttonRight = new Button();
|
||||
buttonDown = new Button();
|
||||
buttonCreateSailboat = new Button();
|
||||
comboBoxStrategy = new ComboBox();
|
||||
buttonStep = new Button();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBoxSailboat).BeginInit();
|
||||
pictureBoxSailboat = new System.Windows.Forms.PictureBox();
|
||||
buttonCreateBoat = new System.Windows.Forms.Button();
|
||||
buttonLeft = new System.Windows.Forms.Button();
|
||||
buttonUp = new System.Windows.Forms.Button();
|
||||
buttonRight = new System.Windows.Forms.Button();
|
||||
buttonDown = new System.Windows.Forms.Button();
|
||||
buttonCreateSailboat = new System.Windows.Forms.Button();
|
||||
comboBoxStrategy = new System.Windows.Forms.ComboBox();
|
||||
buttonStep = new System.Windows.Forms.Button();
|
||||
buttonSelectBoat = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(pictureBoxSailboat)).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// pictureBoxSailboat
|
||||
@ -166,37 +155,16 @@
|
||||
//
|
||||
// buttonSelectBoat
|
||||
//
|
||||
this.buttonSelectBoat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.buttonSelectBoat.Location = new System.Drawing.Point(688, 97);
|
||||
this.buttonSelectBoat.Name = "buttonSelectBoat";
|
||||
this.buttonSelectBoat.Size = new System.Drawing.Size(149, 33);
|
||||
this.buttonSelectBoat.TabIndex = 9;
|
||||
this.buttonSelectBoat.Text = "Выбрать лодку";
|
||||
this.buttonSelectBoat.UseVisualStyleBackColor = true;
|
||||
this.buttonSelectBoat.Click += new System.EventHandler(this.buttonSelectBoat_Click);
|
||||
buttonSelectBoat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
buttonSelectBoat.Location = new System.Drawing.Point(688, 97);
|
||||
buttonSelectBoat.Name = "buttonSelectBoat";
|
||||
buttonSelectBoat.Size = new System.Drawing.Size(149, 33);
|
||||
buttonSelectBoat.TabIndex = 9;
|
||||
buttonSelectBoat.Text = "Выбрать лодку";
|
||||
buttonSelectBoat.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// FormSailboat
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(882, 453);
|
||||
this.Controls.Add(this.buttonSelectBoat);
|
||||
this.Controls.Add(this.buttonStep);
|
||||
this.Controls.Add(this.comboBoxStrategy);
|
||||
this.Controls.Add(this.buttonCreateSailboat);
|
||||
this.Controls.Add(this.buttonDown);
|
||||
this.Controls.Add(this.buttonRight);
|
||||
this.Controls.Add(this.buttonUp);
|
||||
this.Controls.Add(this.buttonLeft);
|
||||
this.Controls.Add(this.buttonCreateBoat);
|
||||
this.Controls.Add(this.pictureBoxSailboat);
|
||||
this.Name = "FormSailboat";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Парусник";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxSailboat)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(834, 461);
|
||||
|
Loading…
x
Reference in New Issue
Block a user