private async void LoadProfiles()
        {
            var loadedProfiles = await ProfilePersistency.LoadProfilesFromJsonAsync();

            if (loadedProfiles != null)
            {
                ProfileRegister.DicProfile.Clear();
                foreach (var profile in loadedProfiles)
                {
                    ProfileRegister.DicProfile.Add(profile.Key, profile.Value);
                }
            }
        }
 public void AddCustomerWithProfile()
 {
     try
     {
         ProfileRegister.AddDicProfile(Username, Password);
         KundeRegister.AddKunde(Username, Password, Adress, Email, Name, Tlf);
         CheckRepeatPassword(Password, RepeatPassword);
         Dialog.Show("Profil er tilføjet");
     }
     catch (ArgumentException ex)
     {
         Dialog.Show(ex.Message);
     }
     ProfilePersistency.SaveProfilesAsJsonAsync(ProfileRegister.DicProfile);
     KundePersistency.SaveKunderAsJsonAsync(KundeRegister.Kunder);
 }