Пример #1
0
 private async void LoadJson()
 {
     try
     {
         EventsList = await PersistencyService.LoadEventsFromJsonAsync(FilNavn);
     }
     catch (Exception e)
     {
         Debug.WriteLine(e);
     }
 }
Пример #2
0
        public async void LoadEventsAsync()
        {
            List <Event> eventsFromFile = await PersistencyService.LoadEventsFromJsonAsync();

            if (eventsFromFile != null)
            {
                foreach (Event e in eventsFromFile)
                {
                    events.Add(e);
                }
            }
        }
Пример #3
0
        public async void LoadEventsAsync()
        {
            List <Event> loadedEvents = await PersistencyService.LoadEventsFromJsonAsync();

            if (loadedEvents != null)
            {
                foreach (Event e in loadedEvents)
                {
                    ObservableCollection.Add(e);
                }
            }
        }
Пример #4
0
        public async void LoadFile()
        {
            try
            {
                List <Event> listEventsLoaded = await PersistencyService.LoadEventsFromJsonAsync();

                if (listEventsLoaded != null)
                {
                    _events.Clear();
                    foreach (Event e in listEventsLoaded)
                    {
                        _events.Add(e);
                    }
                }
            }
            catch (Exception e)
            {
                throw new Exception("Load Events from Json Failed");
            }
        }
 public async void LoadEventAsync()
 {
     await PersistencyService.LoadEventsFromJsonAsync();
 }
Пример #6
0
 private async void LoadEventsAsync()
 {
     Events = await PersistencyService.LoadEventsFromJsonAsync() ?? new ObservableCollection <Event>();
 }
Пример #7
0
 public async void LoadEventsAsync()
 {
     _observableCollection = await PersistencyService.LoadEventsFromJsonAsync();
 }