Example #1
0
        public async Task LoadExhibitsAsync()
        {
            _cancellationTokenSource = new CancellationTokenSource();
            var stand = await DependencyService.Get <ContentLoaderService>().LoadStandAsync(_hallId, _standId, _cancellationTokenSource.Token);

            Title = $"{stand.Title} - {AppResources.StandPage_Title}";
            Exhibits.Clear();
            foreach (var exhibit in stand.Exhibits)
            {
                if (string.IsNullOrEmpty(exhibit.Title))
                {
                    continue;
                }
                Exhibits.Add(exhibit);
            }
            if (Exhibits.Count == 0)
            {
                await Application.Current.MainPage.DisplayAlert(AppResources.MessageBox_TitleAlert, AppResources.ErrorMessage_InProgress, AppResources.MessageBox_ButtonOk);

                await Navigation.PopAsync();
            }
            else
            {
                SetHeight(Exhibits.Count);
                ContentVisibility = true;
            }
        }
Example #2
0
 public Wing(string name, params Exhibit[] exhibits)
 {
     Name = name;
     foreach (Exhibit exhibit in exhibits)
     {
         Exhibits.Add(exhibit);
     }
 }
Example #3
0
 public Route(RouteArgs args)
 {
     Title       = args.Title;
     Description = args.Description;
     Duration    = args.Duration;
     Distance    = args.Distance;
     Image.Id    = args.Image;
     Audio.Id    = args.Audio;
     Exhibits.Add(args.Exhibits?.Select(id => (BsonValue)id));
     Status = args.Status;
     Tags.Add(args.Tags?.Select(id => (BsonValue)id));
 }