Exemple #1
0
        private async void LoadPresentations()
        {
            PresentationList.ClearValue(ItemsControl.ItemsSourceProperty);
            PresentationList.DisplayMemberPath = "PresentationDesc";
            PresentationList.SelectedValuePath = "PresentationId";
            if (SessionList.SelectedIndex >= 0)
            {
                if (SessionComboBox.SelectedIndex != 0)
                {
                    PresentationList.ItemsSource = (await presentationCore.GetPresentationsByIdAsync(UserCredentials.Conference.ConferenceId))
                                                   .Where(s => s.SpecialSessionId.HasValue &&
                                                          s.SpecialSessionId.Value == (int)SessionList.SelectedValue);
                    var award = await core.GetAwardForSessionAsync(null, (int)SessionList.SelectedValue);

                    if (award != null)
                    {
                        PresentationList.SelectedValue = award.PresentationId;
                    }
                    else
                    {
                        PresentationList.SelectedIndex = -1;
                    }
                }
                else
                {
                    PresentationList.ItemsSource = (await presentationCore.GetPresentationsByIdAsync(UserCredentials.Conference.ConferenceId))
                                                   .Where(s => s.SessionId.HasValue &&
                                                          s.SessionId.Value == (int)SessionList.SelectedValue);
                    var award = await core.GetAwardForSessionAsync((int)SessionList.SelectedValue, null);

                    if (award != null)
                    {
                        PresentationList.SelectedValue = award.PresentationId;
                    }
                    else
                    {
                        PresentationList.SelectedIndex = -1;
                    }
                }
            }
        }
 private void LoadPresentationItem()
 {
     PresentationList = LoadPresentationItem(DemoType.Presentation);
     _eventAggregator.GetEvent <LoadPresentationCompletedEvent>().Publish(PresentationList.Select(item => item.Presentation).ToList());
 }
 public FlashCardModel(IFlashCard card)
     : base(card)
 {
     IList list = new ArrayList();
     foreach (IFlashCardItem item in card.Answers)
         list.Add(item);
     _answers = new PresentationList<FlashCardItemModel>(list);
     card.StatusChanged += new StatusChangedHandler(card_StatusChanged);
 }