private void CreateAnimationSteps(string animationDescription)
{
_animationSteps.Steps.Clear();
string tempstr = animationDescription.Replace(System.Environment.NewLine, " ");
string[] entries = tempstr.Split(' ');
AnimationPoint currentAp = null;
string lastEntry = "";
foreach (string str in entries)
{
switch (str.ToLower())
{
case "run":
if (currentAp != null)
_animationSteps.Steps.Add(currentAp);
currentAp = new AnimationPoint();
break;
}
switch (lastEntry.ToLower())
{
case "steps":
if (currentAp != null)
currentAp.Steps = int.Parse(str);
break;
case "time":
if (currentAp != null)
currentAp.Time = int.Parse(str);
break;
case "file":
if (currentAp != null)
currentAp.fileName = str;
break;
}
lastEntry = str;
}
if (currentAp != null)
_animationSteps.Steps.Add(currentAp);
}