Example #1
0
 public virtual string GetInfo()
 {
     return(string.Format("{0} | {1} | {2} | {3} | {4} | {5} | {6}",
                          GetType().Name.PadLeft(8, ' '), CarsControlSystemType.ToString().PadLeft(9, ' '),
                          Speed.ToString().PadLeft(5, ' '), FuelConsumption.ToString().PadLeft(4, ' '),
                          Price.ToString().PadLeft(5, ' '), CurbWeight.ToString().PadLeft(10, ' '), GetFullWeight().ToString().PadLeft(10, ' ')));
 }
        void FillBackSideTextByDrawText(Graphics gr)
        {
            const int textMainMargin = 468;
            const int textMargin     = textMainMargin + 41;
            const int textWidth      = 450;

            GraphicsHelper.DrawText(gr, "9.", textMainMargin, 38);
            GraphicsHelper.DrawText(gr, YearOfManufacture.ToUpper(), textMargin, 38, textWidth);
            GraphicsHelper.DrawText(gr, "10.", textMainMargin, 88);
            GraphicsHelper.DrawText(gr, Type.ToUpper(), textMargin, 88, textWidth);
            GraphicsHelper.DrawText(gr, "11.", textMainMargin, 138);
            GraphicsHelper.DrawText(gr, VehicleIdentificationNumber.ToUpper(), textMargin, 138, textWidth);
            GraphicsHelper.DrawText(gr, "12.", textMainMargin, 190);
            GraphicsHelper.DrawText(gr, GrossWeight.ToString("n2"), textMargin, 190, textWidth);
            GraphicsHelper.DrawText(gr, "13.", textMainMargin, 242);
            GraphicsHelper.DrawText(gr, CurbWeight.ToString("n2"), textMargin, 242, textWidth);
            GraphicsHelper.DrawText(gr, "14.", textMainMargin, 293);
            GraphicsHelper.DrawText(gr, EngineNumber.ToUpper(), textMargin, 293, textWidth);
            GraphicsHelper.DrawText(gr, "15.", textMainMargin, 345);
            GraphicsHelper.DrawText(gr, EnginePower.ToUpper(), textMargin, 345, textWidth);
            GraphicsHelper.DrawText(gr, "16.", textMainMargin, 395);
            GraphicsHelper.DrawText(gr, FuelType.ToUpper(), textMargin, 395, textWidth);
            GraphicsHelper.DrawText(gr, "17.", textMainMargin, 448);
            GraphicsHelper.DrawText(gr, NumberOfSeats.ToSafeString(), textMargin, 448, textWidth);
            GraphicsHelper.DrawText(gr, "18.", textMainMargin, 499);
            GraphicsHelper.DrawText(gr, NumberOfStandees.ToSafeString(), textMargin, 499, textWidth);
            GraphicsHelper.DrawText(gr, "19.", textMainMargin, 549);
            GraphicsHelper.DrawText(gr, SpecialMarks.ToUpper(), textMargin, 549, textWidth);
        }