Исправления

This commit is contained in:
prodigygirl 2022-10-21 20:50:20 +04:00
parent 9e6feca9ab
commit 5d57863fde
2 changed files with 6 additions and 6 deletions

View File

@ -151,7 +151,7 @@ namespace ArmoredCar
this.buttonRemoveCar.TabIndex = 3;
this.buttonRemoveCar.Text = "Удалить бронемашину";
this.buttonRemoveCar.UseVisualStyleBackColor = true;
this.buttonRemoveCar.Click += new System.EventHandler(this.ButtonRemoveCar_Click);
this.buttonRemoveCar.Click += new System.EventHandler(this.ButtonRemoveArmoredCar_Click);
//
// buttonShowStorage
//
@ -229,7 +229,7 @@ namespace ArmoredCar
this.buttonAddCar.TabIndex = 1;
this.buttonAddCar.Text = "Добавить бронемашину";
this.buttonAddCar.UseVisualStyleBackColor = true;
this.buttonAddCar.Click += new System.EventHandler(this.ButtonAddCar_Click);
this.buttonAddCar.Click += new System.EventHandler(this.ButtonAddarmoredCar_Click);
//
// pictureBox
//

View File

@ -107,7 +107,7 @@ namespace ArmoredCar
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ButtonAddCar_Click(object sender, EventArgs e)
private void ButtonAddarmoredCar_Click(object sender, EventArgs e)
{
if (listBoxMaps.SelectedIndex == -1)
{
@ -116,8 +116,8 @@ namespace ArmoredCar
FormCar form = new();
if (form.ShowDialog() == DialogResult.OK)
{
DrawningObjectArmCar car = new(form.SelectedCar);
if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + car > -1)
DrawningObjectArmCar armoredCar = new(form.SelectedCar);
if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + armoredCar > -1)
{
MessageBox.Show("Объект добавлен");
pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet();
@ -133,7 +133,7 @@ namespace ArmoredCar
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ButtonRemoveCar_Click(object sender, EventArgs e)
private void ButtonRemoveArmoredCar_Click(object sender, EventArgs e)
{
if (listBoxMaps.SelectedIndex == -1)
{