PIbd-23_Vrazhkin_S_A_Electr.../lab1/Entities/EntityLocomotiv.cs

28 lines
759 B
C#
Raw Normal View History

2023-09-19 19:04:33 +04:00
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectricLocomotive
{
public class EntityLocomotiv
{
2023-11-14 12:17:37 +04:00
public int Speed { get; set; }
public double Weight { get; set; }
2023-09-19 19:04:33 +04:00
public double Step => (double)Speed * 100 / Weight;
2023-10-17 13:49:31 +04:00
public Color ColorBody = Color.Black;
public Color ColorWindow = Color.Blue;
2023-09-19 19:04:33 +04:00
public readonly Color ColorFillBody = Color.White;
2023-10-03 11:53:51 +04:00
2023-10-17 13:49:31 +04:00
public EntityLocomotiv(int speed,double weight, Color mainColor, Color dopColor)
2023-09-19 19:04:33 +04:00
{
Speed = speed;
Weight = weight;
2023-10-17 13:49:31 +04:00
ColorBody = mainColor;
ColorWindow = dopColor;
2023-09-19 19:04:33 +04:00
}
}
}