Exemplo n.º 1
0
        public void RemoveEvent(Event e)
        {
            SlettetEvents.Add(e);
            Events.Remove(e);

            PersistencyService.SaveEventsAsJsonAsync(Events);
            PersistencyServiceDeletet.SaveEventsAsJsonAsync(SlettetEvents);
        }
Exemplo n.º 2
0
        public async void LoadEventsAsyncFromDeletedEvents()
        {
            var events = await PersistencyServiceDeletet.LoadEventsFromJsonAsync();

            if (events != null)
            {
                foreach (var ev in events)
                {
                    SlettetEvents.Add(ev);
                }
            }

            else
            {
                Event OpretEvent = new Event(2, "Dummie date. Navn her", "Dummie data. Forklaring her, slettet event", "Dummie data. Sted her", new DateTime(2018, 08, 12, 10, 21, 15));


                SlettetEvents.Add(OpretEvent);
                PersistencyServiceDeletet.SaveEventsAsJsonAsync(Events);
            }
        }