f
This commit is contained in:
parent
c0f44442ee
commit
d73b5a9a60
@ -46,10 +46,17 @@
|
|||||||
maskedTextBoxPosision = new MaskedTextBox();
|
maskedTextBoxPosision = new MaskedTextBox();
|
||||||
buttonGetToTest = new Button();
|
buttonGetToTest = new Button();
|
||||||
pictureBoxTrain = new PictureBox();
|
pictureBoxTrain = new PictureBox();
|
||||||
|
menuStrip = new MenuStrip();
|
||||||
|
файлToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
saveToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
loadToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
saveFileDialog = new SaveFileDialog();
|
||||||
|
openFileDialog = new OpenFileDialog();
|
||||||
groupBoxTools.SuspendLayout();
|
groupBoxTools.SuspendLayout();
|
||||||
panelStorage.SuspendLayout();
|
panelStorage.SuspendLayout();
|
||||||
panelCompanyTools.SuspendLayout();
|
panelCompanyTools.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureBoxTrain).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureBoxTrain).BeginInit();
|
||||||
|
menuStrip.SuspendLayout();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// groupBoxTools
|
// groupBoxTools
|
||||||
@ -59,21 +66,18 @@
|
|||||||
groupBoxTools.Controls.Add(comboBoxSelectorCompany);
|
groupBoxTools.Controls.Add(comboBoxSelectorCompany);
|
||||||
groupBoxTools.Controls.Add(panelCompanyTools);
|
groupBoxTools.Controls.Add(panelCompanyTools);
|
||||||
groupBoxTools.Dock = DockStyle.Right;
|
groupBoxTools.Dock = DockStyle.Right;
|
||||||
groupBoxTools.Location = new Point(522, 0);
|
groupBoxTools.Location = new Point(631, 28);
|
||||||
groupBoxTools.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
groupBoxTools.Name = "groupBoxTools";
|
groupBoxTools.Name = "groupBoxTools";
|
||||||
groupBoxTools.Padding = new Padding(3, 2, 3, 2);
|
groupBoxTools.Size = new Size(222, 651);
|
||||||
groupBoxTools.Size = new Size(182, 490);
|
|
||||||
groupBoxTools.TabIndex = 0;
|
groupBoxTools.TabIndex = 0;
|
||||||
groupBoxTools.TabStop = false;
|
groupBoxTools.TabStop = false;
|
||||||
groupBoxTools.Text = "инструменты";
|
groupBoxTools.Text = "инструменты";
|
||||||
//
|
//
|
||||||
// buttonCreateCompany
|
// buttonCreateCompany
|
||||||
//
|
//
|
||||||
buttonCreateCompany.Location = new Point(18, 259);
|
buttonCreateCompany.Location = new Point(21, 345);
|
||||||
buttonCreateCompany.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
buttonCreateCompany.Name = "buttonCreateCompany";
|
buttonCreateCompany.Name = "buttonCreateCompany";
|
||||||
buttonCreateCompany.Size = new Size(163, 20);
|
buttonCreateCompany.Size = new Size(186, 27);
|
||||||
buttonCreateCompany.TabIndex = 7;
|
buttonCreateCompany.TabIndex = 7;
|
||||||
buttonCreateCompany.Text = "Создать компанию";
|
buttonCreateCompany.Text = "Создать компанию";
|
||||||
buttonCreateCompany.UseVisualStyleBackColor = true;
|
buttonCreateCompany.UseVisualStyleBackColor = true;
|
||||||
@ -89,18 +93,16 @@
|
|||||||
panelStorage.Controls.Add(textBoxCollectionName);
|
panelStorage.Controls.Add(textBoxCollectionName);
|
||||||
panelStorage.Controls.Add(labelCollectionName);
|
panelStorage.Controls.Add(labelCollectionName);
|
||||||
panelStorage.Dock = DockStyle.Top;
|
panelStorage.Dock = DockStyle.Top;
|
||||||
panelStorage.Location = new Point(3, 18);
|
panelStorage.Location = new Point(3, 23);
|
||||||
panelStorage.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
panelStorage.Name = "panelStorage";
|
panelStorage.Name = "panelStorage";
|
||||||
panelStorage.Size = new Size(176, 212);
|
panelStorage.Size = new Size(216, 283);
|
||||||
panelStorage.TabIndex = 6;
|
panelStorage.TabIndex = 6;
|
||||||
//
|
//
|
||||||
// buttonCollectionDel
|
// buttonCollectionDel
|
||||||
//
|
//
|
||||||
buttonCollectionDel.Location = new Point(15, 185);
|
buttonCollectionDel.Location = new Point(17, 247);
|
||||||
buttonCollectionDel.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
buttonCollectionDel.Name = "buttonCollectionDel";
|
buttonCollectionDel.Name = "buttonCollectionDel";
|
||||||
buttonCollectionDel.Size = new Size(163, 20);
|
buttonCollectionDel.Size = new Size(186, 27);
|
||||||
buttonCollectionDel.TabIndex = 6;
|
buttonCollectionDel.TabIndex = 6;
|
||||||
buttonCollectionDel.Text = "Удалить коллекцию";
|
buttonCollectionDel.Text = "Удалить коллекцию";
|
||||||
buttonCollectionDel.UseVisualStyleBackColor = true;
|
buttonCollectionDel.UseVisualStyleBackColor = true;
|
||||||
@ -109,19 +111,16 @@
|
|||||||
// listBoxCollection
|
// listBoxCollection
|
||||||
//
|
//
|
||||||
listBoxCollection.FormattingEnabled = true;
|
listBoxCollection.FormattingEnabled = true;
|
||||||
listBoxCollection.ItemHeight = 15;
|
listBoxCollection.Location = new Point(17, 137);
|
||||||
listBoxCollection.Location = new Point(15, 103);
|
|
||||||
listBoxCollection.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
listBoxCollection.Name = "listBoxCollection";
|
listBoxCollection.Name = "listBoxCollection";
|
||||||
listBoxCollection.Size = new Size(163, 79);
|
listBoxCollection.Size = new Size(186, 104);
|
||||||
listBoxCollection.TabIndex = 5;
|
listBoxCollection.TabIndex = 5;
|
||||||
//
|
//
|
||||||
// buttonCollecctionAdd
|
// buttonCollecctionAdd
|
||||||
//
|
//
|
||||||
buttonCollecctionAdd.Location = new Point(15, 78);
|
buttonCollecctionAdd.Location = new Point(17, 104);
|
||||||
buttonCollecctionAdd.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
buttonCollecctionAdd.Name = "buttonCollecctionAdd";
|
buttonCollecctionAdd.Name = "buttonCollecctionAdd";
|
||||||
buttonCollecctionAdd.Size = new Size(163, 20);
|
buttonCollecctionAdd.Size = new Size(186, 27);
|
||||||
buttonCollecctionAdd.TabIndex = 4;
|
buttonCollecctionAdd.TabIndex = 4;
|
||||||
buttonCollecctionAdd.Text = "Добавить коллекцию";
|
buttonCollecctionAdd.Text = "Добавить коллекцию";
|
||||||
buttonCollecctionAdd.UseVisualStyleBackColor = true;
|
buttonCollecctionAdd.UseVisualStyleBackColor = true;
|
||||||
@ -130,10 +129,9 @@
|
|||||||
// radioButtonList
|
// radioButtonList
|
||||||
//
|
//
|
||||||
radioButtonList.AutoSize = true;
|
radioButtonList.AutoSize = true;
|
||||||
radioButtonList.Location = new Point(108, 56);
|
radioButtonList.Location = new Point(123, 75);
|
||||||
radioButtonList.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
radioButtonList.Name = "radioButtonList";
|
radioButtonList.Name = "radioButtonList";
|
||||||
radioButtonList.Size = new Size(66, 19);
|
radioButtonList.Size = new Size(80, 24);
|
||||||
radioButtonList.TabIndex = 3;
|
radioButtonList.TabIndex = 3;
|
||||||
radioButtonList.TabStop = true;
|
radioButtonList.TabStop = true;
|
||||||
radioButtonList.Text = "Список";
|
radioButtonList.Text = "Список";
|
||||||
@ -142,10 +140,9 @@
|
|||||||
// radioButtonMassive
|
// radioButtonMassive
|
||||||
//
|
//
|
||||||
radioButtonMassive.AutoSize = true;
|
radioButtonMassive.AutoSize = true;
|
||||||
radioButtonMassive.Location = new Point(15, 56);
|
radioButtonMassive.Location = new Point(17, 75);
|
||||||
radioButtonMassive.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
radioButtonMassive.Name = "radioButtonMassive";
|
radioButtonMassive.Name = "radioButtonMassive";
|
||||||
radioButtonMassive.Size = new Size(67, 19);
|
radioButtonMassive.Size = new Size(82, 24);
|
||||||
radioButtonMassive.TabIndex = 2;
|
radioButtonMassive.TabIndex = 2;
|
||||||
radioButtonMassive.TabStop = true;
|
radioButtonMassive.TabStop = true;
|
||||||
radioButtonMassive.Text = "Массив";
|
radioButtonMassive.Text = "Массив";
|
||||||
@ -153,18 +150,17 @@
|
|||||||
//
|
//
|
||||||
// textBoxCollectionName
|
// textBoxCollectionName
|
||||||
//
|
//
|
||||||
textBoxCollectionName.Location = new Point(15, 24);
|
textBoxCollectionName.Location = new Point(17, 32);
|
||||||
textBoxCollectionName.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
textBoxCollectionName.Name = "textBoxCollectionName";
|
textBoxCollectionName.Name = "textBoxCollectionName";
|
||||||
textBoxCollectionName.Size = new Size(163, 23);
|
textBoxCollectionName.Size = new Size(186, 27);
|
||||||
textBoxCollectionName.TabIndex = 1;
|
textBoxCollectionName.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// labelCollectionName
|
// labelCollectionName
|
||||||
//
|
//
|
||||||
labelCollectionName.AutoSize = true;
|
labelCollectionName.AutoSize = true;
|
||||||
labelCollectionName.Location = new Point(23, 7);
|
labelCollectionName.Location = new Point(26, 9);
|
||||||
labelCollectionName.Name = "labelCollectionName";
|
labelCollectionName.Name = "labelCollectionName";
|
||||||
labelCollectionName.Size = new Size(122, 15);
|
labelCollectionName.Size = new Size(155, 20);
|
||||||
labelCollectionName.TabIndex = 0;
|
labelCollectionName.TabIndex = 0;
|
||||||
labelCollectionName.Text = "Название коллекции";
|
labelCollectionName.Text = "Название коллекции";
|
||||||
//
|
//
|
||||||
@ -173,10 +169,9 @@
|
|||||||
comboBoxSelectorCompany.DropDownStyle = ComboBoxStyle.DropDownList;
|
comboBoxSelectorCompany.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
comboBoxSelectorCompany.FormattingEnabled = true;
|
comboBoxSelectorCompany.FormattingEnabled = true;
|
||||||
comboBoxSelectorCompany.Items.AddRange(new object[] { "Хранилище" });
|
comboBoxSelectorCompany.Items.AddRange(new object[] { "Хранилище" });
|
||||||
comboBoxSelectorCompany.Location = new Point(18, 233);
|
comboBoxSelectorCompany.Location = new Point(21, 311);
|
||||||
comboBoxSelectorCompany.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
comboBoxSelectorCompany.Name = "comboBoxSelectorCompany";
|
comboBoxSelectorCompany.Name = "comboBoxSelectorCompany";
|
||||||
comboBoxSelectorCompany.Size = new Size(163, 23);
|
comboBoxSelectorCompany.Size = new Size(186, 28);
|
||||||
comboBoxSelectorCompany.TabIndex = 0;
|
comboBoxSelectorCompany.TabIndex = 0;
|
||||||
comboBoxSelectorCompany.SelectedIndexChanged += comboBoxSelectorCompany_SelectedIndexChanged_1;
|
comboBoxSelectorCompany.SelectedIndexChanged += comboBoxSelectorCompany_SelectedIndexChanged_1;
|
||||||
//
|
//
|
||||||
@ -188,32 +183,29 @@
|
|||||||
panelCompanyTools.Controls.Add(maskedTextBoxPosision);
|
panelCompanyTools.Controls.Add(maskedTextBoxPosision);
|
||||||
panelCompanyTools.Controls.Add(buttonGetToTest);
|
panelCompanyTools.Controls.Add(buttonGetToTest);
|
||||||
panelCompanyTools.Enabled = false;
|
panelCompanyTools.Enabled = false;
|
||||||
panelCompanyTools.Location = new Point(3, 284);
|
panelCompanyTools.Location = new Point(3, 379);
|
||||||
panelCompanyTools.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
panelCompanyTools.Name = "panelCompanyTools";
|
panelCompanyTools.Name = "panelCompanyTools";
|
||||||
panelCompanyTools.Size = new Size(189, 206);
|
panelCompanyTools.Size = new Size(216, 274);
|
||||||
panelCompanyTools.TabIndex = 8;
|
panelCompanyTools.TabIndex = 8;
|
||||||
//
|
//
|
||||||
// ButtonAddTrain
|
// ButtonAddTrain
|
||||||
//
|
//
|
||||||
ButtonAddTrain.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
ButtonAddTrain.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
ButtonAddTrain.BackgroundImageLayout = ImageLayout.Center;
|
ButtonAddTrain.BackgroundImageLayout = ImageLayout.Center;
|
||||||
ButtonAddTrain.Location = new Point(16, 2);
|
ButtonAddTrain.Location = new Point(18, 3);
|
||||||
ButtonAddTrain.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
ButtonAddTrain.Name = "ButtonAddTrain";
|
ButtonAddTrain.Name = "ButtonAddTrain";
|
||||||
ButtonAddTrain.Size = new Size(163, 55);
|
ButtonAddTrain.Size = new Size(186, 40);
|
||||||
ButtonAddTrain.TabIndex = 1;
|
ButtonAddTrain.TabIndex = 1;
|
||||||
ButtonAddTrain.Text = "добваление поезда";
|
ButtonAddTrain.Text = "добваление самолета";
|
||||||
ButtonAddTrain.UseVisualStyleBackColor = true;
|
ButtonAddTrain.UseVisualStyleBackColor = true;
|
||||||
ButtonAddTrain.Click += ButtonAddTrain_Click;
|
ButtonAddTrain.Click += ButtonAddTrain_Click;
|
||||||
//
|
//
|
||||||
// buttonRefresh
|
// buttonRefresh
|
||||||
//
|
//
|
||||||
buttonRefresh.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
buttonRefresh.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
buttonRefresh.Location = new Point(16, 170);
|
buttonRefresh.Location = new Point(18, 227);
|
||||||
buttonRefresh.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
buttonRefresh.Name = "buttonRefresh";
|
buttonRefresh.Name = "buttonRefresh";
|
||||||
buttonRefresh.Size = new Size(163, 31);
|
buttonRefresh.Size = new Size(186, 41);
|
||||||
buttonRefresh.TabIndex = 5;
|
buttonRefresh.TabIndex = 5;
|
||||||
buttonRefresh.Text = "обновить";
|
buttonRefresh.Text = "обновить";
|
||||||
buttonRefresh.UseVisualStyleBackColor = true;
|
buttonRefresh.UseVisualStyleBackColor = true;
|
||||||
@ -222,32 +214,29 @@
|
|||||||
// ButtonRemoveTrain
|
// ButtonRemoveTrain
|
||||||
//
|
//
|
||||||
ButtonRemoveTrain.Anchor = AnchorStyles.Right;
|
ButtonRemoveTrain.Anchor = AnchorStyles.Right;
|
||||||
ButtonRemoveTrain.Location = new Point(16, 88);
|
ButtonRemoveTrain.Location = new Point(18, 138);
|
||||||
ButtonRemoveTrain.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
ButtonRemoveTrain.Name = "ButtonRemoveTrain";
|
ButtonRemoveTrain.Name = "ButtonRemoveTrain";
|
||||||
ButtonRemoveTrain.Size = new Size(163, 46);
|
ButtonRemoveTrain.Size = new Size(186, 40);
|
||||||
ButtonRemoveTrain.TabIndex = 3;
|
ButtonRemoveTrain.TabIndex = 3;
|
||||||
ButtonRemoveTrain.Text = "удалить поезд";
|
ButtonRemoveTrain.Text = "удалить самолет";
|
||||||
ButtonRemoveTrain.UseVisualStyleBackColor = true;
|
ButtonRemoveTrain.UseVisualStyleBackColor = true;
|
||||||
ButtonRemoveTrain.Click += ButtonRemoveTrain_Click;
|
ButtonRemoveTrain.Click += ButtonRemoveTrain_Click;
|
||||||
//
|
//
|
||||||
// maskedTextBoxPosision
|
// maskedTextBoxPosision
|
||||||
//
|
//
|
||||||
maskedTextBoxPosision.Location = new Point(16, 61);
|
maskedTextBoxPosision.Location = new Point(17, 105);
|
||||||
maskedTextBoxPosision.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
maskedTextBoxPosision.Mask = "00";
|
maskedTextBoxPosision.Mask = "00";
|
||||||
maskedTextBoxPosision.Name = "maskedTextBoxPosision";
|
maskedTextBoxPosision.Name = "maskedTextBoxPosision";
|
||||||
maskedTextBoxPosision.Size = new Size(164, 23);
|
maskedTextBoxPosision.Size = new Size(187, 27);
|
||||||
maskedTextBoxPosision.TabIndex = 2;
|
maskedTextBoxPosision.TabIndex = 2;
|
||||||
maskedTextBoxPosision.ValidatingType = typeof(int);
|
maskedTextBoxPosision.ValidatingType = typeof(int);
|
||||||
//
|
//
|
||||||
// buttonGetToTest
|
// buttonGetToTest
|
||||||
//
|
//
|
||||||
buttonGetToTest.Anchor = AnchorStyles.Right;
|
buttonGetToTest.Anchor = AnchorStyles.Right;
|
||||||
buttonGetToTest.Location = new Point(16, 138);
|
buttonGetToTest.Location = new Point(18, 184);
|
||||||
buttonGetToTest.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
buttonGetToTest.Name = "buttonGetToTest";
|
buttonGetToTest.Name = "buttonGetToTest";
|
||||||
buttonGetToTest.Size = new Size(163, 30);
|
buttonGetToTest.Size = new Size(186, 40);
|
||||||
buttonGetToTest.TabIndex = 4;
|
buttonGetToTest.TabIndex = 4;
|
||||||
buttonGetToTest.Text = "передать на тесты";
|
buttonGetToTest.Text = "передать на тесты";
|
||||||
buttonGetToTest.UseVisualStyleBackColor = true;
|
buttonGetToTest.UseVisualStyleBackColor = true;
|
||||||
@ -256,21 +245,63 @@
|
|||||||
// pictureBoxTrain
|
// pictureBoxTrain
|
||||||
//
|
//
|
||||||
pictureBoxTrain.Dock = DockStyle.Fill;
|
pictureBoxTrain.Dock = DockStyle.Fill;
|
||||||
pictureBoxTrain.Location = new Point(0, 0);
|
pictureBoxTrain.Location = new Point(0, 28);
|
||||||
pictureBoxTrain.Margin = new Padding(3, 2, 3, 2);
|
|
||||||
pictureBoxTrain.Name = "pictureBoxTrain";
|
pictureBoxTrain.Name = "pictureBoxTrain";
|
||||||
pictureBoxTrain.Size = new Size(522, 490);
|
pictureBoxTrain.Size = new Size(631, 651);
|
||||||
pictureBoxTrain.TabIndex = 1;
|
pictureBoxTrain.TabIndex = 1;
|
||||||
pictureBoxTrain.TabStop = false;
|
pictureBoxTrain.TabStop = false;
|
||||||
|
pictureBoxTrain.Click += pictureBoxTrain_Click;
|
||||||
|
//
|
||||||
|
// menuStrip
|
||||||
|
//
|
||||||
|
menuStrip.ImageScalingSize = new Size(20, 20);
|
||||||
|
menuStrip.Items.AddRange(new ToolStripItem[] { файлToolStripMenuItem });
|
||||||
|
menuStrip.Location = new Point(0, 0);
|
||||||
|
menuStrip.Name = "menuStrip";
|
||||||
|
menuStrip.Size = new Size(853, 28);
|
||||||
|
menuStrip.TabIndex = 2;
|
||||||
|
menuStrip.Text = "menuStrip1";
|
||||||
|
//
|
||||||
|
// файлToolStripMenuItem
|
||||||
|
//
|
||||||
|
файлToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { saveToolStripMenuItem, loadToolStripMenuItem });
|
||||||
|
файлToolStripMenuItem.Name = "файлToolStripMenuItem";
|
||||||
|
файлToolStripMenuItem.Size = new Size(59, 24);
|
||||||
|
файлToolStripMenuItem.Text = "Файл";
|
||||||
|
//
|
||||||
|
// saveToolStripMenuItem
|
||||||
|
//
|
||||||
|
saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||||
|
saveToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.S;
|
||||||
|
saveToolStripMenuItem.Size = new Size(227, 26);
|
||||||
|
saveToolStripMenuItem.Text = "Сохранение";
|
||||||
|
saveToolStripMenuItem.Click += SaveToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// loadToolStripMenuItem
|
||||||
|
//
|
||||||
|
loadToolStripMenuItem.Name = "loadToolStripMenuItem";
|
||||||
|
loadToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.L;
|
||||||
|
loadToolStripMenuItem.Size = new Size(227, 26);
|
||||||
|
loadToolStripMenuItem.Text = "Загрузка";
|
||||||
|
loadToolStripMenuItem.Click += LoadToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// saveFileDialog
|
||||||
|
//
|
||||||
|
saveFileDialog.Filter = "txt file|*.txt";
|
||||||
|
//
|
||||||
|
// openFileDialog
|
||||||
|
//
|
||||||
|
openFileDialog.Filter = "txt file|*.txt";
|
||||||
//
|
//
|
||||||
// FormTrainsCollection
|
// FormTrainsCollection
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new Size(704, 490);
|
ClientSize = new Size(853, 679);
|
||||||
Controls.Add(pictureBoxTrain);
|
Controls.Add(pictureBoxTrain);
|
||||||
Controls.Add(groupBoxTools);
|
Controls.Add(groupBoxTools);
|
||||||
Margin = new Padding(3, 2, 3, 2);
|
Controls.Add(menuStrip);
|
||||||
|
MainMenuStrip = menuStrip;
|
||||||
Name = "FormTrainsCollection";
|
Name = "FormTrainsCollection";
|
||||||
Text = "FormTrainsCollection";
|
Text = "FormTrainsCollection";
|
||||||
groupBoxTools.ResumeLayout(false);
|
groupBoxTools.ResumeLayout(false);
|
||||||
@ -279,7 +310,10 @@
|
|||||||
panelCompanyTools.ResumeLayout(false);
|
panelCompanyTools.ResumeLayout(false);
|
||||||
panelCompanyTools.PerformLayout();
|
panelCompanyTools.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureBoxTrain).EndInit();
|
((System.ComponentModel.ISupportInitialize)pictureBoxTrain).EndInit();
|
||||||
|
menuStrip.ResumeLayout(false);
|
||||||
|
menuStrip.PerformLayout();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -302,5 +336,11 @@
|
|||||||
private Button buttonCreateCompany;
|
private Button buttonCreateCompany;
|
||||||
private Button buttonCollectionDel;
|
private Button buttonCollectionDel;
|
||||||
private Panel panelCompanyTools;
|
private Panel panelCompanyTools;
|
||||||
|
private MenuStrip menuStrip;
|
||||||
|
private ToolStripMenuItem файлToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem saveToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem loadToolStripMenuItem;
|
||||||
|
private SaveFileDialog saveFileDialog;
|
||||||
|
private OpenFileDialog openFileDialog;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
using ProjectTrain.CollectionGenericObjects;
|
using ProjectTrain.CollectionGenericObjects;
|
||||||
using ProjectTrain.Drawnings;
|
using ProjectTrain.Drawnings;
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace ProjectTrain
|
namespace ProjectTrain
|
||||||
{
|
{
|
||||||
@ -45,17 +44,17 @@ namespace ProjectTrain
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Добавление артиллерийской установки в коллекцию
|
/// Добавление самолета в коллекцию
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="train"></param>
|
/// <param name="plane"></param>
|
||||||
private void SetTrain(DrawningTrain train)
|
private void SetTrain(DrawningTrain? plane)
|
||||||
{
|
{
|
||||||
if (_company == null || train == null)
|
if (_company == null || plane == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_company + train != -1)
|
if (_company + plane != -1)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Объект добавлен");
|
MessageBox.Show("Объект добавлен");
|
||||||
pictureBoxTrain.Image = _company.Show();
|
pictureBoxTrain.Image = _company.Show();
|
||||||
@ -101,24 +100,24 @@ namespace ProjectTrain
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawningTrain? train = null;
|
DrawningTrain? plane = null;
|
||||||
int counter = 100;
|
int counter = 100;
|
||||||
while (train == null)
|
while (plane == null)
|
||||||
{
|
{
|
||||||
train = _company.GetRandomObject();
|
plane = _company.GetRandomObject();
|
||||||
counter--;
|
counter--;
|
||||||
if (counter <= 0)
|
if (counter <= 0)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (train == null)
|
if (plane == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FormTrain form = new()
|
FormTrain form = new()
|
||||||
{
|
{
|
||||||
SetTrain = train
|
SetTrain = plane
|
||||||
};
|
};
|
||||||
form.ShowDialog();
|
form.ShowDialog();
|
||||||
|
|
||||||
@ -223,8 +222,53 @@ namespace ProjectTrain
|
|||||||
}
|
}
|
||||||
panelCompanyTools.Enabled = true;
|
panelCompanyTools.Enabled = true;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Обработка нажатия "Сохранение"
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void SaveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
if (_storageCollection.SaveData(saveFileDialog.FileName))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Сохранение прошло успешно", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Не сохранилось", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Обработка нажатия "Загрузка"
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void LoadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
if (_storageCollection.LoadData(openFileDialog.FileName))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Загрузка прошла успешно", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
RerfreshListBoxItems();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Не загрузилось", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void pictureBoxTrain_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -117,4 +117,16 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 1</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>145, 1</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>310, 1</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>25</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue
Block a user