public TrackingSelectPage(Models.UserInfo createdUser)
        {
            InitializeComponent();

            // Set user profile to in-progress profile from previous page
            inProgressUser = createdUser;
        }
        public void CreateUser(Models.UserInfo user)
        {
            try
            {
                conn.Insert(user);

                Console.WriteLine("Created new user!");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Failed to initialize new user.\nError message: {ex}");
            }
        }
Beispiel #3
0
        private async void starterPlantSelectProceedButton_Clicked(object sender, EventArgs e)
        {
            // Extract name to store of starter plant from current source
            string starterPlant = plantImageSources[currPlantImageSource].Substring(plantImageSources[currPlantImageSource].IndexOf("_") + 1);

            starterPlant = starterPlant.Remove(starterPlant.IndexOf("."));

            // Create User profile based on plant selection
            Models.UserInfo newUser = new Models.UserInfo
            {
                Name         = userName,
                StarterPlant = starterPlant
            };

            // Navigate to tracking select page, sending over user information
            var nextPage = new TrackingSelectPage(newUser);

            await this.Navigation.PushAsync(nextPage);
        }