コード例 #1
0
 public void UpdateState(WizardPage currentPage, WizardPage destinationPage, bool movingNext)
 {
     for (int index = 0; index < this._breadcrumbs.Count; ++index)
     {
         Breadcrumb breadcrumb = this._breadcrumbs[index];
         if (breadcrumb.Page == currentPage)
         {
             if (!movingNext)
             {
                 this._breadcrumbs[index].Active = false;
                 if (index > 0)
                 {
                     this._breadcrumbs[index - 1].Complete = false;
                 }
             }
         }
         else if (breadcrumb.Page == destinationPage)
         {
             this._breadcrumbs[index].Active = true;
             if (movingNext)
             {
                 if (index > 0)
                 {
                     this._breadcrumbs[index - 1].Complete = true;
                 }
             }
             else
             {
                 this._breadcrumbs[index].Complete = false;
             }
         }
     }
 }
コード例 #2
0
 public void AddCrumb(Breadcrumb breadcrumb)
 {
     if (this._breadcrumbs == null)
     {
         this._breadcrumbs = new List <Breadcrumb>();
         breadcrumb.Active = true;
     }
     this._breadcrumbs.Add(breadcrumb);
 }