Exemple #1
0
        // Re/create observations list organised according to whether reverseSort true/false
        private void UpdateMainPageStackLayout()
        {
            observations = ObservationSerialization.LoadObservationListFromPreferences();
            if (reverseSort)
            {
                observations.Reverse();
            }

            CreateObservationLabels();
        }
Exemple #2
0
        // Handle save new Observation object data to Preferences, notify MainPage view when done via message
        private async void OnButtonSaveClickedAsync(object sender, EventArgs args)
        {
            species = Species.Text;
            notes   = Notes.Text;

            // Handle create Observation object, convert to JSON, save to Preferences
            Observation newObservation = CreateObservationObject(species, notes, rarity);

            ObservationSerialization.SaveObservationToPreferences(newObservation);

            NotifyObjectDataSaved();

            await Navigation.PopAsync();
        }