BExIS.Dcm.CreateDatasetWizard.CreateTaskmanager.GetX C# (CSharp) Метод

GetX() публичный Метод

public GetX ( StepInfo step, int position ) : int
step BExIS.Dcm.Wizard.StepInfo
position int
Результат int
        public int GetX(StepInfo step, int position)
        {
            StepInfo parent = step.Parent;

            if (IsRoot(parent))
            {
                int stepIndex = parent.Children.IndexOf(step);

                for (int i = 0; i < stepIndex; i++)
                {
                    position += countSteps(parent.Children.ElementAt(i))+1;
                }
            }
            else
            {
                position += parent.Children.IndexOf(step) + 1;
                position = GetX(parent, position);
            }

            return position;
        }