Мелкие правки.
This commit is contained in:
parent
6a1814926f
commit
575f9840a0
@ -48,7 +48,7 @@ namespace AirplaneWithRadar
|
|||||||
{
|
{
|
||||||
Bitmap bmp = new(pictureBoxObject.Width, pictureBoxObject.Height);
|
Bitmap bmp = new(pictureBoxObject.Width, pictureBoxObject.Height);
|
||||||
Graphics gr = Graphics.FromImage(bmp);
|
Graphics gr = Graphics.FromImage(bmp);
|
||||||
_airplane?.SetPosition(5, 5, pictureBoxObject.Width,pictureBoxObject.Height);
|
_airplane?.SetPosition(5, 5, pictureBoxObject.Width, pictureBoxObject.Height);
|
||||||
_airplane?.DrawTransport(gr);
|
_airplane?.DrawTransport(gr);
|
||||||
pictureBoxObject.Image = bmp;
|
pictureBoxObject.Image = bmp;
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ namespace AirplaneWithRadar
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void LabelObject_MouseDown(object sender, MouseEventArgs e)
|
private void LabelObject_MouseDown(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
(sender as Label).DoDragDrop((sender as Label).Name,DragDropEffects.Move | DragDropEffects.Copy);
|
(sender as Label).DoDragDrop((sender as Label).Name, DragDropEffects.Move | DragDropEffects.Copy);
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -103,10 +103,10 @@ namespace AirplaneWithRadar
|
|||||||
switch (e.Data.GetData(DataFormats.Text).ToString())
|
switch (e.Data.GetData(DataFormats.Text).ToString())
|
||||||
{
|
{
|
||||||
case "labelSimpleObject":
|
case "labelSimpleObject":
|
||||||
_airplane = new DrawingAirplane((int)numericUpDownSpeed.Value,(int)numericUpDownWeight.Value, Color.White);
|
_airplane = new DrawingAirplane((int)numericUpDownSpeed.Value, (int)numericUpDownWeight.Value, Color.White);
|
||||||
break;
|
break;
|
||||||
case "labelModifiedObject":
|
case "labelModifiedObject":
|
||||||
_airplane = new DrawingAirplaneWithRadar((int)numericUpDownSpeed.Value,(int)numericUpDownWeight.Value, Color.White, Color.Black,checkBoxRadar.Checked, checkBoxExtraFuelTank.Checked);
|
_airplane = new DrawingAirplaneWithRadar((int)numericUpDownSpeed.Value, (int)numericUpDownWeight.Value, Color.White, Color.Black, checkBoxRadar.Checked, checkBoxExtraFuelTank.Checked);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DrawAirplane();
|
DrawAirplane();
|
||||||
@ -172,7 +172,7 @@ namespace AirplaneWithRadar
|
|||||||
{
|
{
|
||||||
EventAddAirplane?.Invoke(_airplane);
|
EventAddAirplane?.Invoke(_airplane);
|
||||||
Close();
|
Close();
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,17 +144,6 @@ namespace AirplaneWithRadar
|
|||||||
/// Метод отрисовки фона
|
/// Метод отрисовки фона
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="g"></param>
|
/// <param name="g"></param>
|
||||||
private void DrawHangar(Graphics g, int x, int y, int width, int height)
|
|
||||||
{
|
|
||||||
Pen pen = new(Color.Black, 3);
|
|
||||||
g.DrawLine(pen, x, y, x + width, y);
|
|
||||||
g.DrawLine(pen, x, y, x, y + height + 20);
|
|
||||||
g.DrawLine(pen, x, y + height + 20, x + width, y + height + 20);
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// Метод отрисовки фона
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="g"></param>
|
|
||||||
private void DrawBackground(Graphics g)
|
private void DrawBackground(Graphics g)
|
||||||
{
|
{
|
||||||
Pen pen = new(Color.White, 5);
|
Pen pen = new(Color.White, 5);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user