[longomatch/redesign: 51/96] Initialize default templates with teams and players subcategories
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/redesign: 51/96] Initialize default templates with teams and players subcategories
- Date: Tue, 29 Mar 2011 18:20:02 +0000 (UTC)
commit af94404030f998f48ac1f8f1548bc861003b7996
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Jan 27 00:40:24 2011 +0100
Initialize default templates with teams and players subcategories
LongoMatch/Store/Templates/CategoriesTemplate.cs | 40 ++++++++++++++++++-
.../Store/Templates/SubCategoriesTemplates.cs | 1 +
2 files changed, 38 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch/Store/Templates/CategoriesTemplate.cs b/LongoMatch/Store/Templates/CategoriesTemplate.cs
index 43554ca..1920117 100644
--- a/LongoMatch/Store/Templates/CategoriesTemplate.cs
+++ b/LongoMatch/Store/Templates/CategoriesTemplate.cs
@@ -21,6 +21,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using Gdk;
+using Mono.Unix;
using LongoMatch.Common;
namespace LongoMatch.Store.Templates
@@ -192,16 +193,49 @@ namespace LongoMatch.Store.Templates
Color c = new Color((Byte)255, (Byte)0, (Byte)0);
HotKey h = new HotKey();
+
for (int i=1; i<=20;i++) {
- AddCategory(new Category{
+ PlayerSubCategory localplayers, visitorplayers;
+ TeamSubCategory team;
+ List<Team> teams, lplayers, vplayers;
+
+ teams = new List<Team>();
+ teams.Add(Team.NONE);
+ teams.Add(Team.LOCAL);
+ teams.Add(Team.NONE);
+ team = new TeamSubCategory {
+ Name = Catalog.GetString("Team"),
+ Options = teams
+ };
+
+ lplayers = new List<Team>();
+ lplayers.Add(Team.LOCAL);
+ localplayers = new PlayerSubCategory {
+ Name = Catalog.GetString("Local Team Players"),
+ Options = lplayers,
+ };
+
+ vplayers = new List<Team>();
+ vplayers.Add(Team.VISITOR);
+ visitorplayers = new PlayerSubCategory {
+ Name = Catalog.GetString("Visitor Team Players"),
+ Options = vplayers,
+ };
+
+ Category cat = new Category{
Name = "Category " + i,
- Color = c,
+ Color = c,
Start = new Time{Seconds = 10},
Stop = new Time {Seconds = 10},
SortMethod = SortMethodType.SortByStartTime,
HotKey = h,
Position = i-1,
- });
+ FastTagSubCategories = true
+ };
+ cat.SubCategories.Add(team);
+ cat.SubCategories.Add(localplayers);
+ cat.SubCategories.Add(visitorplayers);
+ AddCategory(cat);
}
}
}
diff --git a/LongoMatch/Store/Templates/SubCategoriesTemplates.cs b/LongoMatch/Store/Templates/SubCategoriesTemplates.cs
index 90a659b..77ea499 100644
--- a/LongoMatch/Store/Templates/SubCategoriesTemplates.cs
+++ b/LongoMatch/Store/Templates/SubCategoriesTemplates.cs
@@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using LongoMatch.Common;
+using LongoMatch.Store;
namespace LongoMatch.Store.Templates
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]