internal bool IsLastShowingBreadcrumb(string breadcrumbId)
        {
            int  num    = -1;
            int  num2   = -1;
            bool result = false;

            for (int i = 0; i < breadcrumbPaths.Count; i++)
            {
                TutorialBreadcrumbPath tutorialBreadcrumbPath = breadcrumbPaths[i];
                for (int j = 0; j < tutorialBreadcrumbPath.Ids.Length; j++)
                {
                    if (onScreenBreadcrumbs.Contains(tutorialBreadcrumbPath.Ids[j]))
                    {
                        num = j;
                    }
                    if (tutorialBreadcrumbPath.Ids[j] == breadcrumbId)
                    {
                        num2 = j;
                    }
                }
                if (num2 == num && num != -1)
                {
                    result = true;
                    break;
                }
                num  = -1;
                num2 = -1;
            }
            return(result);
        }
        public override void OnEnter()
        {
            TutorialBreadcrumbPath path = new TutorialBreadcrumbPath(BreadcrumbPath);

            Service.Get <TutorialBreadcrumbController>().AddBreadcrumb(path);
            Finish();
        }
        private string convertBreadcrumbPathToString(TutorialBreadcrumbPath path)
        {
            StringBuilder stringBuilder = new StringBuilder();

            for (int i = 0; i < path.Ids.Length; i++)
            {
                stringBuilder.Append(path.Ids[i]);
            }
            return(stringBuilder.ToString());
        }
        internal void AddBreadcrumb(TutorialBreadcrumbPath path)
        {
            int num = hasBreadcrumb(path);

            if (num == -1)
            {
                breadcrumbPaths.Add(path);
                if (this.OnBreadcrumbsUpdated != null)
                {
                    this.OnBreadcrumbsUpdated();
                }
            }
        }
 public void RemoveBreadcrumb(string id)
 {
     for (int num = breadcrumbPaths.Count - 1; num >= 0; num--)
     {
         if (breadcrumbPaths[num].Ids[breadcrumbPaths[num].Ids.Length - 1] == id)
         {
             TutorialBreadcrumbPath tutorialBreadcrumbPath = breadcrumbPaths[num];
             breadcrumbPaths.RemoveAt(num);
             if (this.OnBreadcrumbsUpdated != null)
             {
                 this.OnBreadcrumbsUpdated();
             }
         }
     }
 }
        private int hasBreadcrumb(TutorialBreadcrumbPath path)
        {
            string text   = convertBreadcrumbPathToString(path);
            string text2  = "";
            int    result = -1;

            for (int i = 0; i < breadcrumbPaths.Count; i++)
            {
                text2 = convertBreadcrumbPathToString(breadcrumbPaths[i]);
                if (text == text2)
                {
                    result = i;
                    break;
                }
            }
            return(result);
        }