[longomatch/redesign2: 119/140] Add the default team subcategory
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/redesign2: 119/140] Add the default team subcategory
- Date: Tue, 24 May 2011 22:06:06 +0000 (UTC)
commit 8f2fdcab6692ef2b9014849380d1cbb5609df4b1
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat Apr 9 20:23:30 2011 +0200
Add the default team subcategory
LongoMatch/Services/TemplatesService.cs | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch/Services/TemplatesService.cs b/LongoMatch/Services/TemplatesService.cs
index 37636e5..f46cbb0 100644
--- a/LongoMatch/Services/TemplatesService.cs
+++ b/LongoMatch/Services/TemplatesService.cs
@@ -35,6 +35,7 @@ namespace LongoMatch.Services
{
private Dictionary<Type, ITemplateProvider> dict;
private List<PlayerSubCategory> playerSubcatList;
+ private List<TeamSubCategory> teamSubcatList;
public TemplatesService (string basePath)
{
@@ -49,7 +50,8 @@ namespace LongoMatch.Services
new TemplatesProvider<Categories, Category> (basePath,
Constants.CAT_TEMPLATE_EXT));
CheckDefaultTemplates();
- CreateDefaultSubCategories();
+ CreateDefaultPlayerSubCategories();
+ CreateDefaultTeamSubCategories();
}
@@ -58,7 +60,7 @@ namespace LongoMatch.Services
t.CheckDefaultTemplate();
}
- private void CreateDefaultSubCategories () {
+ private void CreateDefaultPlayerSubCategories () {
PlayerSubCategory subcat;
/* Local team players */
@@ -81,6 +83,11 @@ namespace LongoMatch.Services
subcat.Add(Team.VISITOR);
playerSubcatList.Add(subcat);
}
+
+ private void CreateDefaultTeamSubCategories () {
+ teamSubcatList = new List<TeamSubCategory>();
+ teamSubcatList.Add(new TeamSubCategory());
+ }
public ITemplateProvider<T, U> GetTemplateProvider<T, U>() where T: ITemplate<U> {
if (dict.ContainsKey(typeof(T)))
@@ -119,6 +126,12 @@ namespace LongoMatch.Services
return playerSubcatList;
}
}
+
+ public List<TeamSubCategory> TeamSubcategories {
+ get{
+ return teamSubcatList;
+ }
+ }
}
public class TemplatesProvider<T, U>: ITemplateProvider<T, U> where T: ITemplate<U>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]