[longomatch] Rename TeamTemplate to Team and Team enum to TeamType



commit f2785f6da83c53a38db2e7ffb74a28f55f86c1ae
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Mar 16 15:13:04 2015 +0100

    Rename TeamTemplate to Team and Team enum to TeamType

 LongoMatch.Core/Common/Enums.cs                    |    3 +-
 LongoMatch.Core/Common/EventsBroker.cs             |    6 +-
 LongoMatch.Core/Handlers/Handlers.cs               |    6 +-
 LongoMatch.Core/Interfaces/GUI/IAnalysisWindow.cs  |    2 +-
 LongoMatch.Core/Interfaces/ITemplates.cs           |    2 +-
 LongoMatch.Core/LongoMatch.Core.csproj             |    2 +-
 LongoMatch.Core/Makefile.am                        |    2 +-
 LongoMatch.Core/Stats/EventTypeStats.cs            |   14 ++--
 LongoMatch.Core/Stats/ProjectStats.cs              |    4 +-
 LongoMatch.Core/Stats/TeamStats.cs                 |    8 +-
 LongoMatch.Core/Stats/TimerStats.cs                |    4 +-
 LongoMatch.Core/Store/Project.cs                   |   48 ++++++------
 .../Store/Templates/{TeamTemplate.cs => Team.cs}   |   80 +++++++++++---------
 LongoMatch.Core/Store/TimelineEvent.cs             |    2 +-
 LongoMatch.Core/Store/Timer.cs                     |    4 +-
 LongoMatch.Drawing/CanvasObjects/FieldObject.cs    |   12 ++--
 LongoMatch.Drawing/CanvasObjects/PlayObject.cs     |    6 +-
 LongoMatch.Drawing/CanvasObjects/PlayerObject.cs   |    4 +-
 .../CanvasObjects/PlayersTaggerObject.cs           |   42 +++++-----
 LongoMatch.Drawing/CanvasObjects/PositionObject.cs |    6 +-
 LongoMatch.Drawing/Widgets/DashboardCanvas.cs      |    6 +-
 LongoMatch.Drawing/Widgets/TeamTagger.cs           |   14 ++--
 LongoMatch.GUI/Gui/Component/AnalysisComponent.cs  |    2 +-
 LongoMatch.GUI/Gui/Component/CategoryProperties.cs |    2 +-
 LongoMatch.GUI/Gui/Component/CodingWidget.cs       |    6 +-
 LongoMatch.GUI/Gui/Component/DashboardWidget.cs    |    2 +-
 LongoMatch.GUI/Gui/Component/EventsListWidget.cs   |    4 +-
 .../Gui/Component/FakeAnalysisComponent.cs         |    2 +-
 .../Gui/Component/PlayersListTreeWidget.cs         |    4 +-
 .../Gui/Component/PlaysCoordinatesTagger.cs        |    4 +-
 LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs |    6 +-
 LongoMatch.GUI/Gui/Component/TeamsComboBox.cs      |   10 +-
 LongoMatch.GUI/Gui/Dialog/PlayEditor.cs            |    2 +-
 LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs   |   10 +-
 LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs        |   28 ++++----
 LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs    |   14 ++--
 .../Gui/TreeView/PlayersFilterTreeView.cs          |    2 +-
 LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs     |    4 +-
 LongoMatch.Migration/Converter.cs                  |    6 +-
 LongoMatch.Plugins.Stats/Stats/CategoryViewer.cs   |    6 +-
 LongoMatch.Plugins.Stats/Stats/GameViewer.cs       |    4 +-
 .../Stats/PlayerCategoryViewer.cs                  |    2 +-
 LongoMatch.Plugins.Stats/Stats/PlayersViewer.cs    |    2 +-
 LongoMatch.Plugins.Stats/Stats/Plotter.cs          |   24 +++---
 LongoMatch.Plugins/CSVExporter.cs                  |    8 +-
 LongoMatch.Services/Services/EventsManager.cs      |    4 +-
 LongoMatch.Services/Services/HotKeysManager.cs     |    6 +-
 LongoMatch.Services/Services/TemplatesService.cs   |    6 +-
 Tests/Core/Store/Templates/TestTeamTemplate.cs     |   20 +++---
 Tests/Core/Store/TestPlaysFilter.cs                |    4 +-
 Tests/Core/Store/TestProject.cs                    |    4 +-
 Tests/Core/Store/TestTimelineEvent.cs              |    2 +-
 Tests/Core/Store/TestTimer.cs                      |    2 +-
 53 files changed, 244 insertions(+), 235 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Enums.cs b/LongoMatch.Core/Common/Enums.cs
index 30a870e..223b360 100644
--- a/LongoMatch.Core/Common/Enums.cs
+++ b/LongoMatch.Core/Common/Enums.cs
@@ -69,7 +69,8 @@ namespace LongoMatch.Core.Common
                SortByCompetition = 4
        }
 
