Исправления
This commit is contained in:
parent
a4072a3348
commit
24e3b1ac19
@ -81,9 +81,9 @@ namespace ArmoredCar
|
||||
this.buttonRemoveCar.Name = "buttonRemoveCar";
|
||||
this.buttonRemoveCar.Size = new System.Drawing.Size(175, 35);
|
||||
this.buttonRemoveCar.TabIndex = 3;
|
||||
this.buttonRemoveCar.Text = "Удалить автомобиль";
|
||||
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
|
||||
//
|
||||
@ -159,9 +159,9 @@ namespace ArmoredCar
|
||||
this.buttonAddCar.Name = "buttonAddCar";
|
||||
this.buttonAddCar.Size = new System.Drawing.Size(175, 35);
|
||||
this.buttonAddCar.TabIndex = 1;
|
||||
this.buttonAddCar.Text = "Добавить автомобиль";
|
||||
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);
|
||||
//
|
||||
// comboBoxSelectorMap
|
||||
//
|
||||
@ -169,7 +169,7 @@ namespace ArmoredCar
|
||||
this.comboBoxSelectorMap.FormattingEnabled = true;
|
||||
this.comboBoxSelectorMap.Items.AddRange(new object[] {
|
||||
"Простая карта",
|
||||
"База"});
|
||||
"Карта 1"});
|
||||
this.comboBoxSelectorMap.Location = new System.Drawing.Point(17, 32);
|
||||
this.comboBoxSelectorMap.Name = "comboBoxSelectorMap";
|
||||
this.comboBoxSelectorMap.Size = new System.Drawing.Size(175, 23);
|
||||
|
@ -30,9 +30,8 @@ namespace ArmoredCar
|
||||
case "Простая карта":
|
||||
map = new SimpleMap();
|
||||
break;
|
||||
case "База":
|
||||
//map = new BasaMap();
|
||||
|
||||
case "Карта 1":
|
||||
map = new MyMapLabirinth();
|
||||
break;
|
||||
}
|
||||
if (map != null)
|
||||
@ -50,7 +49,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 (_mapArmoredCarsCollectionGeneric == null)
|
||||
{
|
||||
@ -59,8 +58,8 @@ namespace ArmoredCar
|
||||
FormCar form = new();
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
DrawningObjectArmCar car = new(form.SelectedCar);
|
||||
if (_mapArmoredCarsCollectionGeneric + car)
|
||||
DrawningObjectArmCar armoredCar = new(form.SelectedCar);
|
||||
if (_mapArmoredCarsCollectionGeneric + armoredCar > -1)
|
||||
{
|
||||
MessageBox.Show("Объект добавлен");
|
||||
pictureBox.Image = _mapArmoredCarsCollectionGeneric.ShowSet();
|
||||
@ -76,7 +75,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 (string.IsNullOrEmpty(maskedTextBoxPosition.Text))
|
||||
{
|
||||
@ -87,7 +86,7 @@ namespace ArmoredCar
|
||||
return;
|
||||
}
|
||||
int pos = Convert.ToInt32(maskedTextBoxPosition.Text);
|
||||
if (_mapArmoredCarsCollectionGeneric - pos)
|
||||
if (_mapArmoredCarsCollectionGeneric - pos != null)
|
||||
{
|
||||
MessageBox.Show("Объект удален");
|
||||
pictureBox.Image = _mapArmoredCarsCollectionGeneric.ShowSet();
|
||||
@ -134,6 +133,7 @@ namespace ArmoredCar
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//получаем имя кнопки
|
||||
string name = ((Button)sender)?.Name ?? string.Empty;
|
||||
Direction dir = Direction.None;
|
||||
|
Loading…
Reference in New Issue
Block a user