NameUpdate
This commit is contained in:
parent
ab6ad40fb3
commit
123978bbf8
@ -16,14 +16,14 @@ namespace Lab
|
|||||||
if (strs.Length == 3)
|
if (strs.Length == 3)
|
||||||
{
|
{
|
||||||
return new DrawTanker(Convert.ToInt32(strs[0]),
|
return new DrawTanker(Convert.ToInt32(strs[0]),
|
||||||
Convert.ToInt32(strs[1]), Color.FromName(strs[2].Replace("Color [", "").Replace("]", "")), width, height);
|
Convert.ToInt32(strs[1]), Color.FromName(strs[2]), width, height);
|
||||||
}
|
}
|
||||||
if (strs.Length == 7)
|
if (strs.Length == 7)
|
||||||
{
|
{
|
||||||
return new DrawGasolineTanker(Convert.ToInt32(strs[0]),
|
return new DrawGasolineTanker(Convert.ToInt32(strs[0]),
|
||||||
Convert.ToInt32(strs[1]),
|
Convert.ToInt32(strs[1]),
|
||||||
Color.FromName(strs[2].Replace("Color [", "").Replace("]","")),
|
Color.FromName(strs[2]),
|
||||||
Color.FromName(strs[3].Replace("Color [", "").Replace("]","")),
|
Color.FromName(strs[3]),
|
||||||
Convert.ToBoolean(strs[4]),
|
Convert.ToBoolean(strs[4]),
|
||||||
Convert.ToBoolean(strs[5]),
|
Convert.ToBoolean(strs[5]),
|
||||||
Convert.ToBoolean(strs[6]), width, height);
|
Convert.ToBoolean(strs[6]), width, height);
|
||||||
@ -38,12 +38,12 @@ namespace Lab
|
|||||||
{
|
{
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
var str = $"{Tanker.Speed}{separatorForObject}{Tanker.Weight}{separatorForObject}{Tanker.BodyColor}";
|
var str = $"{Tanker.Speed}{separatorForObject}{Tanker.Weight}{separatorForObject}{Tanker.BodyColor.Name}";
|
||||||
if (Tanker is not GasolineTanker gasTanker)
|
if (Tanker is not GasolineTanker gasTanker)
|
||||||
{
|
{
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
return $"{str}{separatorForObject}{gasTanker.AdditionalColor}{separatorForObject}{gasTanker.BodyKit}{separatorForObject}{gasTanker.Wing}{separatorForObject}{gasTanker.SportLine}";
|
return $"{str}{separatorForObject}{gasTanker.AdditionalColor.Name}{separatorForObject}{gasTanker.BodyKit}{separatorForObject}{gasTanker.Wing}{separatorForObject}{gasTanker.SportLine}";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user