[longomatch] Remove unused Coordinates subcategories



commit cd13a3f687bd5bd779198e2ce5cd224fdb5b897d
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Jan 30 22:07:41 2014 +0100

    Remove unused Coordinates subcategories

 LongoMatch.Core/Interfaces/ITemplatesService.cs    |    2 -
 LongoMatch.GUI/Gui/Component/CategoryProperties.cs |   12 +--------
 LongoMatch.Services/Services/TemplatesService.cs   |   23 --------------------
 3 files changed, 2 insertions(+), 35 deletions(-)
---
diff --git a/LongoMatch.Core/Interfaces/ITemplatesService.cs b/LongoMatch.Core/Interfaces/ITemplatesService.cs
index d812e73..0dbf170 100644
--- a/LongoMatch.Core/Interfaces/ITemplatesService.cs
+++ b/LongoMatch.Core/Interfaces/ITemplatesService.cs
@@ -35,8 +35,6 @@ namespace LongoMatch.Interfaces
                List<PlayerSubCategory> PlayerSubcategories {get;}
                
                List<TeamSubCategory> TeamSubcategories {get;}
-               
-               List<CoordinatesSubCategory> CoordinatesSubcategories {get;}
        }
 }
 
diff --git a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs 
b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
index 0d07921..b23f86d 100644
--- a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
@@ -70,11 +70,10 @@ namespace LongoMatch.Gui.Component
                
                public void LoadSubcategories(ITemplatesService ts) {
                        subcategoriesProvider = ts.SubCategoriesTemplateProvider;
-                       LoadSubcategories(ts.PlayerSubcategories, ts.CoordinatesSubcategories);
+                       LoadSubcategories(ts.PlayerSubcategories);
                }
                
-               private void LoadSubcategories(List<PlayerSubCategory> playerSubcategories,
-                                              List<CoordinatesSubCategory> coordinatesSubcategories) {
+               private void LoadSubcategories(List<PlayerSubCategory> playerSubcategories) {
                        model = new ListStore(typeof(string), typeof(ISubCategory));
                        
                        model.AppendValues(Catalog.GetString("Create new..."), "");
@@ -92,13 +91,6 @@ namespace LongoMatch.Gui.Component
                                                                 subcat.Name),
                                                   subcat);
                        }
-                       /*foreach (CoordinatesSubCategory subcat in coordinatesSubcategories) {
-                               Log.Debug("Adding coordinates subcategory: ", subcat.Name);
-                               model.AppendValues(String.Format("[{0}] {1}", 
-                                                                Catalog.GetString("Coordinates"),
-                                                                subcat.Name),
-                                                  subcat);
-                       }*/
                        
                        subcatcombobox.Model = model;
                        var cell = new CellRendererText();
diff --git a/LongoMatch.Services/Services/TemplatesService.cs 
b/LongoMatch.Services/Services/TemplatesService.cs
index b05027a..ecfa00a 100644
--- a/LongoMatch.Services/Services/TemplatesService.cs
+++ b/LongoMatch.Services/Services/TemplatesService.cs
@@ -35,7 +35,6 @@ namespace LongoMatch.Services
                private Dictionary<Type, ITemplateProvider> dict;
                private List<PlayerSubCategory> playerSubcatList;
                private List<TeamSubCategory> teamSubcatList;
-               private List<CoordinatesSubCategory> coordinatesSubcatList;
                
                public TemplatesService (string basePath)
                {
@@ -46,8 +45,6 @@ namespace LongoMatch.Services
                        CheckDefaultTemplates();
                        CreateDefaultPlayerSubCategories();
                        CreateDefaultTeamSubCategories();
-                       CreateDefaultCoordinatesSubCategories();
-                       
                }
                
                private void CheckDefaultTemplates () {
@@ -79,20 +76,6 @@ namespace LongoMatch.Services
                        playerSubcatList.Add(subcat);
                }
                
-               private void CreateDefaultCoordinatesSubCategories () {
-                       CoordinatesSubCategory subcat;
-                       
-                       coordinatesSubcatList = new List<CoordinatesSubCategory>();
-                       
-                       /* Position */
-                       subcat = new CoordinatesSubCategory {Name=Catalog.GetString("Position"), 
FastTag=true, NumCoordinates=1};
-                       coordinatesSubcatList.Add(subcat);
-
-                       /* Trajectory */
-                       subcat = new CoordinatesSubCategory {Name=Catalog.GetString("Trajectory"), 
FastTag=true, NumCoordinates=2};
-                       coordinatesSubcatList.Add(subcat);
-               }
-
                private void CreateDefaultTeamSubCategories () {
                        teamSubcatList = new List<TeamSubCategory>();
                        teamSubcatList.Add(new TeamSubCategory());
@@ -133,12 +116,6 @@ namespace LongoMatch.Services
                                return teamSubcatList;
                        }
                }
-               
-               public List<CoordinatesSubCategory> CoordinatesSubcategories {
-                       get{
-                               return coordinatesSubcatList;
-                       }
-               }
        }
        
        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]