-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataModel.cs
50 lines (42 loc) · 1.05 KB
/
DataModel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
namespace TheraWii
{
public class DataModel
{
private List<Therapy> therapies;
private List<Profile> profiles;
public bool PlayFullscreen;
public DataModel()
{
therapies = new List<Therapy>();
profiles = new List<Profile>();
PlayFullscreen = false;
}
public List<Therapy> Therapies
{
get { return therapies; }
}
public List<Profile> Profiles
{
get { return profiles; }
}
public void removeTherapy(Therapy t)
{
therapies.Remove(t);
}
public void removeProfile(Profile p)
{
profiles.Remove(p);
}
public bool isProfileNameUnique(String s)
{
foreach (Profile p in profiles)
{
if (p.Name == s)
return false;
}
return true;
}
}
}