You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
945 B
35 lines
945 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Collections.ObjectModel;
|
|
|
|
namespace Model
|
|
{
|
|
public class Manager
|
|
{
|
|
public ReadOnlyObservableCollection<Carte> SomeCartes { get; private set; }
|
|
private readonly ObservableCollection<Carte> someCartes = new ObservableCollection<Carte>();
|
|
|
|
private IDataManager DataMgr { get; set; }
|
|
public Manager()
|
|
{
|
|
SomeCartes = new(someCartes);
|
|
}
|
|
public bool AddCarte(Carte carte)
|
|
{
|
|
if (someCartes.Contains(carte)) return false;
|
|
someCartes.Add(carte);
|
|
return true;
|
|
}
|
|
|
|
public bool RemoveCarte(Carte carte)
|
|
{
|
|
if (!someCartes.Contains(carte)) { return false; }
|
|
someCartes.Remove(carte);
|
|
return true;
|
|
}
|
|
}
|
|
}
|