delete dop
This commit is contained in:
parent
685508a162
commit
dec7c41aac
@ -42,10 +42,5 @@ namespace DumpTruck.Entities
|
|||||||
BodyColor = color;
|
BodyColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
char _separatorForObject = ':';
|
|
||||||
return $"{Speed}{_separatorForObject}{Weight}{_separatorForObject}{BodyColor.Name}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,12 +42,6 @@ namespace DumpTruck.Entities
|
|||||||
AdditionalColor = color;
|
AdditionalColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
char _separatorForObject = ':';
|
|
||||||
return $"{base.ToString()}{_separatorForObject}{AdditionalColor.Name}" +
|
|
||||||
$"{_separatorForObject}{BodyKit}{_separatorForObject}{Tent}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
using DumpTruck.DrawningObjects;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using DumpTruck.Entities;
|
|
||||||
|
|
||||||
namespace DumpTruck
|
|
||||||
{
|
|
||||||
public static class ExtentionDrawningCarDop
|
|
||||||
{
|
|
||||||
public static DrawningCar? CreateDrawningCarDop(this string info, char
|
|
||||||
separatorForObject, int width, int height)
|
|
||||||
{
|
|
||||||
string[] strs = info.Split(separatorForObject);
|
|
||||||
if (strs.Length == 3)
|
|
||||||
{
|
|
||||||
return new DrawningCar(Convert.ToInt32(strs[0]),
|
|
||||||
Convert.ToInt32(strs[1]), Color.FromName(strs[2]), width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strs.Length == 6)
|
|
||||||
{
|
|
||||||
return new DrawningDumpTruck(Convert.ToInt32(strs[0]),
|
|
||||||
Convert.ToInt32(strs[1]),
|
|
||||||
Color.FromName(strs[2]),
|
|
||||||
Color.FromName(strs[3]),
|
|
||||||
Convert.ToBoolean(strs[4]),
|
|
||||||
Convert.ToBoolean(strs[5]), width, height);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetDataForSaveDop(this DrawningCar drawningCar,
|
|
||||||
char separatorForObject)
|
|
||||||
{
|
|
||||||
var car = drawningCar.EntityCar;
|
|
||||||
if (car == null)
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
|
||||||
var str = car.ToString();
|
|
||||||
if (car is not EntityDumpTruck dumpTruck)
|
|
||||||
{
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
return car.ToString();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user