-       public enum Team {
+       public enum TeamType
+       {
                NONE = 0,
                LOCAL = 1,
                VISITOR = 2,
diff --git a/LongoMatch.Core/Common/EventsBroker.cs b/LongoMatch.Core/Common/EventsBroker.cs
index bb7bb8d..f96f574 100644
--- a/LongoMatch.Core/Common/EventsBroker.cs
+++ b/LongoMatch.Core/Common/EventsBroker.cs
@@ -95,7 +95,7 @@ namespace LongoMatch.Core.Common
                public event SeekEventHandler SeekEvent;
                public event TogglePlayEventHandler TogglePlayEvent;
 
-               public void EmitNewTag (EventType eventType, List<Player> players = null, Team team = 
Team.NONE,
+               public void EmitNewTag (EventType eventType, List<Player> players = null, TeamType team = 
TeamType.NONE,
                                        List<Tag> tags = null, Time start = null, Time stop = null,
                                        Time eventTime = null, Score score = null, PenaltyCard card = null) {
                        if (NewTagEvent != null)
@@ -387,8 +387,8 @@ namespace LongoMatch.Core.Common
                
                public void EmitPressButton (DashboardButton button) {
                }
-               
-               public void EmitSubstitutionEvent (TeamTemplate team, Player p1, Player p2,
+
+               public void EmitSubstitutionEvent (Team team, Player p1, Player p2,
                                                   SubstitutionReason reason, Time time)
                {
                        if (PlayerSubstitutionEvent != null) {
diff --git a/LongoMatch.Core/Handlers/Handlers.cs b/LongoMatch.Core/Handlers/Handlers.cs
index bc7ad8d..4c1d688 100644
--- a/LongoMatch.Core/Handlers/Handlers.cs
+++ b/LongoMatch.Core/Handlers/Handlers.cs
@@ -36,7 +36,7 @@ namespace LongoMatch.Core.Handlers
        /* An event has been created */
        public delegate void EventCreatedHandler (TimelineEvent evt);
        /* A new play needs to be create for a specific category at the current play time */
-       public delegate void NewEventHandler (EventType eventType,List<Player> players, Team team,
+       public delegate void NewEventHandler (EventType eventType,List<Player> players, TeamType team,
                                              List<Tag> tags,Time start,Time stop, Time EventTime,
                                              Score score, PenaltyCard card);
        /* Add a new play to the current project */
@@ -114,9 +114,9 @@ namespace LongoMatch.Core.Handlers
        public delegate void PlayerPropertiesHandler (Player player);
        public delegate void PlayersPropertiesHandler (List<Player> players);
        /* Players selection */
-       public delegate void PlayersSubstitutionHandler (TeamTemplate team, Player p1, Player p2, 
SubstitutionReason reason, Time time);
+       public delegate void PlayersSubstitutionHandler (Team team, Player p1, Player p2, SubstitutionReason 
reason, Time time);
        public delegate void PlayersSelectionChangedHandler (List<Player> players);
-       public delegate void TeamSelectionChangedHandler (Team team);
+       public delegate void TeamSelectionChangedHandler (TeamType team);
        /* A list of projects have been selected */
        public delegate void ProjectsSelectedHandler (List<ProjectDescription> projects);
        public delegate void ProjectSelectedHandler (ProjectDescription project);
diff --git a/LongoMatch.Core/Interfaces/GUI/IAnalysisWindow.cs 
b/LongoMatch.Core/Interfaces/GUI/IAnalysisWindow.cs
index 98ed9bb..b82f1de 100644
--- a/LongoMatch.Core/Interfaces/GUI/IAnalysisWindow.cs
+++ b/LongoMatch.Core/Interfaces/GUI/IAnalysisWindow.cs
@@ -42,7 +42,7 @@ namespace LongoMatch.Core.Interfaces.GUI
                void ShowZonalTags ();
                void ClickButton (DashboardButton button, Tag tag = null);
                void TagPlayer (Player player);
-               void TagTeam (Team team);
+               void TagTeam (TeamType team);
                
                IPlayerBin Player{get;}
                ICapturerBin Capturer{get;}
diff --git a/LongoMatch.Core/Interfaces/ITemplates.cs b/LongoMatch.Core/Interfaces/ITemplates.cs
index b11b7c5..621e0fd 100644
--- a/LongoMatch.Core/Interfaces/ITemplates.cs
+++ b/LongoMatch.Core/Interfaces/ITemplates.cs
@@ -48,6 +48,6 @@ namespace LongoMatch.Core.Interfaces
        }
        
        public interface ICategoriesTemplatesProvider: ITemplateProvider<Dashboard> {}
-       public interface ITeamTemplatesProvider: ITemplateProvider<TeamTemplate> {}
+       public interface ITeamTemplatesProvider: ITemplateProvider<Team> {}
 }
 
diff --git a/LongoMatch.Core/LongoMatch.Core.csproj b/LongoMatch.Core/LongoMatch.Core.csproj
index 9055417..fd49de9 100644
--- a/LongoMatch.Core/LongoMatch.Core.csproj
+++ b/LongoMatch.Core/LongoMatch.Core.csproj
@@ -41,7 +41,6 @@
     <Compile Include="Store\Time.cs" />
     <Compile Include="Store\TimeNode.cs" />
     <Compile Include="Store\Templates\Dashboard.cs" />
-    <Compile Include="Store\Templates\TeamTemplate.cs" />
     <Compile Include="Interfaces\ITemplates.cs" />
     <Compile Include="Store\MediaFile.cs" />
     <Compile Include="Handlers\Handlers.cs" />
@@ -137,6 +136,7 @@
     <Compile Include="Common\Utils.cs" />
     <Compile Include="Interfaces\IStorage.cs" />
     <Compile Include="Interfaces\IStorable.cs" />
+    <Compile Include="Store\Templates\Team.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Common\" />
diff --git a/LongoMatch.Core/Makefile.am b/LongoMatch.Core/Makefile.am
index 033e372..3085c86 100644
--- a/LongoMatch.Core/Makefile.am
+++ b/LongoMatch.Core/Makefile.am
@@ -105,7 +105,7 @@ SOURCES = Common/Area.cs \
        Store/Score.cs \
        Store/Tag.cs \
        Store/Templates/Dashboard.cs \
-       Store/Templates/TeamTemplate.cs \
+       Store/Templates/Team.cs \
        Store/Time.cs \
        Store/TimeNode.cs \
        Store/TimelineEvent.cs \
diff --git a/LongoMatch.Core/Stats/EventTypeStats.cs b/LongoMatch.Core/Stats/EventTypeStats.cs
index affcfde..8929c27 100644
--- a/LongoMatch.Core/Stats/EventTypeStats.cs
+++ b/LongoMatch.Core/Stats/EventTypeStats.cs
@@ -42,8 +42,8 @@ namespace LongoMatch.Core.Stats
                public void Update ()
                {
                        events = project.EventsByType (eventType).Where (filter.IsVisible).ToList ();
-                       homeEvents = events.Where (e => project.EventTaggedTeam (e) == Team.LOCAL).ToList ();
-                       awayEvents = events.Where (e => project.EventTaggedTeam (e) == Team.VISITOR).ToList 
();
+                       homeEvents = events.Where (e => project.EventTaggedTeam (e) == TeamType.LOCAL).ToList 
();
+                       awayEvents = events.Where (e => project.EventTaggedTeam (e) == 
TeamType.VISITOR).ToList ();
                        TotalCount = events.Count;
                        LocalTeamCount = homeEvents.Count;
                        VisitorTeamCount = awayEvents.Count;
@@ -77,13 +77,13 @@ namespace LongoMatch.Core.Stats
                        }
                }
 
-               public bool HasPositionTags (Team team)
+               public bool HasPositionTags (TeamType team)
                {
                        List<TimelineEvent> evts = EventsForTeam (team);
                        return evts.Count (e => e.FieldPosition != null || e.HalfFieldPosition != null || 
e.GoalPosition != null) != 0; 
                }
 
-               public List<Coordinates> GetFieldCoordinates (Team team, FieldPositionType pos)
+               public List<Coordinates> GetFieldCoordinates (TeamType team, FieldPositionType pos)
                {
                        List<TimelineEvent> evts = EventsForTeam (team);
                        
@@ -97,15 +97,15 @@ namespace LongoMatch.Core.Stats
                        }
                }
 
-               List<TimelineEvent> EventsForTeam (Team team)
+               List<TimelineEvent> EventsForTeam (TeamType team)
                {
                        List<TimelineEvent> evts;
                        
                        switch (team) {
-                       case Team.LOCAL:
+                       case TeamType.LOCAL:
                                evts = homeEvents;
                                break;
-                       case Team.VISITOR:
+                       case TeamType.VISITOR:
                                evts = awayEvents;
                                break;
                        default:
diff --git a/LongoMatch.Core/Stats/ProjectStats.cs b/LongoMatch.Core/Stats/ProjectStats.cs
index 8a087ee..b4c911f 100644
--- a/LongoMatch.Core/Stats/ProjectStats.cs
+++ b/LongoMatch.Core/Stats/ProjectStats.cs
@@ -99,8 +99,8 @@ namespace LongoMatch.Core.Stats
                                TimersStats.Add (new TimerStats (project, t));
                        }
 
-                       HomeTeamStats = new TeamStats (project, filter, Team.LOCAL);
-                       AwayTeamStats = new TeamStats (project, filter, Team.VISITOR);
+                       HomeTeamStats = new TeamStats (project, filter, TeamType.LOCAL);
+                       AwayTeamStats = new TeamStats (project, filter, TeamType.VISITOR);
                        UpdateStats ();
                }
 
diff --git a/LongoMatch.Core/Stats/TeamStats.cs b/LongoMatch.Core/Stats/TeamStats.cs
index 4e5dfb6..a2ba48d 100644
--- a/LongoMatch.Core/Stats/TeamStats.cs
+++ b/LongoMatch.Core/Stats/TeamStats.cs
@@ -26,16 +26,16 @@ namespace LongoMatch.Core.Stats
        public class TeamStats
        {
                Project project;
-               TeamTemplate template;
-               Team team;
+               Team template;
+               TeamType team;
                EventsFilter filter;
                
-               public TeamStats (Project project, EventsFilter filter, Team team)
+               public TeamStats (Project project, EventsFilter filter, TeamType team)
                {
                        this.project = project;
                        this.filter = filter;
                        this.team = team;
-                       if (team == Team.LOCAL) {
+                       if (team == TeamType.LOCAL) {
                                this.template = project.LocalTeamTemplate;
                        } else {
                                this.template = project.VisitorTeamTemplate;
diff --git a/LongoMatch.Core/Stats/TimerStats.cs b/LongoMatch.Core/Stats/TimerStats.cs
index a2157de..08e439a 100644
--- a/LongoMatch.Core/Stats/TimerStats.cs
+++ b/LongoMatch.Core/Stats/TimerStats.cs
@@ -31,9 +31,9 @@ namespace LongoMatch.Core.Stats
                {
                        this.timer = timer;
                        Name = timer.Name;
-                       if (timer.Team == Team.LOCAL) {
+                       if (timer.Team == TeamType.LOCAL) {
                                TeamImage = project.LocalTeamTemplate.Shield;
-                       } else if (timer.Team == Team.VISITOR) {
+                       } else if (timer.Team == TeamType.VISITOR) {
                                TeamImage = project.VisitorTeamTemplate.Shield;
                        }
                }
diff --git a/LongoMatch.Core/Store/Project.cs b/LongoMatch.Core/Store/Project.cs
index d55ba30..dc85791 100644
--- a/LongoMatch.Core/Store/Project.cs
+++ b/LongoMatch.Core/Store/Project.cs
@@ -56,8 +56,8 @@ namespace LongoMatch.Core.Store
                        ID = System.Guid.NewGuid();
                        Timeline = new List<TimelineEvent>();
                        Dashboard = new Dashboard();
-                       LocalTeamTemplate = new TeamTemplate();
-                       VisitorTeamTemplate = new TeamTemplate();
+                       LocalTeamTemplate = new Team();
+                       VisitorTeamTemplate = new Team();
                        Timers = new List<Timer> ();
                        Periods = new List<Period> ();
                        Playlists = new List<Playlist> ();
@@ -111,7 +111,7 @@ namespace LongoMatch.Core.Store
                /// Local team template
                /// </value>
                [JsonProperty(Order = -9)]
-               public TeamTemplate LocalTeamTemplate {
+               public Team LocalTeamTemplate {
                        get;
                        set;
                }
@@ -120,7 +120,7 @@ namespace LongoMatch.Core.Store
                /// Visitor team template
                /// </value>
                [JsonProperty(Order = -8)]
-               public TeamTemplate VisitorTeamTemplate {
+               public Team VisitorTeamTemplate {
                        get;
                        set;
                }
@@ -218,8 +218,8 @@ namespace LongoMatch.Core.Store
                }
 
                public void UpdateScore () {
-                       Description.LocalGoals = GetScore (Team.LOCAL);
-                       Description.VisitorGoals = GetScore (Team.VISITOR);
+                       Description.LocalGoals = GetScore (TeamType.LOCAL);
+                       Description.VisitorGoals = GetScore (TeamType.VISITOR);
                }
 
                public TimelineEvent AddEvent (EventType type, Time start, Time stop, Time eventTime, Image 
miniature,
@@ -328,17 +328,17 @@ namespace LongoMatch.Core.Store
                        EventTypes = EventTypes.Where (e => e != null).ToList ();
                }
 
-               public SubstitutionEvent SubsitutePlayer (TeamTemplate template, Player playerIn, Player 
playerOut,
+               public SubstitutionEvent SubsitutePlayer (Team template, Player playerIn, Player playerOut,
                                                          SubstitutionReason reason, Time subsTime)
                {
-                       Team team;
+                       TeamType team;
                        LineupEvent lineup;
                        SubstitutionEvent se;
                        
                        if (template == LocalTeamTemplate) {
-                               team = Team.LOCAL;
+                               team = TeamType.LOCAL;
                        } else {
-                               team = Team.VISITOR;
+                               team = TeamType.VISITOR;
                        }
                        lineup = Timeline.OfType<LineupEvent> ().FirstOrDefault ();
                        if (lineup == null) {
@@ -364,7 +364,7 @@ namespace LongoMatch.Core.Store
                                         out List<Player> awayFieldPlayers,
                                         out List<Player> awayBenchPlayers)
                {
-                       TeamTemplate homeTeam, awayTeam;
+                       Team homeTeam, awayTeam;
                        List<Player> homeTeamPlayers, awayTeamPlayers;
 
                        homeTeamPlayers = Lineup.HomeStartingPlayers.Concat (Lineup.HomeBenchPlayers).ToList 
();
@@ -373,7 +373,7 @@ namespace LongoMatch.Core.Store
                        foreach (SubstitutionEvent ev in Timeline.OfType<SubstitutionEvent> ().
                                 Where (e => e.EventTime <= currentTime)) {
                                if (ev.In != null && ev.Out != null) {
-                                       if (ev.Team == Team.LOCAL) {
+                                       if (ev.Team == TeamType.LOCAL) {
                                                homeTeamPlayers.Swap (ev.In, ev.Out);
                                        } else {
                                                awayTeamPlayers.Swap (ev.In, ev.Out);
@@ -381,11 +381,11 @@ namespace LongoMatch.Core.Store
                                }
                        }
 
-                       homeTeam = new TeamTemplate {
+                       homeTeam = new Team {
                                Formation = LocalTeamTemplate.Formation,
                                List = homeTeamPlayers
                        };
-                       awayTeam = new TeamTemplate {
+                       awayTeam = new Team {
                                Formation = VisitorTeamTemplate.Formation,
                                List = awayTeamPlayers
                        };
@@ -430,30 +430,30 @@ namespace LongoMatch.Core.Store
                        return Timeline.Where(p => p.EventType.ID == evType.ID).ToList();
                }
 
-               public int GetScore (Team team) {
+               public int GetScore (TeamType team) {
                        return Timeline.OfType<ScoreEvent>().Where (s => EventTaggedTeam (s) == team).Sum(s 
=> s.Score.Points); 
                }
                
-               public Team EventTaggedTeam (TimelineEvent play) {
+               public TeamType EventTaggedTeam (TimelineEvent play) {
                        bool home=false, away=false;
                        
-                       if (play.Team == Team.LOCAL || play.Team == Team.BOTH ||
+                       if (play.Team == TeamType.LOCAL || play.Team == TeamType.BOTH ||
                            play.Players.Count (p => LocalTeamTemplate.List.Contains (p)) > 0) {
                                home = true;
                        }
-                       if (play.Team == Team.VISITOR || play.Team == Team.BOTH ||
+                       if (play.Team == TeamType.VISITOR || play.Team == TeamType.BOTH ||
                            play.Players.Count (p => VisitorTeamTemplate.List.Contains (p)) > 0) {
                                away = true;
                        }
                        
                        if (away && home) {
-                               return Team.BOTH;
+                               return TeamType.BOTH;
                        } else if (home) {
-                               return Team.LOCAL;
+                               return TeamType.LOCAL;
                        } else if (away) {
-                               return Team.VISITOR;
+                               return TeamType.VISITOR;
                        } else {
-                               return Team.NONE;
+                               return TeamType.NONE;
                        }
                }
                
@@ -473,10 +473,10 @@ namespace LongoMatch.Core.Store
                        Description.LastModified = DateTime.UtcNow;
                        Description.LocalName = LocalTeamTemplate.Name;
                        Description.LocalShield = LocalTeamTemplate.Shield;
-                       Description.LocalGoals = GetScore (Team.LOCAL);
+                       Description.LocalGoals = GetScore (TeamType.LOCAL);
                        Description.VisitorName = VisitorTeamTemplate.Name;
                        Description.VisitorShield = VisitorTeamTemplate.Shield;
-                       Description.VisitorGoals = GetScore (Team.VISITOR);
+                       Description.VisitorGoals = GetScore (TeamType.VISITOR);
                }
 
                public bool Equals(Project project) {
diff --git a/LongoMatch.Core/Store/Templates/TeamTemplate.cs b/LongoMatch.Core/Store/Templates/Team.cs
similarity index 80%
rename from LongoMatch.Core/Store/Templates/TeamTemplate.cs
rename to LongoMatch.Core/Store/Templates/Team.cs
index 943346f..208248e 100644
--- a/LongoMatch.Core/Store/Templates/TeamTemplate.cs
+++ b/LongoMatch.Core/Store/Templates/Team.cs
@@ -31,12 +31,12 @@ using System.IO;
 namespace LongoMatch.Core.Store.Templates
 {
        [Serializable]
-       public class TeamTemplate: ITemplate, IDeserializationCallback
+       public class Team: ITemplate, IDeserializationCallback
        {
-               private const int MAX_WIDTH=100;
-               private const int MAX_HEIGHT=100;
-               
-               public TeamTemplate ()
+               private const int MAX_WIDTH = 100;
+               private const int MAX_HEIGHT = 100;
+
+               public Team ()
                {
                        TeamName = Catalog.GetString ("Team");
                        if (Formation == null) {
@@ -52,20 +52,20 @@ namespace LongoMatch.Core.Store.Templates
                        }
                        ActiveColor = 0;
                        Colors = new Color [2];
-                       Colors[0] = Color.Blue1;
-                       Colors[1] = Color.Red1;
+                       Colors [0] = Color.Blue1;
+                       Colors [1] = Color.Red1;
                }
-               
+
                public Guid ID {
                        get;
                        set;
                }
-               
+
                public List<Player> List {
                        get;
                        set;
                }
-               
+
                public String Name {
                        get;
                        set;
@@ -75,7 +75,7 @@ namespace LongoMatch.Core.Store.Templates
                        get;
                        set;
                }
-               
+
                public Image Shield {
                        get;
                        set;
@@ -98,33 +98,33 @@ namespace LongoMatch.Core.Store.Templates
                                        return Colors [ActiveColor];
                                } else {
                                        ActiveColor = 0;
-                                       return Colors[0];
+                                       return Colors [0];
                                }
                        }
                }
-               
+
                [JsonIgnore]
                public int StartingPlayers {
                        get {
-                               return Formation.Sum();
+                               return Formation.Sum ();
                        }
-               } 
-               
+               }
+
                public int[] Formation {
                        get;
                        set;
                }
-               
+
                [JsonIgnore]
                public string FormationStr {
                        set {
-                               string[] elements = value.Split('-');
+                               string[] elements = value.Split ('-');
                                int[] tactics = new int[elements.Length];
                                int index = 0;
                                foreach (string s in elements) {
                                        try {
-                                               tactics[index] = int.Parse (s);
-                                               index ++;
+                                               tactics [index] = int.Parse (s);
+                                               index++;
                                        } catch {
                                                throw new FormatException ();
                                        }
@@ -135,7 +135,7 @@ namespace LongoMatch.Core.Store.Templates
                                return String.Join ("-", Formation);
                        }
                }
-               
+
                [JsonIgnore]
                public bool TemplateEditorMode {
                        set;
@@ -148,7 +148,7 @@ namespace LongoMatch.Core.Store.Templates
                                if (TemplateEditorMode) {
                                        return List;
                                } else {
-                                       return List.Where(p=>p.Playing).Select(p=>p).ToList();
+                                       return List.Where (p => p.Playing).Select (p => p).ToList ();
                                }
                        }
                }
@@ -207,7 +207,7 @@ namespace LongoMatch.Core.Store.Templates
                        }
                }
 
-               public void ResetPlayers()
+               public void ResetPlayers ()
                {
                        foreach (Player p in List) {
                                p.Playing = true;
@@ -220,31 +220,39 @@ namespace LongoMatch.Core.Store.Templates
                                p.Color = Color;
                        }
                }
-               
-               public Player AddDefaultItem (int i) {
+
+               public Player AddDefaultItem (int i)
+               {
                        Player p = new Player {
-                               Name = "Player " + (i+1).ToString(),
-                               Birthday = new DateTime(DateTime.Now.Year - 25, 6, 1),
+                               Name = "Player " + (i + 1).ToString (),
+                               Birthday = new DateTime (DateTime.Now.Year - 25, 6, 1),
                                Height = 1.80f,
                                Weight = 80,
-                               Number = i+1,
+                               Number = i + 1,
                                Position = "",
                                Photo = null,
-                               Playing = true,};
+                               Playing = true,
+                       };
                        List.Insert (i, p);
                        return p;
                }
 
-               public static TeamTemplate DefaultTemplate(int playersCount) {
-                       TeamTemplate defaultTemplate = new TeamTemplate();
-                       defaultTemplate.FillDefaultTemplate(playersCount);
+               public static Team DefaultTemplate (int playersCount)
+               {
+                       Team defaultTemplate = new Team ();
+                       defaultTemplate.FillDefaultTemplate (playersCount);
                        return defaultTemplate;
                }
 
-               void FillDefaultTemplate(int playersCount) {
-                       List.Clear();
-                       for(int i=1; i<=playersCount; i++)
-                               AddDefaultItem(i-1);
+               void FillDefaultTemplate (int playersCount)
+               {
+                       List.Clear ();
+                       for (int i = 1; i <= playersCount; i++)
+                               AddDefaultItem (i - 1);
                }
        }
+
+       public class TeamTemplate: Team
+       {
+       }
 }
diff --git a/LongoMatch.Core/Store/TimelineEvent.cs b/LongoMatch.Core/Store/TimelineEvent.cs
index 25d0674..97f3176 100644
--- a/LongoMatch.Core/Store/TimelineEvent.cs
+++ b/LongoMatch.Core/Store/TimelineEvent.cs
@@ -101,7 +101,7 @@ namespace LongoMatch.Core.Store
                        set;
                }
 
-               public Team Team {
+               public TeamType Team {
                        get;
                        set;
                }
diff --git a/LongoMatch.Core/Store/Timer.cs b/LongoMatch.Core/Store/Timer.cs
index 59e8ac8..9a8fa6f 100644
--- a/LongoMatch.Core/Store/Timer.cs
+++ b/LongoMatch.Core/Store/Timer.cs
@@ -30,7 +30,7 @@ namespace LongoMatch.Core.Store
                public Timer ()
                {
                        Nodes = new List<TimeNode> ();
-                       Team = Team.NONE;
+                       Team = TeamType.NONE;
                }
 
                public string Name {
@@ -43,7 +43,7 @@ namespace LongoMatch.Core.Store
                        set;
                }
 
-               public Team Team {
+               public TeamType Team {
                        get;
                        set;
                }
diff --git a/LongoMatch.Drawing/CanvasObjects/FieldObject.cs b/LongoMatch.Drawing/CanvasObjects/FieldObject.cs
index 8df2f56..ffe4b41 100644
--- a/LongoMatch.Drawing/CanvasObjects/FieldObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/FieldObject.cs
@@ -83,10 +83,10 @@ namespace LongoMatch.Drawing.CanvasObjects
                public void Update ()
                {
                        if (homeFormation != null) {
-                               UpdateTeam (HomePlayingPlayers, homeFormation, Team.LOCAL);
+                               UpdateTeam (HomePlayingPlayers, homeFormation, TeamType.LOCAL);
                        }
                        if (awayFormation != null) {
-                               UpdateTeam (AwayPlayingPlayers, awayFormation, Team.VISITOR);
+                               UpdateTeam (AwayPlayingPlayers, awayFormation, TeamType.VISITOR);
                        }
                }
 
@@ -95,7 +95,7 @@ namespace LongoMatch.Drawing.CanvasObjects
                        set;
                }
 
-               void UpdateTeam (List<PlayerObject> players, int[] formation, Team team)
+               void UpdateTeam (List<PlayerObject> players, int[] formation, TeamType team)
                {
                        int index = 0, offsetX;
                        int width, colWidth;
@@ -103,7 +103,7 @@ namespace LongoMatch.Drawing.CanvasObjects
 
                        width = Width / NTeams;
                        colWidth = width / formation.Length;
-                       if (team == Team.LOCAL) {
+                       if (team == TeamType.LOCAL) {
                                color = Config.Style.HomeTeamColor;
                                offsetX = 0;
                        } else {
@@ -118,7 +118,7 @@ namespace LongoMatch.Drawing.CanvasObjects
                                if (players.Count == index)
                                        break;
 
-                               if (team == Team.LOCAL) {
+                               if (team == TeamType.LOCAL) {
                                        colX = offsetX + colWidth * col + colWidth / 2;
                                } else {
                                        colX = offsetX - colWidth * col - colWidth / 2;
@@ -129,7 +129,7 @@ namespace LongoMatch.Drawing.CanvasObjects
                                        double rowY;
                                        PlayerObject po = players[index];
 
-                                       if (team == Team.LOCAL) {
+                                       if (team == TeamType.LOCAL) {
                                                rowY = rowHeight * row + rowHeight / 2;
                                        } else {
                                                rowY = Height - (rowHeight * row + rowHeight / 2);
diff --git a/LongoMatch.Drawing/CanvasObjects/PlayObject.cs b/LongoMatch.Drawing/CanvasObjects/PlayObject.cs
index 4d6ccbc..7a47659 100644
--- a/LongoMatch.Drawing/CanvasObjects/PlayObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/PlayObject.cs
@@ -85,15 +85,15 @@ namespace LongoMatch.Drawing.CanvasObjects
 
                void DrawBorders (IDrawingToolkit tk, double start, double stop, int lineWidth)
                {
-                       Team team;
+                       TeamType team;
                        Color color;
                        double y1, y2;
 
                        tk.LineWidth = lineWidth;
                        team = Project.EventTaggedTeam (Play);
-                       if (team == Team.LOCAL) {
+                       if (team == TeamType.LOCAL) {
                                color = Project.LocalTeamTemplate.Color;
-                       } else if (team == Team.VISITOR) {
+                       } else if (team == TeamType.VISITOR) {
                                color = Project.VisitorTeamTemplate.Color;
                        } else {
                                color = Config.Style.PaletteWidgets;
diff --git a/LongoMatch.Drawing/CanvasObjects/PlayerObject.cs 
b/LongoMatch.Drawing/CanvasObjects/PlayerObject.cs
index 0020373..a072768 100644
--- a/LongoMatch.Drawing/CanvasObjects/PlayerObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/PlayerObject.cs
@@ -84,7 +84,7 @@ namespace LongoMatch.Drawing.CanvasObjects
                        }
                }
 
-               public Team Team {
+               public TeamType Team {
                        get;
                        set;
                }
@@ -118,7 +118,7 @@ namespace LongoMatch.Drawing.CanvasObjects
                        size = StyleConf.PlayerSize;
                        scale = (double)Width / size; 
                        
-                       if (Team == Team.LOCAL) {
+                       if (Team == TeamType.LOCAL) {
                                arrowin = ArrowIn;
                                arrowout = ArrowOut;
                        } else {
diff --git a/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs 
b/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
index 9596e26..a7919e7 100644
--- a/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
@@ -42,7 +42,7 @@ namespace LongoMatch.Drawing.CanvasObjects
                const int BUTTONS_HEIGHT = 40;
                const int BUTTONS_WIDTH = 60;
                ButtonObject subPlayers, subInjury, homeButton, awayButton;
-               TeamTemplate homeTeam, awayTeam;
+               Team homeTeam, awayTeam;
                Image background;
                Dictionary<Player, PlayerObject> playerToPlayerObject;
                List<PlayerObject> homePlayingPlayers, awayPlayingPlayers;
@@ -181,16 +181,16 @@ namespace LongoMatch.Drawing.CanvasObjects
                        set;
                }
 
-               public Team SelectedTeam {
+               public TeamType SelectedTeam {
                        get {
                                if (homeButton.Active && awayButton.Active) {
-                                       return Team.BOTH;
+                                       return TeamType.BOTH;
                                } else if (homeButton.Active) {
-                                       return Team.LOCAL;
+                                       return TeamType.LOCAL;
                                } else if (awayButton.Active) {
-                                       return Team.VISITOR;
+                                       return TeamType.VISITOR;
                                } else {
-                                       return Team.NONE;
+                                       return TeamType.NONE;
                                }
                        }
                }
@@ -207,22 +207,22 @@ namespace LongoMatch.Drawing.CanvasObjects
                        field.Update ();
                }
                
-               public void Select (List<Player> players, Team team)
+               public void Select (List<Player> players, TeamType team)
                {
                        ResetSelection ();
                        foreach (Player p in players) {
                                Select (p, true, false);
                        }
-                       homeButton.Active = team == Team.BOTH || team == Team.LOCAL;
-                       awayButton.Active = team == Team.BOTH || team == Team.VISITOR;
+                       homeButton.Active = team == TeamType.BOTH || team == TeamType.LOCAL;
+                       awayButton.Active = team == TeamType.BOTH || team == TeamType.VISITOR;
                        if (PlayersSelectionChangedEvent != null) {
                                PlayersSelectionChangedEvent (SelectedPlayers);
                        }
                }
 
-               public void Select (Team team)
+               public void Select (TeamType team)
                {
-                       if (team == Team.LOCAL) {
+                       if (team == TeamType.LOCAL) {
                                homeButton.Active = true;
                                awayButton.Active = false;
                        } else {
@@ -269,7 +269,7 @@ namespace LongoMatch.Drawing.CanvasObjects
                        awayButton.Active = false;
                }
 
-               public void Substitute (Player p1, Player p2, TeamTemplate team)
+               public void Substitute (Player p1, Player p2, Team team)
                {
                        if (team == homeTeam) {
                                Substitute (homePlayers.FirstOrDefault (p => p.Player == p1),
@@ -282,7 +282,7 @@ namespace LongoMatch.Drawing.CanvasObjects
                        }
                }
 
-               public void LoadTeams (TeamTemplate homeTeam, TeamTemplate awayTeam, Image background)
+               public void LoadTeams (Team homeTeam, Team awayTeam, Image background)
                {
                        int[] homeF = null, awayF = null;
                        int playerSize, colSize, border;
@@ -309,8 +309,8 @@ namespace LongoMatch.Drawing.CanvasObjects
 
                        if (homeTeam != null) {
                                homeTeam.UpdateColors ();
-                               homePlayingPlayers = GetPlayers (homeTeam.StartingPlayersList, Team.LOCAL);
-                               homeBenchPlayers = GetPlayers (homeTeam.BenchPlayersList, Team.LOCAL);
+                               homePlayingPlayers = GetPlayers (homeTeam.StartingPlayersList, 
TeamType.LOCAL);
+                               homeBenchPlayers = GetPlayers (homeTeam.BenchPlayersList, TeamType.LOCAL);
                                homePlayers.AddRange (homePlayingPlayers);
                                homePlayers.AddRange (homeBenchPlayers);
                                homeF = homeTeam.Formation;
@@ -324,8 +324,8 @@ namespace LongoMatch.Drawing.CanvasObjects
                        }
                        if (awayTeam != null) {
                                awayTeam.UpdateColors ();
-                               awayPlayingPlayers = GetPlayers (awayTeam.StartingPlayersList, Team.VISITOR);
-                               awayBenchPlayers = GetPlayers (awayTeam.BenchPlayersList, Team.VISITOR);
+                               awayPlayingPlayers = GetPlayers (awayTeam.StartingPlayersList, 
TeamType.VISITOR);
+                               awayBenchPlayers = GetPlayers (awayTeam.BenchPlayersList, TeamType.VISITOR);
                                awayPlayers.AddRange (awayPlayingPlayers);
                                awayPlayers.AddRange (awayBenchPlayers);
                                awayF = awayTeam.Formation;
@@ -535,12 +535,12 @@ namespace LongoMatch.Drawing.CanvasObjects
                        }
                }
 
-               List<PlayerObject> GetPlayers (List<Player> players, Team team)
+               List<PlayerObject> GetPlayers (List<Player> players, TeamType team)
                {
                        List<PlayerObject> playerObjects;
                        Color color = null;
 
-                       if (team == Team.LOCAL) {
+                       if (team == TeamType.LOCAL) {
                                color = Config.Style.HomeTeamColor;
                        } else {
                                color = Config.Style.AwayTeamColor;
@@ -559,10 +559,10 @@ namespace LongoMatch.Drawing.CanvasObjects
 
                void EmitSubsitutionEvent (PlayerObject player1, PlayerObject player2)
                {
-                       TeamTemplate team;
+                       Team team;
                        List<PlayerObject> bench;
 
-                       if (substitutionPlayer.Team == Team.LOCAL) {
+                       if (substitutionPlayer.Team == TeamType.LOCAL) {
                                team = homeTeam;
                                bench = homeBenchPlayers;
                        } else {
diff --git a/LongoMatch.Drawing/CanvasObjects/PositionObject.cs 
b/LongoMatch.Drawing/CanvasObjects/PositionObject.cs
index b82894c..3c23525 100644
--- a/LongoMatch.Drawing/CanvasObjects/PositionObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/PositionObject.cs
@@ -145,10 +145,10 @@ namespace LongoMatch.Drawing.CanvasObjects
                                fillColor = Play.Color;
                                strokeColor = fillColor;
                                if (Project != null) {
-                                       Team team = Project.EventTaggedTeam (Play);
-                                       if (team == Team.LOCAL) {
+                                       TeamType team = Project.EventTaggedTeam (Play);
+                                       if (team == TeamType.LOCAL) {
                                                strokeColor = Project.LocalTeamTemplate.Color;
-                                       } else if (team == Team.VISITOR) {
+                                       } else if (team == TeamType.VISITOR) {
                                                strokeColor = Project.VisitorTeamTemplate.Color;
                                        }
                                }
diff --git a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
index 2da58d6..3e4b7e2 100644
--- a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
+++ b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
@@ -266,9 +266,9 @@ namespace LongoMatch.Drawing.Widgets
                                to.ClickedEvent += HandleTaggerClickedEvent;
                                to.Mode = TagMode;
                                if (Project != null && t.BackgroundImage == null) {
-                                       if (t.Timer.Team == Team.LOCAL) {
+                                       if (t.Timer.Team == TeamType.LOCAL) {
                                                to.TeamImage = Project.LocalTeamTemplate.Shield;
-                                       } else if (t.Timer.Team == Team.VISITOR) {
+                                       } else if (t.Timer.Team == TeamType.VISITOR) {
                                                to.TeamImage = Project.VisitorTeamTemplate.Shield;
                                        }
                                }
@@ -373,7 +373,7 @@ namespace LongoMatch.Drawing.Widgets
                                score = (button as ScoreButton).Score;
                        }
                        
-                       NewTagEvent (button.EventType, null, Team.NONE, tags, start, stop, eventTime, score, 
card);
+                       NewTagEvent (button.EventType, null, TeamType.NONE, tags, start, stop, eventTime, 
score, card);
                }
        }
 }
diff --git a/LongoMatch.Drawing/Widgets/TeamTagger.cs b/LongoMatch.Drawing/Widgets/TeamTagger.cs
index 7ecfd2b..4ff2ee6 100644
--- a/LongoMatch.Drawing/Widgets/TeamTagger.cs
+++ b/LongoMatch.Drawing/Widgets/TeamTagger.cs
@@ -58,7 +58,7 @@ namespace LongoMatch.Drawing.Widgets
                        tagger.Dispose ();
                }
 
-               public void LoadTeams (TeamTemplate homeTeam, TeamTemplate awayTeam, Image background)
+               public void LoadTeams (Team homeTeam, Team awayTeam, Image background)
                {
                        tagger.LoadTeams (homeTeam, awayTeam, background);
                        widget.ReDraw ();
@@ -112,7 +112,7 @@ namespace LongoMatch.Drawing.Widgets
                        }
                }
 
-               public Team SelectedTeam {
+               public TeamType SelectedTeam {
                        get {
                                return tagger.SelectedTeam;
                        }
@@ -123,12 +123,12 @@ namespace LongoMatch.Drawing.Widgets
                        tagger.ResetSelection ();
                } 
 
-               public void Select (Team team)
+               public void Select (TeamType team)
                {
                        tagger.Select (team);
                }
 
-               public void Select (List<Player> players, Team team)
+               public void Select (List<Player> players, TeamType team)
                {
                        tagger.Select (players, team);
                }
@@ -138,7 +138,7 @@ namespace LongoMatch.Drawing.Widgets
                        tagger.Select (p);
                }
 
-               public void Substitute (Player p1, Player p2, TeamTemplate team)
+               public void Substitute (Player p1, Player p2, Team team)
                {
                        tagger.Substitute (p1, p2, team);
                }
@@ -167,7 +167,7 @@ namespace LongoMatch.Drawing.Widgets
                        tagger.Height = widget.Height;
                }
 
-               void HandlePlayersSubstitutionEvent (TeamTemplate team, Player p1, Player p2, 
SubstitutionReason reason, Time time)
+               void HandlePlayersSubstitutionEvent (Team team, Player p1, Player p2, SubstitutionReason 
reason, Time time)
                {
                        widget.ReDraw ();
                        if (PlayersSubstitutionEvent != null) {
@@ -182,7 +182,7 @@ namespace LongoMatch.Drawing.Widgets
                        }
                }
                
-               void HandleTeamSelectionChangedEvent (Team team)
+               void HandleTeamSelectionChangedEvent (TeamType team)
                {
                        if (TeamSelectionChangedEvent != null) {
                                TeamSelectionChangedEvent (team);
diff --git a/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs 
b/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs
index 11982da..ab3ec3d 100644
--- a/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs
+++ b/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs
@@ -115,7 +115,7 @@ namespace LongoMatch.Gui.Component
                        codingwidget.TagPlayer (player);
                }
                
-               public void TagTeam (Team team)
+               public void TagTeam (TeamType team)
                {
                        codingwidget.TagTeam (team);
                }
diff --git a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs 
b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
index 928b7c9..4bdd995 100644
--- a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
@@ -379,7 +379,7 @@ namespace LongoMatch.Gui.Component
                {
                        if (ignore)
                                return;
-                       timerButton.Timer.Team = (Team)teamcombobox.Active;
+                       timerButton.Timer.Team = (TeamType)teamcombobox.Active;
                        Edited = true;
                }
                
diff --git a/LongoMatch.GUI/Gui/Component/CodingWidget.cs b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
index f320ca7..b75c441 100644
--- a/LongoMatch.GUI/Gui/Component/CodingWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
@@ -155,7 +155,7 @@ namespace LongoMatch.Gui.Component
                        teamtagger.Select (player);
                }
                
-               public void TagTeam (Team team)
+               public void TagTeam (TeamType team)
                {
                        teamtagger.Select (team);
                }
@@ -332,7 +332,7 @@ namespace LongoMatch.Gui.Component
                        selectedPlayers = players.ToList ();
                }
 
-               void HandleNewTagEvent (EventType eventType, List<Player> players, Team team, List<Tag> tags,
+               void HandleNewTagEvent (EventType eventType, List<Player> players, TeamType team, List<Tag> 
tags,
                                        Time start, Time stop, Time eventTime, Score score, PenaltyCard card)
                {
                        TimelineEvent play = project.AddEvent (eventType, start, stop, eventTime, null, 
score, card, false);
@@ -344,7 +344,7 @@ namespace LongoMatch.Gui.Component
                        Config.EventsBroker.EmitNewEvent (play);
                }
 
-               void HandlePlayersSubstitutionEvent (TeamTemplate team, Player p1, Player p2,
+               void HandlePlayersSubstitutionEvent (Team team, Player p1, Player p2,
                                                     SubstitutionReason reason, Time time)
                {
                        Config.EventsBroker.EmitSubstitutionEvent (team, p1, p2, reason, time);
diff --git a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
index 70eed7e..94b8bf6 100644
--- a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
@@ -410,7 +410,7 @@ namespace LongoMatch.Gui.Component
                        }
                }
                
-               void HandleNewTagEvent (EventType evntType, List<Player> players, Team team, List<Tag> tags,
+               void HandleNewTagEvent (EventType evntType, List<Player> players, TeamType team, List<Tag> 
tags,
                                        Time start, Time stop, Time eventTime, Score score, PenaltyCard card)
                {
                        /* Forward event until we have players integrted in the dashboard layout */
diff --git a/LongoMatch.GUI/Gui/Component/EventsListWidget.cs 
b/LongoMatch.GUI/Gui/Component/EventsListWidget.cs
index c934c35..ba1f4c5 100644
--- a/LongoMatch.GUI/Gui/Component/EventsListWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/EventsListWidget.cs
@@ -31,8 +31,8 @@ namespace LongoMatch.Gui.Component
                public EventsListWidget ()
                {
                        this.Build ();
-                       localPlayersList.Team = Team.LOCAL;
-                       visitorPlayersList.Team = Team.VISITOR;
+                       localPlayersList.Team = TeamType.LOCAL;
+                       visitorPlayersList.Team = TeamType.VISITOR;
                        playsnotebook.Page = 0;
                        playsList1.HeightRequest = StyleConf.PlayerCapturerControlsHeight;
                        Config.EventsBroker.TeamTagsChanged += UpdateTeamsModels;
diff --git a/LongoMatch.GUI/Gui/Component/FakeAnalysisComponent.cs 
b/LongoMatch.GUI/Gui/Component/FakeAnalysisComponent.cs
index e94350f..d61dc97 100644
--- a/LongoMatch.GUI/Gui/Component/FakeAnalysisComponent.cs
+++ b/LongoMatch.GUI/Gui/Component/FakeAnalysisComponent.cs
@@ -102,7 +102,7 @@ namespace LongoMatch.Gui.Component
                        codingwidget1.TagPlayer (player);
                }
 
-               public void TagTeam (Team team)
+               public void TagTeam (TeamType team)
                {
                        codingwidget1.TagTeam (team);
                }
diff --git a/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs 
b/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
index 1cf4516..948dd12 100644
--- a/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
@@ -47,7 +47,7 @@ namespace LongoMatch.Gui.Component
                        get;
                }
 
-               public Team Team {
+               public TeamType Team {
                        set {
                                playerstreeview.Team = value;
                        }
@@ -96,7 +96,7 @@ namespace LongoMatch.Gui.Component
                        }
                }
 
-               public void SetTeam(TeamTemplate template, List<TimelineEvent> plays) {
+               public void SetTeam(Team template, List<TimelineEvent> plays) {
                        Dictionary<Player, TreeIter> playersDict = new Dictionary<Player, TreeIter>();
                        
                        Log.Debug("Updating teams models with template:" + template);
diff --git a/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs 
b/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs
index 9404919..113bdfb 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs
@@ -48,7 +48,7 @@ namespace LongoMatch.Gui.Component
                        goal.Tagger.Background = project.GetBackground (FieldPositionType.Goal);
                }
                
-               public void LoadStats (EventTypeStats stats, Team team)
+               public void LoadStats (EventTypeStats stats, TeamType team)
                {
                        Visible = false;
                        
@@ -60,7 +60,7 @@ namespace LongoMatch.Gui.Component
                        goal.Tagger.ObjectsCanMove = false;
                }
                
-               public void LoadStats (PlayerEventTypeStats stats, Team team)
+               public void LoadStats (PlayerEventTypeStats stats, TeamType team)
                {
                        Visible = false;
                        
diff --git a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs 
b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
index 57cf9e4..8dde29b 100644
--- a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
+++ b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
@@ -37,7 +37,7 @@ namespace LongoMatch.Gui.Component
                public event EventHandler TemplateSaved;
 
                Player loadedPlayer;
-               TeamTemplate template;
+               Team template;
                bool edited, ignoreChanges;
                List<Player> selectedPlayers;
                TeamTagger teamtagger;
@@ -78,7 +78,7 @@ namespace LongoMatch.Gui.Component
                        }
                }
 
-               public TeamTemplate  Team {
+               public Team  Team {
                        set {
                                template = value;
                                ignoreChanges = true;
@@ -362,7 +362,7 @@ namespace LongoMatch.Gui.Component
                        }
                }
 
-               void HandlePlayersSubstitutionEvent (TeamTemplate team, Player p1, Player p2,
+               void HandlePlayersSubstitutionEvent (Team team, Player p1, Player p2,
                                                     SubstitutionReason reason, Time time)
                {
                        team.List.Swap (p1, p2);
diff --git a/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs b/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
index 8a0b617..12f4340 100644
--- a/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
+++ b/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
@@ -36,7 +36,7 @@ namespace LongoMatch.Gui.Component
                {
                }
 
-               public void Load (List<TeamTemplate> teams)
+               public void Load (List<Team> teams)
                {
                        Clear ();
                        pixrender = new CellRendererPixbuf ();
@@ -52,8 +52,8 @@ namespace LongoMatch.Gui.Component
                                PackStart (texrender, true);
                        }
                        
-                       store = new ListStore (typeof(Pixbuf), typeof(string), typeof(TeamTemplate));
-                       foreach (TeamTemplate t in teams) {
+                       store = new ListStore (typeof(Pixbuf), typeof(string), typeof(Team));
+                       foreach (Team t in teams) {
                                Pixbuf shield;
                                int size = StyleConf.NewTeamsIconSize;
 
@@ -70,12 +70,12 @@ namespace LongoMatch.Gui.Component
                
                } 
 
-               public TeamTemplate ActiveTeam {
+               public Team ActiveTeam {
                        get {
                                TreeIter iter;
 
                                GetActiveIter (out iter);
-                               return store.GetValue (iter, 2) as TeamTemplate;
+                               return store.GetValue (iter, 2) as Team;
                        }
                }
        }
diff --git a/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs b/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs
index 86faadc..3f57a54 100644
--- a/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs
+++ b/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs
@@ -167,7 +167,7 @@ namespace LongoMatch.Gui.Dialog
                        play.Players = players.ToList (); 
                }
                
-               void HandleTeamSelectionChangedEvent (Team team)
+               void HandleTeamSelectionChangedEvent (TeamType team)
                {
                        play.Team = team;
                }
diff --git a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs 
b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
index 467f9e7..5f15818 100644
--- a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
+++ b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
@@ -35,7 +35,7 @@ namespace LongoMatch.Gui.Dialog
                SelectionCanvas incanvas, outcanvas;
                PlayerObject inpo, outpo;
                Player inPlayer, outPlayer, selectedPlayer;
-               TeamTemplate homeTeam, awayTeam;
+               Team homeTeam, awayTeam;
                LineupEvent lineup;
                SubstitutionEvent substitution;
                const int PLAYER_SIZE = 100;
@@ -104,7 +104,7 @@ namespace LongoMatch.Gui.Dialog
                        tagger.SubstitutionMode = false;
                        tagger.ShowSubstitutionButtons = false;
                        tagger.SelectionMode = MultiSelectionMode.Single;
-                       if (substitution.Team == Team.LOCAL) {
+                       if (substitution.Team == TeamType.LOCAL) {
                                LoadTeams (project, hfp, hbp, null, null);
                        } else {
                                LoadTeams (project, afp, abp, null, null);
@@ -118,7 +118,7 @@ namespace LongoMatch.Gui.Dialog
                        List<Player> homeTeamPlayers, awayTeamPlayers;
 
                        homeTeamPlayers = homeFieldPlayers.Concat (homeBenchPlayers).ToList ();
-                       homeTeam = new TeamTemplate {
+                       homeTeam = new Team {
                                Colors = project.LocalTeamTemplate.Colors,
                                ActiveColor = project.LocalTeamTemplate.ActiveColor,
                                ID = project.LocalTeamTemplate.ID,
@@ -128,7 +128,7 @@ namespace LongoMatch.Gui.Dialog
                        
                        if (awayFieldPlayers != null) {
                                awayTeamPlayers = awayFieldPlayers.Concat (awayBenchPlayers).ToList ();
-                               awayTeam = new TeamTemplate {
+                               awayTeam = new Team {
                                        Colors = project.VisitorTeamTemplate.Colors,
                                        ActiveColor = project.VisitorTeamTemplate.ActiveColor,
                                        ID = project.VisitorTeamTemplate.ID,
@@ -179,7 +179,7 @@ namespace LongoMatch.Gui.Dialog
                        }
                }
                
-               void HandlePlayersSubstitutionEvent (TeamTemplate team, Player p1, Player p2, 
SubstitutionReason reason, Time time)
+               void HandlePlayersSubstitutionEvent (Team team, Player p1, Player p2, SubstitutionReason 
reason, Time time)
                {
                        tagger.Substitute (p1, p2, team);
                        if (team.ID == homeTeam.ID) {
diff --git a/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs b/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
index 4559e82..1d961e0 100644
--- a/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
@@ -54,7 +54,7 @@ namespace LongoMatch.Gui.Panel
                IMultimediaToolkit mtoolkit;
                IGUIToolkit gtoolkit;
                Gdk.Color red;
-               TeamTemplate hometemplate, awaytemplate;
+               Team hometemplate, awaytemplate;
                Dashboard analysisTemplate;
                TeamTagger teamtagger;
                SizeGroup sg;
@@ -151,7 +151,7 @@ namespace LongoMatch.Gui.Panel
 
                void LoadTeams (Project project)
                {
-                       List<TeamTemplate> teams;
+                       List<Team> teams;
                        
                        drawingarea.HeightRequest = 200;
                        teamtagger = new TeamTagger (new WidgetWrapper (drawingarea));
@@ -161,15 +161,15 @@ namespace LongoMatch.Gui.Panel
                        teamtagger.PlayersSubstitutionEvent += HandlePlayersSubstitutionEvent;
                        teams = Config.TeamTemplatesProvider.Templates;
                        if (project != null) {
-                               hometeamscombobox.Load (new List<TeamTemplate> { project.LocalTeamTemplate });
-                               awayteamscombobox.Load (new List<TeamTemplate> { project.VisitorTeamTemplate 
});
+                               hometeamscombobox.Load (new List<Team> { project.LocalTeamTemplate });
+                               awayteamscombobox.Load (new List<Team> { project.VisitorTeamTemplate });
                        } else {
                                hometeamscombobox.Load (teams);
                                hometeamscombobox.Changed += (sender, e) => {
-                                       LoadTemplate (hometeamscombobox.ActiveTeam, Team.LOCAL, false);};
+                                       LoadTemplate (hometeamscombobox.ActiveTeam, TeamType.LOCAL, false);};
                                awayteamscombobox.Load (teams);
                                awayteamscombobox.Changed += (sender, e) => {
-                                       LoadTemplate (awayteamscombobox.ActiveTeam, Team.VISITOR, false);};
+                                       LoadTemplate (awayteamscombobox.ActiveTeam, TeamType.VISITOR, 
false);};
                        }
                        hometeamscombobox.Active = 0;
                        awayteamscombobox.Active = 0;
@@ -204,8 +204,8 @@ namespace LongoMatch.Gui.Panel
                        tagscombobox.Visible = false;
                        analysislabel.Visible = false;
                        analysisTemplate = project.Dashboard;
-                       LoadTemplate (project.LocalTeamTemplate, Team.LOCAL, true);
-                       LoadTemplate (project.VisitorTeamTemplate, Team.VISITOR, true);
+                       LoadTemplate (project.LocalTeamTemplate, TeamType.LOCAL, true);
+                       LoadTemplate (project.VisitorTeamTemplate, TeamType.VISITOR, true);
                        mediafilesetselection1.Visible = true;
                        mediafilesetselection1.FileSet = project.Description.FileSet;
                }
@@ -268,9 +268,9 @@ namespace LongoMatch.Gui.Panel
                        }
                }
 
-               void LoadTemplate (string name, Team team)
+               void LoadTemplate (string name, TeamType team)
                {
-                       TeamTemplate template;
+                       Team template;
                        if (name != null) {
                                template = Config.TeamTemplatesProvider.Load (name);
                                LoadTemplate (template, team, false);
@@ -287,9 +287,9 @@ namespace LongoMatch.Gui.Panel
                        area.ModifyBg (StateType.Selected, gcolor); 
                }
 
-               void LoadTemplate (TeamTemplate template, Team team, bool forceColor)
+               void LoadTemplate (Team template, TeamType team, bool forceColor)
                {
-                       if (team == Team.LOCAL) {
+                       if (team == TeamType.LOCAL) {
                                hometemplate = Cloner.Clone (template);
                                hometacticsentry.Text = hometemplate.FormationStr;
                                SetButtonColor (homecolor1, hometemplate.Colors [0]);
@@ -553,7 +553,7 @@ namespace LongoMatch.Gui.Panel
                        menu.Popup ();
                }
 
-               void HandlePlayersSubstitutionEvent (TeamTemplate team, Player p1, Player p2,
+               void HandlePlayersSubstitutionEvent (Team team, Player p1, Player p2,
                                                     SubstitutionReason reason, Time time)
                {
                        team.List.Swap (p1, p2);
@@ -562,7 +562,7 @@ namespace LongoMatch.Gui.Panel
 
                void HandleTacticsChanged (object sender, EventArgs e)
                {
-                       TeamTemplate team;
+                       Team team;
                        Entry entry;
 
                        if (sender == hometacticsbutton) {
diff --git a/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs b/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
index 1b4ec36..610885e 100644
--- a/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
@@ -38,7 +38,7 @@ namespace LongoMatch.Gui.Panel
                public event BackEventHandle BackEvent;
 
                ListStore teams;
-               TeamTemplate loadedTeam;
+               Team loadedTeam;
                ITeamTemplatesProvider provider;
 
                public TeamsTemplatesPanel ()
@@ -122,7 +122,7 @@ namespace LongoMatch.Gui.Panel
                        bool first = true;
                        
                        teams.Clear ();
-                       foreach (TeamTemplate template in provider.Templates) {
+                       foreach (Team template in provider.Templates) {
                                Pixbuf img;
                                TreeIter iter;
                                
@@ -145,7 +145,7 @@ namespace LongoMatch.Gui.Panel
                        }
                }
                
-               bool SaveTemplate (TeamTemplate template)
+               bool SaveTemplate (Team template)
                {
                        try {
                                provider.Update (template);
@@ -225,7 +225,7 @@ namespace LongoMatch.Gui.Panel
                        }
                }
 
-               void LoadTeam (TeamTemplate team)
+               void LoadTeam (Team team)
                {
                        PromptSave ();
                        
@@ -236,7 +236,7 @@ namespace LongoMatch.Gui.Panel
 
                void HandleSelectionChanged (object sender, EventArgs e)
                {
-                       TeamTemplate selected;
+                       Team selected;
                        TreeIter iter;
 
                        teamseditortreeview.Selection.GetSelected (out iter);
@@ -312,8 +312,8 @@ namespace LongoMatch.Gui.Panel
                                if (dialog.SelectedTemplate != null) {
                                        provider.Copy (dialog.SelectedTemplate, dialog.Text);
                                } else {
-                                       TeamTemplate team;
-                                       team = TeamTemplate.DefaultTemplate (dialog.Count);
+                                       Team team;
+                                       team = Team.DefaultTemplate (dialog.Count);
                                        team.TeamName = dialog.Text;
                                        team.Name = dialog.Text;
                                        if (!SaveTemplate (team)) {
diff --git a/LongoMatch.GUI/Gui/TreeView/PlayersFilterTreeView.cs 
b/LongoMatch.GUI/Gui/TreeView/PlayersFilterTreeView.cs
index a0d3b67..55830a6 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlayersFilterTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlayersFilterTreeView.cs
@@ -31,7 +31,7 @@ namespace LongoMatch.Gui.Component
        [System.ComponentModel.ToolboxItem(true)]
        public class PlayersFilterTreeView: FilterTreeViewBase
        {
-               TeamTemplate local, visitor;
+               Team local, visitor;
                Player localTeam, visitorTeam;
                TreeIter localIter, visitorIter;
                
diff --git a/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs b/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
index 8a3e7be..23d7d0e 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
@@ -34,10 +34,10 @@ namespace LongoMatch.Gui.Component
                TreePath pathClicked;
 
                public PlayersTreeView() {
-                       this.Team = Team.LOCAL;
+                       this.Team = TeamType.LOCAL;
                }
 
-               public Team Team {
+               public TeamType Team {
                        set;
                        get;
                }
diff --git a/LongoMatch.Migration/Converter.cs b/LongoMatch.Migration/Converter.cs
index 1fe686d..a86b5fc 100644
--- a/LongoMatch.Migration/Converter.cs
+++ b/LongoMatch.Migration/Converter.cs
@@ -236,10 +236,10 @@ namespace LongoMatch.Migration
                        LongoMatch.Core.Common.Serializer.Save (dashboard, outputPath);
                }
 
-               public static LongoMatch.Core.Store.Templates.TeamTemplate ConvertTeamTemplate (TeamTemplate 
team,
+               public static LongoMatch.Core.Store.Templates.Team ConvertTeamTemplate (TeamTemplate team,
                                                                                              Dictionary 
<Player, LongoMatch.Core.Store.Player> teamsDict)
                {
-                       var newteam = new LongoMatch.Core.Store.Templates.TeamTemplate ();
+                       var newteam = new LongoMatch.Core.Store.Templates.Team ();
                        newteam.Name = team.Name;
                        newteam.TeamName = team.TeamName;
                        newteam.Shield = ConvertImage (team.Shield);
@@ -326,7 +326,7 @@ namespace LongoMatch.Migration
                                newplay.Rate = play.Rate;
                                newplay.Start = ConvertTime (play.Start);
                                newplay.Stop = ConvertTime (play.Stop);
-                               newplay.Team = (LongoMatch.Core.Common.Team)play.Team;
+                               newplay.Team = (LongoMatch.Core.Common.TeamType)play.Team;
 
                                newplay.EventType = eventTypesDict [play.Category];
                                foreach (Player player in play.Players.GetTagsValues()) {
diff --git a/LongoMatch.Plugins.Stats/Stats/CategoryViewer.cs 
b/LongoMatch.Plugins.Stats/Stats/CategoryViewer.cs
index d1f6b6c..b158762 100644
--- a/LongoMatch.Plugins.Stats/Stats/CategoryViewer.cs
+++ b/LongoMatch.Plugins.Stats/Stats/CategoryViewer.cs
@@ -50,11 +50,11 @@ namespace LongoMatch.Plugins.Stats
                        homeLabel.Text = HomeName;
                        awayLabel.Text = AwayName;
                        
-                       alltagger.LoadStats (stats, Team.BOTH);
+                       alltagger.LoadStats (stats, TeamType.BOTH);
                        
-                       hometagger.LoadStats (stats, Team.LOCAL);
+                       hometagger.LoadStats (stats, TeamType.LOCAL);
                            
-                       awaytagger.LoadStats (stats, Team.VISITOR);
+                       awaytagger.LoadStats (stats, TeamType.VISITOR);
                        
                        foreach (Widget child in vbox1.AllChildren) {
                                if (child is SubCategoryViewer || child is HSeparator)
diff --git a/LongoMatch.Plugins.Stats/Stats/GameViewer.cs b/LongoMatch.Plugins.Stats/Stats/GameViewer.cs
index e5163df..515087a 100644
--- a/LongoMatch.Plugins.Stats/Stats/GameViewer.cs
+++ b/LongoMatch.Plugins.Stats/Stats/GameViewer.cs
@@ -68,9 +68,9 @@ namespace LongoMatch.Plugins.Stats
                
                void UpdateGui () {
                        homelabel.Markup = String.Format ("{0} <span font_desc=\"40\">{1}</span>",
-                                                         project.LocalTeamTemplate.TeamName, 
project.GetScore (Team.LOCAL));
+                                                         project.LocalTeamTemplate.TeamName, 
project.GetScore (TeamType.LOCAL));
                        awaylabel.Markup = String.Format ("<span font_desc=\"40\">{0}</span> {1}",
-                                                         project.GetScore (Team.VISITOR), 
project.VisitorTeamTemplate.TeamName);
+                                                         project.GetScore (TeamType.VISITOR), 
project.VisitorTeamTemplate.TeamName);
                        GetMaxSize(out catsMaxSize, out subcatsMaxSize);
                        if (project.LocalTeamTemplate.Shield != null)
                                homeimage.Pixbuf = project.LocalTeamTemplate.Shield.Value;
diff --git a/LongoMatch.Plugins.Stats/Stats/PlayerCategoryViewer.cs 
b/LongoMatch.Plugins.Stats/Stats/PlayerCategoryViewer.cs
index 1bcb6e0..bb7e0ce 100644
--- a/LongoMatch.Plugins.Stats/Stats/PlayerCategoryViewer.cs
+++ b/LongoMatch.Plugins.Stats/Stats/PlayerCategoryViewer.cs
@@ -40,7 +40,7 @@ namespace LongoMatch.Plugins.Stats
                }
 
                public void LoadStats (PlayerEventTypeStats stats) {
-                       tagger.LoadStats (stats, Team.BOTH);
+                       tagger.LoadStats (stats, TeamType.BOTH);
                        
                        foreach (Widget child in vbox1.AllChildren) {
                                if (!(child is PlaysCoordinatesTagger))
diff --git a/LongoMatch.Plugins.Stats/Stats/PlayersViewer.cs b/LongoMatch.Plugins.Stats/Stats/PlayersViewer.cs
index 6a8eab8..dd8f683 100644
--- a/LongoMatch.Plugins.Stats/Stats/PlayersViewer.cs
+++ b/LongoMatch.Plugins.Stats/Stats/PlayersViewer.cs
@@ -58,7 +58,7 @@ namespace LongoMatch.Plugins.Stats
                        treeview1.SetCursor (path, null, false);
                }
                
-               void AddTeam (TeamTemplate tpl, Dashboard cats)
+               void AddTeam (Team tpl, Dashboard cats)
                {
                        TreeIter iter = store.AppendValues (tpl.TeamName, null);
                        foreach (Player p in tpl.List) {
diff --git a/LongoMatch.Plugins.Stats/Stats/Plotter.cs b/LongoMatch.Plugins.Stats/Stats/Plotter.cs
index ab0428d..804d3ca 100644
--- a/LongoMatch.Plugins.Stats/Stats/Plotter.cs
+++ b/LongoMatch.Plugins.Stats/Stats/Plotter.cs
@@ -140,7 +140,7 @@ namespace LongoMatch.Plugins.Stats
             return model;
                }
                
-               PlotModel GetPie (SubCategoryStat stats, Team team) {
+               PlotModel GetPie (SubCategoryStat stats, TeamType team) {
                        PlotModel model = new PlotModel ();
                        PieSeries ps = new PieSeries();
                        
@@ -157,9 +157,9 @@ namespace LongoMatch.Plugins.Stats
                        ps.InsideLabelPosition = 0.8;
                        ps.AngleSpan = 360;
                        ps.StartAngle = 0;
-                       if (team == Team.LOCAL) {
+                       if (team == TeamType.LOCAL) {
                                ps.Title = HomeName;
-                       } else if (team == Team.VISITOR) {
+                       } else if (team == TeamType.VISITOR) {
                                ps.Title = AwayName;
                        }
                        OxyColor text_color = OxyColor.FromArgb (LongoMatch.Config.Style.PaletteText.A,
@@ -173,14 +173,14 @@ namespace LongoMatch.Plugins.Stats
             return model;
                }
                
-               double GetCount (PercentualStat stats, Team team) {
+               double GetCount (PercentualStat stats, TeamType team) {
                        switch (team) {
-                       case Team.NONE:
-                       case Team.BOTH:
+                       case TeamType.NONE:
+                       case TeamType.BOTH:
                                return stats.TotalCount;
-                       case Team.LOCAL:
+                       case TeamType.LOCAL:
                                return stats.LocalTeamCount;
-                       case Team.VISITOR:
+                       case TeamType.VISITOR:
                                return stats.VisitorTeamCount;
                        }
                        return 0;
@@ -198,11 +198,11 @@ namespace LongoMatch.Plugins.Stats
                                break;
                        case GraphType.Pie:
                                if (ShowTeams) {
-                                       imageall.Pixbuf = Load (GetPie (stats, Team.BOTH), graphWidth / 3, 
HEIGHT);
-                                       imagehome.Pixbuf = Load (GetPie (stats, Team.LOCAL), graphWidth / 3, 
HEIGHT);
-                                       imageaway.Pixbuf = Load (GetPie (stats, Team.VISITOR), graphWidth / 
3, HEIGHT);
+                                       imageall.Pixbuf = Load (GetPie (stats, TeamType.BOTH), graphWidth / 
3, HEIGHT);
+                                       imagehome.Pixbuf = Load (GetPie (stats, TeamType.LOCAL), graphWidth / 
3, HEIGHT);
+                                       imageaway.Pixbuf = Load (GetPie (stats, TeamType.VISITOR), graphWidth 
/ 3, HEIGHT);
                                } else {
-                                       imageall.Pixbuf = Load (GetPie (stats, Team.BOTH), graphWidth, 
HEIGHT);
+                                       imageall.Pixbuf = Load (GetPie (stats, TeamType.BOTH), graphWidth, 
HEIGHT);
                                }
                                imagehome.Visible = ShowTeams;
                                imageaway.Visible = ShowTeams;
diff --git a/LongoMatch.Plugins/CSVExporter.cs b/LongoMatch.Plugins/CSVExporter.cs
index f55ef43..777017c 100644
--- a/LongoMatch.Plugins/CSVExporter.cs
+++ b/LongoMatch.Plugins/CSVExporter.cs
@@ -98,13 +98,13 @@ namespace LongoMatch.Plugins
                        File.WriteAllLines (filename, output);
                }
 
-               string TeamName(Team team)
+               string TeamName(TeamType team)
                {
-                       if (team == Team.LOCAL) {
+                       if (team == TeamType.LOCAL) {
                                return project.LocalTeamTemplate.TeamName;
-                       } else if (team == Team.VISITOR) {
+                       } else if (team == TeamType.VISITOR) {
                                return project.VisitorTeamTemplate.TeamName;
-                       } else if (team == Team.BOTH) {
+                       } else if (team == TeamType.BOTH) {
                                return "ALL";
                        } else {
                                return "";
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index bb6a360..bb98ae9 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -125,7 +125,7 @@ namespace LongoMatch.Services
                        filter.Update ();
                }
 
-               void HandlePlayerSubstitutionEvent (TeamTemplate team, Player p1, Player p2, 
SubstitutionReason reason, Time time)
+               void HandlePlayerSubstitutionEvent (Team team, Player p1, Player p2, SubstitutionReason 
reason, Time time)
                {
                        if (openedProject != null) {
                                TimelineEvent evt;
@@ -285,7 +285,7 @@ namespace LongoMatch.Services
                        }
                }
 
-               public void OnNewTag (EventType evType, List<Player> players, Team team, List<Tag> tags,
+               public void OnNewTag (EventType evType, List<Player> players, TeamType team, List<Tag> tags,
                                      Time start, Time stop, Time eventTime, Score score, PenaltyCard card)
                {
                        if (player == null || openedProject == null)
diff --git a/LongoMatch.Services/Services/HotKeysManager.cs b/LongoMatch.Services/Services/HotKeysManager.cs
index 20a719a..d75a097 100644
--- a/LongoMatch.Services/Services/HotKeysManager.cs
+++ b/LongoMatch.Services/Services/HotKeysManager.cs
@@ -39,7 +39,7 @@ namespace LongoMatch.Services
                AnalysisEventButton pendingButton;
                bool inPlayerTagging;
                string playerNumber;
-               Team taggedTeam;
+               TeamType taggedTeam;
                System.Threading.Timer timer;
                const int TIMEOUT_MS = 1000;
 
@@ -58,7 +58,7 @@ namespace LongoMatch.Services
                        int playerNumber;
                        
                        if (int.TryParse (this.playerNumber, out playerNumber)) {
-                               TeamTemplate team = taggedTeam == Team.LOCAL ? 
openedProject.LocalTeamTemplate :
+                               Team team = taggedTeam == TeamType.LOCAL ? openedProject.LocalTeamTemplate :
                                        openedProject.VisitorTeamTemplate;
                                Player player = team.List.FirstOrDefault (p => p.Number == playerNumber);
                                if (player != null) {
@@ -192,7 +192,7 @@ namespace LongoMatch.Services
                                        analysisWindow.ClickButton (pendingButton);
                                }
                                inPlayerTagging = true;
-                               taggedTeam = action == KeyAction.LocalPlayer ? Team.LOCAL : Team.VISITOR;
+                               taggedTeam = action == KeyAction.LocalPlayer ? TeamType.LOCAL : 
TeamType.VISITOR;
                                playerNumber = "";
                                analysisWindow.TagTeam (taggedTeam);
                                timer.Change (TIMEOUT_MS, 0);
diff --git a/LongoMatch.Services/Services/TemplatesService.cs 
b/LongoMatch.Services/Services/TemplatesService.cs
index 444c20e..0cb597a 100644
--- a/LongoMatch.Services/Services/TemplatesService.cs
+++ b/LongoMatch.Services/Services/TemplatesService.cs
@@ -35,7 +35,7 @@ namespace LongoMatch.Services
                public TemplatesService ()
                {
                        dict = new Dictionary<Type, ITemplateProvider> ();
-                       dict.Add (typeof(TeamTemplate),
+                       dict.Add (typeof(Team),
                                  new TeamTemplatesProvider (Config.TeamsDir));
                        dict.Add (typeof(Dashboard), new CategoriesTemplatesProvider (Config.AnalysisDir));
                        CheckDefaultTemplates ();
@@ -56,7 +56,7 @@ namespace LongoMatch.Services
 
                public ITeamTemplatesProvider TeamTemplateProvider {
                        get {
-                               return (ITeamTemplatesProvider)dict [typeof(TeamTemplate)]; 
+                               return (ITeamTemplatesProvider)dict [typeof(Team)]; 
                        }
                }
 
@@ -246,7 +246,7 @@ namespace LongoMatch.Services
                }
        }
 
-       public class TeamTemplatesProvider: TemplatesProvider<TeamTemplate>, ITeamTemplatesProvider
+       public class TeamTemplatesProvider: TemplatesProvider<Team>, ITeamTemplatesProvider
        {
                public TeamTemplatesProvider (string basePath): base (basePath, Constants.TEAMS_TEMPLATE_EXT)
                {
diff --git a/Tests/Core/Store/Templates/TestTeamTemplate.cs b/Tests/Core/Store/Templates/TestTeamTemplate.cs
index 37b0558..8fdafbb 100644
--- a/Tests/Core/Store/Templates/TestTeamTemplate.cs
+++ b/Tests/Core/Store/Templates/TestTeamTemplate.cs
@@ -30,7 +30,7 @@ namespace Tests.Core.Templates
                [Test ()]
                public void TestSerialization ()
                {
-                       TeamTemplate t = new TeamTemplate ();
+                       Team t = new Team ();
                        
                        Utils.CheckSerialization (t);
                        
@@ -44,7 +44,7 @@ namespace Tests.Core.Templates
                        
                        Utils.CheckSerialization (t);
                        
-                       TeamTemplate newt = Utils.SerializeDeserialize (t);
+                       Team newt = Utils.SerializeDeserialize (t);
                        
                        Assert.AreEqual (t.ID, newt.ID);
                        Assert.AreEqual (t.Name, newt.Name);
@@ -60,7 +60,7 @@ namespace Tests.Core.Templates
                [Test ()]
                public void TestColor ()
                {
-                       TeamTemplate t = new TeamTemplate ();
+                       Team t = new Team ();
                        Assert.AreEqual (t.Color, t.Colors [0]);
                        t.ActiveColor = -1;
                        Assert.AreEqual (t.Color, t.Colors [0]);
@@ -73,7 +73,7 @@ namespace Tests.Core.Templates
                [Test ()]
                public void TestPlayingPlayers ()
                {
-                       TeamTemplate t = new TeamTemplate ();
+                       Team t = new Team ();
                        Player p1, p2, p3;
                        
                        t.Name = "test";
@@ -97,7 +97,7 @@ namespace Tests.Core.Templates
                [Test ()]
                public void TestCreateDefaultTemplate ()
                {
-                       TeamTemplate t = TeamTemplate.DefaultTemplate (10);
+                       Team t = Team.DefaultTemplate (10);
                        
                        Assert.AreEqual (t.List.Count, 10);
                        t.AddDefaultItem (8);
@@ -107,7 +107,7 @@ namespace Tests.Core.Templates
                [Test ()]
                public void TestFormation ()
                {
-                       TeamTemplate t = TeamTemplate.DefaultTemplate (1);
+                       Team t = Team.DefaultTemplate (1);
                        t.FormationStr = "1-2-3-4";
                        Assert.AreEqual (t.Formation.Length, 4);
                        Assert.AreEqual (t.Formation [0], 1);
@@ -123,7 +123,7 @@ namespace Tests.Core.Templates
                [Test ()]
                public void TestBenchPlayers ()
                {
-                       TeamTemplate t = TeamTemplate.DefaultTemplate (15);
+                       Team t = Team.DefaultTemplate (15);
                        t.FormationStr = "1-2-3-4";
                        Assert.AreEqual (5, t.BenchPlayersList.Count);
                        Assert.AreEqual (t.List [10], t.BenchPlayersList [0]);
@@ -135,7 +135,7 @@ namespace Tests.Core.Templates
                [Test ()]
                public void TestStartingPlayers ()
                {
-                       TeamTemplate t = TeamTemplate.DefaultTemplate (15);
+                       Team t = Team.DefaultTemplate (15);
                        t.FormationStr = "1-2-3-4";
                        Assert.AreEqual (10, t.StartingPlayers);
                        Assert.AreEqual (10, t.StartingPlayersList.Count);
@@ -166,7 +166,7 @@ namespace Tests.Core.Templates
                [Test ()]
                public void TestRemovePlayers ()
                {
-                       TeamTemplate t = TeamTemplate.DefaultTemplate (15);
+                       Team t = Team.DefaultTemplate (15);
                        t.FormationStr = "1-2-3-4";
 
                        /* Removing a player from the starting list must be swapped
@@ -190,7 +190,7 @@ namespace Tests.Core.Templates
                [Test ()]
                public void TestResetPlayers ()
                {
-                       TeamTemplate t = TeamTemplate.DefaultTemplate (10);
+                       Team t = Team.DefaultTemplate (10);
                        for (int i = 0; i < 5; i++) {
                                t.List [0].Playing = false;
                        }
diff --git a/Tests/Core/Store/TestPlaysFilter.cs b/Tests/Core/Store/TestPlaysFilter.cs
index b1480c7..39fdf6f 100644
--- a/Tests/Core/Store/TestPlaysFilter.cs
+++ b/Tests/Core/Store/TestPlaysFilter.cs
@@ -31,8 +31,8 @@ namespace Tests.Core.Store
                        TimelineEvent pl;
                        Project p = new Project ();
                        p.Dashboard = Dashboard.DefaultTemplate (10);
-                       p.LocalTeamTemplate = TeamTemplate.DefaultTemplate (5);
-                       p.VisitorTeamTemplate = TeamTemplate.DefaultTemplate (5);
+                       p.LocalTeamTemplate = Team.DefaultTemplate (5);
+                       p.VisitorTeamTemplate = Team.DefaultTemplate (5);
                        MediaFile mf = new MediaFile ("path", 34000, 25, true, true, "mp4", "h264",
                                                      "aac", 320, 240, 1.3, null, "Test asset");
                        ProjectDescription pd = new ProjectDescription ();
diff --git a/Tests/Core/Store/TestProject.cs b/Tests/Core/Store/TestProject.cs
index bdf5dd0..42d9cd0 100644
--- a/Tests/Core/Store/TestProject.cs
+++ b/Tests/Core/Store/TestProject.cs
@@ -35,8 +35,8 @@ namespace Tests.Core.Store
                        Project p = new Project ();
                        p.Dashboard = Dashboard.DefaultTemplate (10);
                        p.UpdateEventTypesAndTimers ();
-                       p.LocalTeamTemplate = TeamTemplate.DefaultTemplate (10);
-                       p.VisitorTeamTemplate = TeamTemplate.DefaultTemplate (12);
+                       p.LocalTeamTemplate = Team.DefaultTemplate (10);
+                       p.VisitorTeamTemplate = Team.DefaultTemplate (12);
                        MediaFile mf = new MediaFile ("path", 34000, 25, true, true, "mp4", "h264",
                                               "aac", 320, 240, 1.3, null, "Test asset");
                        ProjectDescription pd = new ProjectDescription ();
diff --git a/Tests/Core/Store/TestTimelineEvent.cs b/Tests/Core/Store/TestTimelineEvent.cs
index 33ddacc..2e9c36a 100644
--- a/Tests/Core/Store/TestTimelineEvent.cs
+++ b/Tests/Core/Store/TestTimelineEvent.cs
@@ -35,7 +35,7 @@ namespace Tests.Core.Store
                        evt.EventType = evtType1;
                        evt.Notes = "notes";
                        evt.Selected = true;
-                       evt.Team = Team.LOCAL;
+                       evt.Team = TeamType.LOCAL;
                        evt.FieldPosition = new Coordinates();
                        evt.FieldPosition.Points.Add (new Point (1, 2));
                        evt.HalfFieldPosition = new Coordinates ();
diff --git a/Tests/Core/Store/TestTimer.cs b/Tests/Core/Store/TestTimer.cs
index 810c20c..2ff2cf2 100644
--- a/Tests/Core/Store/TestTimer.cs
+++ b/Tests/Core/Store/TestTimer.cs
@@ -32,7 +32,7 @@ namespace Tests.Core.Store
                        Utils.CheckSerialization (timer);
 
                        timer.Name = "test";
-                       timer.Team = LongoMatch.Core.Common.Team.LOCAL;
+                       timer.Team = LongoMatch.Core.Common.TeamType.LOCAL;
                        Timer timer2 = Utils.SerializeDeserialize (timer);
                        Assert.AreEqual (timer.Name, timer2.Name);
                        Assert.AreEqual (timer.Nodes, timer2.Nodes);


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