Пример #1
0
 /**
  * populateBeartracks
  * Since pathways can be varied, beartracks are not stored locally
  * reloads beartracks into the navigation bar
  * @param name="tracks"
  */
 public void populateBeartracks(Stack <LevelPage> tracks)
 {
     if (!(tracks == null || tracks.Count == 0))
     {
         LevelPage[] arr_tracks = new LevelPage[tracks.Count];
         tracks.CopyTo(arr_tracks, 0);
         int lasttrack = 4;
         for (int i = arr_tracks.Length; lasttrack != 0 && i > 0; i--)
         {
             lasttrack--;
             sl_tracks.Children.Add(new BearTrack(arr_tracks[i - 1]));
         }
     }
 }
Пример #2
0
 public BearTrack(LevelPage page) : base()
 {
     _page           = page;
     Text            = "UKN";
     BackgroundColor = Route.PrimaryColor;
     TextColor       = Route.SecondaryColor;
     if (page.Title != null)
     {
         Text = page.Title.Substring(0, (page.Title.Length > 3 ? 4 : page.Title.Length));
     }
     Clicked += delegate
     {
         Route.goBack(this);
     };
     this.VerticalOptions = LayoutOptions.Start;
 }