[longomatch/redesign3: 95/156] Add a count paramter to create new templates



commit 80c1be145208e5124264ac2c907331cda120d1fa
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Mar 30 22:09:14 2011 +0200

    Add a count paramter to create new templates

 LongoMatch/Store/Templates/CategoriesTemplate.cs  |    8 ++++----
 LongoMatch/Store/Templates/SubCategoryTemplate.cs |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/LongoMatch/Store/Templates/CategoriesTemplate.cs b/LongoMatch/Store/Templates/CategoriesTemplate.cs
index efabd74..44bdd68 100644
--- a/LongoMatch/Store/Templates/CategoriesTemplate.cs
+++ b/LongoMatch/Store/Templates/CategoriesTemplate.cs
@@ -57,18 +57,18 @@ namespace LongoMatch.Store.Templates
 			return SerializableObject.Load<Categories>(filePath);
 		}
 
-		public static Categories DefaultTemplate() {
+		public static Categories DefaultTemplate(int count) {
 			Categories defaultTemplate = new Categories();
-			defaultTemplate.FillDefaultTemplate();
+			defaultTemplate.FillDefaultTemplate(count);
 			return defaultTemplate;
 		}
 
-		private void FillDefaultTemplate() {
+		private void FillDefaultTemplate(int count) {
 			Color c = new Color((Byte)255, (Byte)0, (Byte)0);
 			HotKey h = new HotKey();
 
 
-			for(int i=1; i<=20; i++) {
+			for(int i=1; i<=count; i++) {
 				PlayerSubCategory localplayers, visitorplayers;
 				TeamSubCategory team;
 
diff --git a/LongoMatch/Store/Templates/SubCategoryTemplate.cs b/LongoMatch/Store/Templates/SubCategoryTemplate.cs
index c627b35..8f2524c 100644
--- a/LongoMatch/Store/Templates/SubCategoryTemplate.cs
+++ b/LongoMatch/Store/Templates/SubCategoryTemplate.cs
@@ -39,7 +39,7 @@ namespace LongoMatch.Store.Templates
 			return SerializableObject.Load<SubCategoryTemplate>(filePath);
 		}
 		
-		public static SubCategoryTemplate DefaultTemplate (int count) {
+		public static SubCategoryTemplate DefaultTemplate (int not_used) {
 			SubCategoryTemplate template = new SubCategoryTemplate();
 			return template;
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]