Fractrace.Animation.AnimationControl.CreateAnimationSteps C# (CSharp) Method

CreateAnimationSteps() private method

Create animation info from string.
private CreateAnimationSteps ( string animationDescription ) : void
animationDescription string
return void
        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);
        }