public async Task ExecuteLoadSessionCommandAsync()
        {
            if (IsBusy)
            {
                return;
            }

            try
            {
                IsBusy = true;


                IsReminderSet = await ReminderService.HasReminderAsync(Session.Id);

                Session.FeedbackLeft = await StoreManager.FeedbackStore.LeftFeedback(Session);
            }
            catch (Exception ex)
            {
                Logger.Report(ex, "Method", "ExecuteLoadSessionCommandAsync");
                MessagingService.Current.SendMessage(MessageKeys.Error, ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Exemple #2
0
        async Task ExecuteLoadEventDetailsCommandAsync()
        {
            if (IsBusy)
            {
                return;
            }

            try
            {
                IsBusy        = true;
                IsReminderSet = await ReminderService.HasReminderAsync("event_" + Event.Id);
            }
            catch (Exception ex)
            {
                Logger.Report(ex, "Method", "ExecuteLoadEventDetailsCommandAsync");
                MessagingService.Current.SendMessage(MessageKeys.Error, ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Exemple #3
0
        async Task ExecuteReminderCommandAsync()
        {
            if (!IsReminderSet)
            {
                var result = await ReminderService.AddReminderAsync("event_" + Event.Id,
                                                                    new Plugin.Calendars.Abstractions.CalendarEvent
                {
                    Description = Event.Description,
                    Location    = Event.LocationName,
                    AllDay      = Event.IsAllDay,
                    Name        = Event.Title,
                    Start       = Event.StartTime.Value,
                    End         = Event.EndTime.Value
                });


                if (!result)
                {
                    return;
                }

                Logger.Track(ConferenceLoggerKeys.ReminderAdded, "Title", Event.Title);
                IsReminderSet = true;
            }
            else
            {
                var result = await ReminderService.RemoveReminderAsync("event_" + Event.Id);

                if (!result)
                {
                    return;
                }
                Logger.Track(ConferenceLoggerKeys.ReminderRemoved, "Title", Event.Title);
                IsReminderSet = false;
            }
        }
        async Task ExecuteReminderCommandAsync()
        {
            if (!IsReminderSet)
            {
                var result = await ReminderService.AddReminderAsync(Session.Id,
                                                                    new Plugin.Calendars.Abstractions.CalendarEvent
                {
                    AllDay      = false,
                    Description = Session.Abstract,
                    Location    = Session.Room?.Name ?? string.Empty,
                    Name        = Session.Title,
                    Start       = Session.StartTime.Value,
                    End         = Session.EndTime.Value
                });


                if (!result)
                {
                    return;
                }

                Logger.Track(ConferenceLoggerKeys.ReminderAdded, "Title", Session.Title);
                IsReminderSet = true;
            }
            else
            {
                var result = await ReminderService.RemoveReminderAsync(Session.Id);

                if (!result)
                {
                    return;
                }
                Logger.Track(ConferenceLoggerKeys.ReminderRemoved, "Title", Session.Title);
                IsReminderSet = false;
            }
        }