PIBD-13_Klemendeev_R.S._GasolineTanker_Simple LabWork07 #7
@ -9,7 +9,6 @@ public class ListGenericObjects<T> : ICollectionGenericObjects<T>
|
||||
private int _maxCount;
|
||||
public int Count => _collection.Count;
|
||||
|
||||
<<<<<<< HEAD
|
||||
public int MaxCount
|
||||
{
|
||||
get => _maxCount;
|
||||
@ -23,9 +22,6 @@ public class ListGenericObjects<T> : ICollectionGenericObjects<T>
|
||||
}
|
||||
|
||||
public CollectionType GetCollectionType => CollectionType.List;
|
||||
=======
|
||||
public int SetMaxCount { set { if (value > 0) { _maxCount = value; } } }
|
||||
>>>>>>> 3ab0f7e (53)
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
@ -67,7 +63,6 @@ public class ListGenericObjects<T> : ICollectionGenericObjects<T>
|
||||
_collection.RemoveAt(position);
|
||||
return obj;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
public IEnumerable<T?> GetItems()
|
||||
{
|
||||
@ -76,6 +71,4 @@ public class ListGenericObjects<T> : ICollectionGenericObjects<T>
|
||||
yield return _collection[i];
|
||||
}
|
||||
}
|
||||
=======
|
||||
>>>>>>> 3ab0f7e (53)
|
||||
}
|
||||
|
@ -1,16 +1,10 @@
|
||||
using ProjectGasolineTanker.Drawnings;
|
||||
using ProjectGasolineTanker.Drawnings;
|
||||
using ProjectGasolineTanker.Exceptions;
|
||||
using System.Text;
|
||||
|
||||
namespace ProjectGasolineTanker.CollectionGenericObjects;
|
||||
public class StorageCollection<T>
|
||||
where T : DrawningTanker
|
||||
=======
|
||||
|
||||
namespace ProjectGasolineTanker.CollectionGenericObjects;
|
||||
public class StorageCollection<T>
|
||||
where T : class
|
||||
>>>>>>> 3ab0f7e (53)
|
||||
{
|
||||
/// <summary>
|
||||
/// Словарь (хранилище) с коллекциями
|
||||
@ -23,7 +17,6 @@ public class StorageCollection<T>
|
||||
public List<string> Keys => _storages.Keys.ToList();
|
||||
|
||||
/// <summary>
|
||||
<<<<<<< HEAD
|
||||
/// Ключевое слово, с которого должен начинаться файл
|
||||
/// </summary>
|
||||
private readonly string _collectionKey = "CollectionsStorage";
|
||||
@ -39,8 +32,6 @@ public class StorageCollection<T>
|
||||
private readonly string _separatorItems = ";";
|
||||
|
||||
/// <summary>
|
||||
=======
|
||||
>>>>>>> 3ab0f7e (53)
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
public StorageCollection()
|
||||
@ -101,7 +92,6 @@ public class StorageCollection<T>
|
||||
return null;
|
||||
}
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
/// <summary>
|
||||
/// Сохранение информации по автомобилям в хранилище в файл
|
||||
@ -222,6 +212,4 @@ public class StorageCollection<T>
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
=======
|
||||
>>>>>>> 3ab0f7e (53)
|
||||
}
|
||||
|
@ -30,7 +30,13 @@ namespace ProjectGasolineTanker
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
groupBoxTools = new GroupBox();
|
||||
Инструменты = new GroupBox();
|
||||
panelCompanyTools = new Panel();
|
||||
buttonAddTanker = new Button();
|
||||
maskedTextBoxPosition = new MaskedTextBox();
|
||||
buttonGoToCheck = new Button();
|
||||
buttonRemoveTanker = new Button();
|
||||
buttonRefresh = new Button();
|
||||
buttonCreateCompany = new Button();
|
||||
panelStorage = new Panel();
|
||||
buttonCollectionDel = new Button();
|
||||
@ -40,40 +46,107 @@ namespace ProjectGasolineTanker
|
||||
radioButtonMassive = new RadioButton();
|
||||
textBoxCollectionName = new TextBox();
|
||||
labelCollectionName = new Label();
|
||||
buttonRefresh = new Button();
|
||||
buttonGoToCheck = new Button();
|
||||
buttonRemoveTanker = new Button();
|
||||
maskedTextBoxPosition = new MaskedTextBox();
|
||||
buttonAddTanker = new Button();
|
||||
comboBoxSelectorCompany = new ComboBox();
|
||||
pictureBox = new PictureBox();
|
||||
panelCompanyTools = new Panel();
|
||||
groupBoxTools.SuspendLayout();
|
||||
menuStrip = new MenuStrip();
|
||||
файлToolStripMenuItem = new ToolStripMenuItem();
|
||||
saveToolStripMenuItem = new ToolStripMenuItem();
|
||||
loadToolStripMenuItem = new ToolStripMenuItem();
|
||||
saveFileDialog = new SaveFileDialog();
|
||||
openFileDialog = new OpenFileDialog();
|
||||
Инструменты.SuspendLayout();
|
||||
panelCompanyTools.SuspendLayout();
|
||||
panelStorage.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox).BeginInit();
|
||||
panelCompanyTools.SuspendLayout();
|
||||
menuStrip.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// groupBoxTools
|
||||
// Инструменты
|
||||
//
|
||||
groupBoxTools.Controls.Add(panelCompanyTools);
|
||||
groupBoxTools.Controls.Add(buttonCreateCompany);
|
||||
groupBoxTools.Controls.Add(panelStorage);
|
||||
groupBoxTools.Controls.Add(comboBoxSelectorCompany);
|
||||
groupBoxTools.Dock = DockStyle.Right;
|
||||
groupBoxTools.Location = new Point(783, 0);
|
||||
groupBoxTools.Name = "groupBoxTools";
|
||||
groupBoxTools.Size = new Size(179, 616);
|
||||
groupBoxTools.TabIndex = 0;
|
||||
groupBoxTools.TabStop = false;
|
||||
groupBoxTools.Text = "Инструменты";
|
||||
Инструменты.Controls.Add(panelCompanyTools);
|
||||
Инструменты.Controls.Add(buttonCreateCompany);
|
||||
Инструменты.Controls.Add(panelStorage);
|
||||
Инструменты.Controls.Add(comboBoxSelectorCompany);
|
||||
Инструменты.Dock = DockStyle.Right;
|
||||
Инструменты.Location = new Point(861, 24);
|
||||
Инструменты.Name = "Инструменты";
|
||||
Инструменты.Size = new Size(225, 627);
|
||||
Инструменты.TabIndex = 0;
|
||||
Инструменты.TabStop = false;
|
||||
Инструменты.Text = "Инструменты";
|
||||
//
|
||||
// panelCompanyTools
|
||||
//
|
||||
panelCompanyTools.Controls.Add(buttonAddTanker);
|
||||
panelCompanyTools.Controls.Add(maskedTextBoxPosition);
|
||||
panelCompanyTools.Controls.Add(buttonGoToCheck);
|
||||
panelCompanyTools.Controls.Add(buttonRemoveTanker);
|
||||
panelCompanyTools.Controls.Add(buttonRefresh);
|
||||
panelCompanyTools.Dock = DockStyle.Bottom;
|
||||
panelCompanyTools.Location = new Point(3, 380);
|
||||
panelCompanyTools.Name = "panelCompanyTools";
|
||||
panelCompanyTools.Size = new Size(219, 244);
|
||||
panelCompanyTools.TabIndex = 8;
|
||||
//
|
||||
// buttonAddTanker
|
||||
//
|
||||
buttonAddTanker.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
buttonAddTanker.Location = new Point(3, 21);
|
||||
buttonAddTanker.Name = "buttonAddTanker";
|
||||
buttonAddTanker.Size = new Size(213, 37);
|
||||
buttonAddTanker.TabIndex = 1;
|
||||
buttonAddTanker.Text = "Добавление грузовика";
|
||||
buttonAddTanker.UseVisualStyleBackColor = true;
|
||||
buttonAddTanker.Click += ButtonAddTanker_Click;
|
||||
//
|
||||
// maskedTextBoxPosition
|
||||
//
|
||||
maskedTextBoxPosition.Location = new Point(3, 86);
|
||||
maskedTextBoxPosition.Mask = "00";
|
||||
maskedTextBoxPosition.Name = "maskedTextBoxPosition";
|
||||
maskedTextBoxPosition.Size = new Size(213, 23);
|
||||
maskedTextBoxPosition.TabIndex = 3;
|
||||
maskedTextBoxPosition.ValidatingType = typeof(int);
|
||||
//
|
||||
// buttonGoToCheck
|
||||
//
|
||||
buttonGoToCheck.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
buttonGoToCheck.Location = new Point(3, 161);
|
||||
buttonGoToCheck.Name = "buttonGoToCheck";
|
||||
buttonGoToCheck.Size = new Size(213, 40);
|
||||
buttonGoToCheck.TabIndex = 6;
|
||||
buttonGoToCheck.Text = "Передать на тесты";
|
||||
buttonGoToCheck.UseVisualStyleBackColor = true;
|
||||
buttonGoToCheck.Click += ButtonGoToCheck_Click;
|
||||
//
|
||||
// buttonRemoveTanker
|
||||
//
|
||||
buttonRemoveTanker.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
buttonRemoveTanker.Location = new Point(3, 115);
|
||||
buttonRemoveTanker.Name = "buttonRemoveTanker";
|
||||
buttonRemoveTanker.Size = new Size(213, 40);
|
||||
buttonRemoveTanker.TabIndex = 4;
|
||||
buttonRemoveTanker.Text = "Удаление автомобиль";
|
||||
buttonRemoveTanker.UseVisualStyleBackColor = true;
|
||||
buttonRemoveTanker.Click += ButtonRemoveTanker_Click;
|
||||
//
|
||||
// buttonRefresh
|
||||
//
|
||||
buttonRefresh.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
buttonRefresh.Location = new Point(3, 207);
|
||||
buttonRefresh.Name = "buttonRefresh";
|
||||
buttonRefresh.Size = new Size(213, 40);
|
||||
buttonRefresh.TabIndex = 5;
|
||||
buttonRefresh.Text = "Обновить";
|
||||
buttonRefresh.UseVisualStyleBackColor = true;
|
||||
buttonRefresh.Click += ButtonRefresh_Click;
|
||||
//
|
||||
// buttonCreateCompany
|
||||
//
|
||||
buttonCreateCompany.Location = new Point(6, 320);
|
||||
buttonCreateCompany.Location = new Point(6, 350);
|
||||
buttonCreateCompany.Name = "buttonCreateCompany";
|
||||
buttonCreateCompany.Size = new Size(167, 23);
|
||||
buttonCreateCompany.TabIndex = 8;
|
||||
buttonCreateCompany.Size = new Size(213, 24);
|
||||
buttonCreateCompany.TabIndex = 7;
|
||||
buttonCreateCompany.Text = "Создать компанию";
|
||||
buttonCreateCompany.UseVisualStyleBackColor = true;
|
||||
buttonCreateCompany.Click += ButtonCreateCompany_Click;
|
||||
@ -90,14 +163,14 @@ namespace ProjectGasolineTanker
|
||||
panelStorage.Dock = DockStyle.Top;
|
||||
panelStorage.Location = new Point(3, 19);
|
||||
panelStorage.Name = "panelStorage";
|
||||
panelStorage.Size = new Size(173, 266);
|
||||
panelStorage.Size = new Size(219, 296);
|
||||
panelStorage.TabIndex = 7;
|
||||
//
|
||||
// buttonCollectionDel
|
||||
//
|
||||
buttonCollectionDel.Location = new Point(3, 227);
|
||||
buttonCollectionDel.Location = new Point(3, 267);
|
||||
buttonCollectionDel.Name = "buttonCollectionDel";
|
||||
buttonCollectionDel.Size = new Size(167, 23);
|
||||
buttonCollectionDel.Size = new Size(213, 24);
|
||||
buttonCollectionDel.TabIndex = 6;
|
||||
buttonCollectionDel.Text = "Удалить коллекцию";
|
||||
buttonCollectionDel.UseVisualStyleBackColor = true;
|
||||
@ -107,16 +180,16 @@ namespace ProjectGasolineTanker
|
||||
//
|
||||
listBoxCollection.FormattingEnabled = true;
|
||||
listBoxCollection.ItemHeight = 15;
|
||||
listBoxCollection.Location = new Point(3, 112);
|
||||
listBoxCollection.Location = new Point(3, 122);
|
||||
listBoxCollection.Name = "listBoxCollection";
|
||||
listBoxCollection.Size = new Size(167, 109);
|
||||
listBoxCollection.Size = new Size(213, 139);
|
||||
listBoxCollection.TabIndex = 5;
|
||||
//
|
||||
// buttonCollectionAdd
|
||||
//
|
||||
buttonCollectionAdd.Location = new Point(3, 83);
|
||||
buttonCollectionAdd.Location = new Point(3, 85);
|
||||
buttonCollectionAdd.Name = "buttonCollectionAdd";
|
||||
buttonCollectionAdd.Size = new Size(167, 23);
|
||||
buttonCollectionAdd.Size = new Size(213, 24);
|
||||
buttonCollectionAdd.TabIndex = 4;
|
||||
buttonCollectionAdd.Text = "Добавить коллекцию";
|
||||
buttonCollectionAdd.UseVisualStyleBackColor = true;
|
||||
@ -125,7 +198,7 @@ namespace ProjectGasolineTanker
|
||||
// radioButtonList
|
||||
//
|
||||
radioButtonList.AutoSize = true;
|
||||
radioButtonList.Location = new Point(98, 58);
|
||||
radioButtonList.Location = new Point(139, 60);
|
||||
radioButtonList.Name = "radioButtonList";
|
||||
radioButtonList.Size = new Size(66, 19);
|
||||
radioButtonList.TabIndex = 3;
|
||||
@ -136,7 +209,7 @@ namespace ProjectGasolineTanker
|
||||
// radioButtonMassive
|
||||
//
|
||||
radioButtonMassive.AutoSize = true;
|
||||
radioButtonMassive.Location = new Point(16, 58);
|
||||
radioButtonMassive.Location = new Point(19, 60);
|
||||
radioButtonMassive.Name = "radioButtonMassive";
|
||||
radioButtonMassive.Size = new Size(67, 19);
|
||||
radioButtonMassive.TabIndex = 2;
|
||||
@ -146,81 +219,27 @@ namespace ProjectGasolineTanker
|
||||
//
|
||||
// textBoxCollectionName
|
||||
//
|
||||
textBoxCollectionName.Location = new Point(3, 29);
|
||||
textBoxCollectionName.Location = new Point(3, 31);
|
||||
textBoxCollectionName.Name = "textBoxCollectionName";
|
||||
textBoxCollectionName.Size = new Size(167, 23);
|
||||
textBoxCollectionName.Size = new Size(213, 23);
|
||||
textBoxCollectionName.TabIndex = 1;
|
||||
//
|
||||
// labelCollectionName
|
||||
//
|
||||
labelCollectionName.AutoSize = true;
|
||||
labelCollectionName.Location = new Point(26, 11);
|
||||
labelCollectionName.Location = new Point(47, 13);
|
||||
labelCollectionName.Name = "labelCollectionName";
|
||||
labelCollectionName.Size = new Size(125, 15);
|
||||
labelCollectionName.TabIndex = 0;
|
||||
labelCollectionName.Text = "Название коллекции:";
|
||||
//
|
||||
// buttonAddTanker
|
||||
//
|
||||
buttonRefresh.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
buttonRefresh.Location = new Point(3, 210);
|
||||
buttonRefresh.Name = "buttonRefresh";
|
||||
buttonRefresh.Size = new Size(167, 40);
|
||||
buttonRefresh.TabIndex = 6;
|
||||
buttonRefresh.Text = "Обновить";
|
||||
buttonRefresh.UseVisualStyleBackColor = true;
|
||||
buttonRefresh.Click += ButtonRefresh_Click;
|
||||
//
|
||||
// buttonGoToCheck
|
||||
//
|
||||
buttonGoToCheck.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
buttonGoToCheck.Location = new Point(3, 170);
|
||||
buttonGoToCheck.Name = "buttonGoToCheck";
|
||||
buttonGoToCheck.Size = new Size(213, 40);
|
||||
buttonGoToCheck.TabIndex = 6;
|
||||
buttonGoToCheck.Text = "Передать на тесты";
|
||||
buttonGoToCheck.UseVisualStyleBackColor = true;
|
||||
buttonGoToCheck.Click += ButtonGoToCheck_Click;
|
||||
//
|
||||
// buttonRemoveTanker
|
||||
//
|
||||
buttonRemoveTanker.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
buttonRemoveTanker.Location = new Point(3, 124);
|
||||
buttonRemoveTanker.Name = "buttonRemoveTanker";
|
||||
buttonRemoveTanker.Size = new Size(213, 40);
|
||||
buttonRemoveTanker.TabIndex = 4;
|
||||
buttonRemoveTanker.Text = "Удаление автомобиль";
|
||||
buttonRemoveTanker.UseVisualStyleBackColor = true;
|
||||
buttonRemoveTanker.Click += ButtonRemoveTanker_Click;
|
||||
|
||||
//
|
||||
// buttonRefresh
|
||||
//
|
||||
maskedTextBoxPosition.Location = new Point(3, 95);
|
||||
maskedTextBoxPosition.Mask = "00";
|
||||
maskedTextBoxPosition.Name = "maskedTextBoxPosition";
|
||||
maskedTextBoxPosition.Size = new Size(167, 23);
|
||||
maskedTextBoxPosition.TabIndex = 3;
|
||||
maskedTextBoxPosition.ValidatingType = typeof(int);
|
||||
//
|
||||
// buttonAddTanker
|
||||
//
|
||||
buttonAddTanker.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
buttonAddTanker.Location = new Point(3, 3);
|
||||
buttonAddTanker.Name = "buttonAddTanker";
|
||||
buttonAddTanker.Size = new Size(167, 40);
|
||||
buttonAddTanker.TabIndex = 1;
|
||||
buttonAddTanker.Text = "Добавление грузовика";
|
||||
buttonAddTanker.UseVisualStyleBackColor = true;
|
||||
buttonAddTanker.Click += ButtonAddTanker_Click;
|
||||
//
|
||||
// comboBoxSelectorCompany
|
||||
//
|
||||
comboBoxSelectorCompany.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
comboBoxSelectorCompany.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboBoxSelectorCompany.FormattingEnabled = true;
|
||||
comboBoxSelectorCompany.Items.AddRange(new object[] { "Хранилище" });
|
||||
comboBoxSelectorCompany.Location = new Point(6, 291);
|
||||
comboBoxSelectorCompany.Location = new Point(6, 321);
|
||||
comboBoxSelectorCompany.Name = "comboBoxSelectorCompany";
|
||||
comboBoxSelectorCompany.Size = new Size(213, 23);
|
||||
comboBoxSelectorCompany.TabIndex = 0;
|
||||
@ -286,14 +305,17 @@ namespace ProjectGasolineTanker
|
||||
Controls.Add(menuStrip);
|
||||
MainMenuStrip = menuStrip;
|
||||
Name = "FormTankerCollection";
|
||||
Text = "Коллекция автомобилей";
|
||||
groupBoxTools.ResumeLayout(false);
|
||||
Text = "Коллекция Грузовиков";
|
||||
Инструменты.ResumeLayout(false);
|
||||
panelCompanyTools.ResumeLayout(false);
|
||||
panelCompanyTools.PerformLayout();
|
||||
panelStorage.ResumeLayout(false);
|
||||
panelStorage.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox).EndInit();
|
||||
panelCompanyTools.ResumeLayout(false);
|
||||
panelCompanyTools.PerformLayout();
|
||||
menuStrip.ResumeLayout(false);
|
||||
menuStrip.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -316,5 +338,11 @@ namespace ProjectGasolineTanker
|
||||
private Button buttonCollectionDel;
|
||||
private Button buttonCreateCompany;
|
||||
private Panel panelCompanyTools;
|
||||
private MenuStrip menuStrip;
|
||||
private ToolStripMenuItem файлToolStripMenuItem;
|
||||
private ToolStripMenuItem saveToolStripMenuItem;
|
||||
private ToolStripMenuItem loadToolStripMenuItem;
|
||||
private SaveFileDialog saveFileDialog;
|
||||
private OpenFileDialog openFileDialog;
|
||||
}
|
||||
}
|
@ -79,11 +79,7 @@ public partial class FormTankerConfig : Form
|
||||
break;
|
||||
case "labelModifiedObject":
|
||||
_tanker = new DrawningGasolineTanker((int)numericUpDownSpeed.Value, (double)numericUpDownWeight.Value, Color.White,
|
||||
<<<<<<< HEAD
|
||||
Color.Black, checkBoxSignalbeacon.Checked, checkBoxTanker.Checked);
|
||||
=======
|
||||
Color.Black, checkBoxTanker.Checked, checkBoxSignalbeacon.Checked);
|
||||
>>>>>>> 3ab0f7e (53)
|
||||
break;
|
||||
}
|
||||
labelBodyColor.BackColor = Color.Empty;
|
||||
|
Loading…
x
Reference in New Issue
Block a user