6 лаба (вроде готова)
This commit is contained in:
parent
4f3c6390c4
commit
a1f41941b2
@ -26,7 +26,7 @@ namespace WarmlyShip.DrawingObjects
|
||||
return new DrawingWarmlyShip(Convert.ToInt32(strs[0]),
|
||||
Convert.ToInt32(strs[1]), Color.FromName(strs[2]), width, height);
|
||||
}
|
||||
if (strs.Length == 7)
|
||||
if (strs.Length == 6)
|
||||
{
|
||||
return new DrawingWarmlyShipWithPipes(Convert.ToInt32(strs[0]),
|
||||
Convert.ToInt32(strs[1]),
|
||||
|
31
WarmlyShip/WarmlyShip/FormShipCollection.Designer.cs
generated
31
WarmlyShip/WarmlyShip/FormShipCollection.Designer.cs
generated
@ -44,6 +44,8 @@
|
||||
this.файлToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.сохранениеToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.загрузкаToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
|
||||
this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCollection)).BeginInit();
|
||||
this.panelCollection.SuspendLayout();
|
||||
this.groupBoxSets.SuspendLayout();
|
||||
@ -78,7 +80,7 @@
|
||||
this.groupBoxSets.Controls.Add(this.buttonDelObject);
|
||||
this.groupBoxSets.Controls.Add(this.buttonnAddObject);
|
||||
this.groupBoxSets.Controls.Add(this.listBoxStorages);
|
||||
this.groupBoxSets.Location = new System.Drawing.Point(12, 131);
|
||||
this.groupBoxSets.Location = new System.Drawing.Point(12, 117);
|
||||
this.groupBoxSets.Name = "groupBoxSets";
|
||||
this.groupBoxSets.Size = new System.Drawing.Size(199, 242);
|
||||
this.groupBoxSets.TabIndex = 7;
|
||||
@ -124,7 +126,7 @@
|
||||
//
|
||||
// maskedTextBoxNumber
|
||||
//
|
||||
this.maskedTextBoxNumber.Location = new System.Drawing.Point(16, 455);
|
||||
this.maskedTextBoxNumber.Location = new System.Drawing.Point(16, 438);
|
||||
this.maskedTextBoxNumber.Name = "maskedTextBoxNumber";
|
||||
this.maskedTextBoxNumber.Size = new System.Drawing.Size(171, 27);
|
||||
this.maskedTextBoxNumber.TabIndex = 6;
|
||||
@ -132,7 +134,7 @@
|
||||
// labelCollection
|
||||
//
|
||||
this.labelCollection.AutoSize = true;
|
||||
this.labelCollection.Location = new System.Drawing.Point(3, 97);
|
||||
this.labelCollection.Location = new System.Drawing.Point(3, 82);
|
||||
this.labelCollection.Name = "labelCollection";
|
||||
this.labelCollection.Size = new System.Drawing.Size(103, 20);
|
||||
this.labelCollection.TabIndex = 2;
|
||||
@ -140,7 +142,7 @@
|
||||
//
|
||||
// buttonRefreshCollection
|
||||
//
|
||||
this.buttonRefreshCollection.Location = new System.Drawing.Point(16, 575);
|
||||
this.buttonRefreshCollection.Location = new System.Drawing.Point(18, 555);
|
||||
this.buttonRefreshCollection.Name = "buttonRefreshCollection";
|
||||
this.buttonRefreshCollection.Size = new System.Drawing.Size(171, 40);
|
||||
this.buttonRefreshCollection.TabIndex = 5;
|
||||
@ -150,7 +152,7 @@
|
||||
//
|
||||
// buttonRemoveShip
|
||||
//
|
||||
this.buttonRemoveShip.Location = new System.Drawing.Point(16, 515);
|
||||
this.buttonRemoveShip.Location = new System.Drawing.Point(16, 490);
|
||||
this.buttonRemoveShip.Name = "buttonRemoveShip";
|
||||
this.buttonRemoveShip.Size = new System.Drawing.Size(171, 40);
|
||||
this.buttonRemoveShip.TabIndex = 4;
|
||||
@ -160,7 +162,7 @@
|
||||
//
|
||||
// buttonAddShip
|
||||
//
|
||||
this.buttonAddShip.Location = new System.Drawing.Point(16, 388);
|
||||
this.buttonAddShip.Location = new System.Drawing.Point(16, 375);
|
||||
this.buttonAddShip.Name = "buttonAddShip";
|
||||
this.buttonAddShip.Size = new System.Drawing.Size(171, 40);
|
||||
this.buttonAddShip.TabIndex = 2;
|
||||
@ -191,14 +193,25 @@
|
||||
// сохранениеToolStripMenuItem
|
||||
//
|
||||
this.сохранениеToolStripMenuItem.Name = "сохранениеToolStripMenuItem";
|
||||
this.сохранениеToolStripMenuItem.Size = new System.Drawing.Size(224, 26);
|
||||
this.сохранениеToolStripMenuItem.Size = new System.Drawing.Size(177, 26);
|
||||
this.сохранениеToolStripMenuItem.Text = "Сохранение";
|
||||
this.сохранениеToolStripMenuItem.Click += new System.EventHandler(this.SaveToolStripMenuItem_Click);
|
||||
//
|
||||
// загрузкаToolStripMenuItem
|
||||
//
|
||||
this.загрузкаToolStripMenuItem.Name = "загрузкаToolStripMenuItem";
|
||||
this.загрузкаToolStripMenuItem.Size = new System.Drawing.Size(224, 26);
|
||||
this.загрузкаToolStripMenuItem.Size = new System.Drawing.Size(177, 26);
|
||||
this.загрузкаToolStripMenuItem.Text = "Загрузка";
|
||||
this.загрузкаToolStripMenuItem.Click += new System.EventHandler(this.LoadToolStripMenuItem_Click);
|
||||
//
|
||||
// openFileDialog
|
||||
//
|
||||
this.openFileDialog.FileName = "openFileDialog1";
|
||||
this.openFileDialog.Filter = "txt file | *.txt";
|
||||
//
|
||||
// saveFileDialog
|
||||
//
|
||||
this.saveFileDialog.Filter = "txt file | *.txt";
|
||||
//
|
||||
// FormShipCollection
|
||||
//
|
||||
@ -239,5 +252,7 @@
|
||||
private ToolStripMenuItem файлToolStripMenuItem;
|
||||
private ToolStripMenuItem сохранениеToolStripMenuItem;
|
||||
private ToolStripMenuItem загрузкаToolStripMenuItem;
|
||||
private OpenFileDialog openFileDialog;
|
||||
private SaveFileDialog saveFileDialog;
|
||||
}
|
||||
}
|
@ -60,4 +60,10 @@
|
||||
<metadata name="menuStrip1.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>152, 17</value>
|
||||
</metadata>
|
||||
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>311, 17</value>
|
||||
</metadata>
|
||||
</root>
|
2
WarmlyShip/WarmlyShip/FormShipConfig.Designer.cs
generated
2
WarmlyShip/WarmlyShip/FormShipConfig.Designer.cs
generated
@ -130,7 +130,7 @@
|
||||
//
|
||||
// panelBlue
|
||||
//
|
||||
this.panelBlue.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
|
||||
this.panelBlue.BackColor = System.Drawing.Color.Blue;
|
||||
this.panelBlue.Location = new System.Drawing.Point(143, 39);
|
||||
this.panelBlue.Name = "panelBlue";
|
||||
this.panelBlue.Size = new System.Drawing.Size(50, 50);
|
||||
|
@ -121,7 +121,7 @@ namespace WarmlyShip.Generics
|
||||
}
|
||||
using FileStream fs = new(filename, FileMode.Create);
|
||||
byte[] info = new
|
||||
UTF8Encoding(true).GetBytes($"CarStorage{Environment.NewLine}{data}");
|
||||
UTF8Encoding(true).GetBytes($"ShipStorage{Environment.NewLine}{data}");
|
||||
fs.Write(info, 0, info.Length);
|
||||
return true;
|
||||
}
|
||||
@ -153,7 +153,7 @@ namespace WarmlyShip.Generics
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!strs[0].StartsWith("CarStorage"))
|
||||
if (!strs[0].StartsWith("ShipStorage"))
|
||||
{
|
||||
//если нет такой записи, то это не те данные
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user