private void savePlayList(ObservableCollection <PlayListCollection> playListCollections) { if (this.profile.HasValue) { List <Profile> profiles = ManagementSave.loadProfilesJSON(); int index = profiles.FindIndex(p => p.name == this.profile?.name && p.password == this.profile?.password); if (index == -1) { return; } profiles[index] = new Profile(this.profile?.name, this.profile?.password, playListCollections); ManagementSave.saveProfilesJSON(profiles); } }
public AuthPage() { InitializeComponent(); this.profiles = ManagementSave.loadProfilesJSON(); }