[longomatch] Apply text formatting



commit b64a245fba3cdeb974dbde8ec0d898a72d7dac05
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Mar 18 13:28:04 2015 +0100

    Apply text formatting

 LongoMatch.Addins/AddinsManager.cs              |   22 ++-
 LongoMatch.Addins/ConfigurablePlugin.cs         |    2 +-
 LongoMatch.Core/Common/Area.cs                  |    4 +-
 LongoMatch.Core/Common/CaptureSettings.cs       |    1 +
 LongoMatch.Core/Common/Cloner.cs                |   14 +-
 LongoMatch.Core/Common/ConsoleCrayon.cs         |  136 ++++++++--------
 LongoMatch.Core/Common/Device.cs                |   25 ++--
 LongoMatch.Core/Common/EncodingProfiles.cs      |   78 +++++----
 LongoMatch.Core/Common/EncodingQuality.cs       |   22 ++--
 LongoMatch.Core/Common/EncodingSettings.cs      |   27 ++--
 LongoMatch.Core/Common/EventsBroker.cs          |  202 +++++++++++++----------
 LongoMatch.Core/Common/EventsFilter.cs          |    5 +-
 LongoMatch.Core/Common/Exceptions.cs            |   47 +++---
 LongoMatch.Core/Common/Hotkeys.cs               |    5 +-
 LongoMatch.Core/Common/Image.cs                 |    1 -
 LongoMatch.Core/Config.cs                       |  156 +++++++++--------
 LongoMatch.Core/Handlers/Drawing.cs             |    8 +-
 LongoMatch.Core/Stats/EventTypeStats.cs         |    2 +-
 LongoMatch.Core/Stats/PercentualStat.cs         |    9 +-
 LongoMatch.Core/Stats/PlayerStats.cs            |    4 +-
 LongoMatch.Core/Stats/ProjectStats.cs           |    4 +-
 LongoMatch.Core/Stats/Stat.cs                   |    8 +-
 LongoMatch.Core/Stats/SubCategoryStat.cs        |    8 +-
 LongoMatch.Core/Stats/TeamStats.cs              |    4 +-
 LongoMatch.Core/Store/Drawables/Angle.cs        |   18 +-
 LongoMatch.Core/Store/Drawables/Circle.cs       |   11 +-
 LongoMatch.Core/Store/Drawables/Counter.cs      |    7 +-
 LongoMatch.Core/Store/Drawables/Cross.cs        |   42 +++---
 LongoMatch.Core/Store/Drawables/Line.cs         |   28 ++--
 LongoMatch.Core/Store/FrameDrawing.cs           |    5 +-
 LongoMatch.Core/StyleConf.cs                    |   16 +-
 LongoMatch.Plugins/CSVExporter.cs               |   28 ++--
 LongoMatch.Plugins/SystemDashboards.cs          |    2 +-
 LongoMatch.Services/Services/CoreServices.cs    |    4 +-
 LongoMatch.Services/Services/DataBaseManager.cs |    4 +-
 LongoMatch.Services/Services/EventsManager.cs   |   26 ++--
 LongoMatch.Services/Services/FileDB.cs          |    3 +-
 LongoMatch.Services/Services/FileStorage.cs     |   90 +++++------
 LongoMatch.Services/Services/ProjectsManager.cs |   20 +-
 39 files changed, 571 insertions(+), 527 deletions(-)
---
diff --git a/LongoMatch.Addins/AddinsManager.cs b/LongoMatch.Addins/AddinsManager.cs
index d9274b0..6abda75 100644
--- a/LongoMatch.Addins/AddinsManager.cs
+++ b/LongoMatch.Addins/AddinsManager.cs
@@ -41,8 +41,9 @@ namespace LongoMatch.Addins
                {
                        Log.Information ("Delete addins cache at " + configPath);
                        try {
-                       Directory.Delete (configPath, true);
-                       } catch (Exception ex) {}
+                               Directory.Delete (configPath, true);
+                       } catch (Exception ex) {
+                       }
                        searchPath = Path.GetFullPath (searchPath);
                        Log.Information ("Initializing addins at path: " + searchPath);
                        try {
@@ -57,7 +58,7 @@ namespace LongoMatch.Addins
                                string addinPath = addin.Description.AddinFile;
                                
                                if (!addinPath.StartsWith (searchPath) &&
-                                       !addinPath.StartsWith (Path.GetFullPath (Config.baseDirectory))) {
+                                   !addinPath.StartsWith (Path.GetFullPath (Config.baseDirectory))) {
                                        AddinManager.Registry.DisableAddin (addin.Id);
                                        Log.Debug ("Disable addin at path " + addinPath);
                                } else {
@@ -101,7 +102,7 @@ namespace LongoMatch.Addins
                                try {
                                        Log.Information ("Adding export entry from plugin: " + 
exportProject.Name);
                                        mainWindow.AddExportEntry (exportProject.GetMenuEntryName (), 
exportProject.GetMenuEntryShortName (),
-                                                                  new Action<Project, IGUIToolkit> 
(exportProject.ExportProject));
+                                               new Action<Project, IGUIToolkit> 
(exportProject.ExportProject));
                                } catch (Exception ex) {
                                        Log.Error ("Error adding export entry");
                                        Log.Exception (ex);
@@ -114,11 +115,11 @@ namespace LongoMatch.Addins
                        foreach (IImportProject importProject in 
AddinManager.GetExtensionObjects<IImportProject> ()) {
                                Log.Information ("Adding import entry from plugin: " + importProject.Name);
                                importer.RegisterImporter (new Func<string, Project> 
(importProject.ImportProject),
-                                                          importProject.Description,
-                                                          importProject.FilterName,
-                                                          importProject.FilterExtensions,
-                                                          importProject.NeedsEdition,
-                                                          importProject.CanOverwrite);
+                                       importProject.Description,
+                                       importProject.FilterName,
+                                       importProject.FilterExtensions,
+                                       importProject.NeedsEdition,
+                                       importProject.CanOverwrite);
                        }
                }
 
@@ -156,7 +157,8 @@ namespace LongoMatch.Addins
                        get { return pluginsDict; }
                }
 
-               private static Dictionary<AddinDescription, List<ConfigurablePlugin>> ListPlugins () {
+               private static Dictionary<AddinDescription, List<ConfigurablePlugin>> ListPlugins ()
+               {
                        HashSet <string> paths;
                        Dictionary<AddinDescription, List<ConfigurablePlugin>> plugins;
                        
diff --git a/LongoMatch.Addins/ConfigurablePlugin.cs b/LongoMatch.Addins/ConfigurablePlugin.cs
index e7a3b57..5e619b3 100644
--- a/LongoMatch.Addins/ConfigurablePlugin.cs
+++ b/LongoMatch.Addins/ConfigurablePlugin.cs
@@ -67,7 +67,7 @@ namespace LongoMatch.Addins
                void Load ()
                {
                        if (File.Exists (ConfigFile)) {
-                               using (StreamReader reader = File.OpenText(ConfigFile)) {
+                               using (StreamReader reader = File.OpenText (ConfigFile)) {
                                        JObject o;
                                        try {
                                                o = (JObject)JToken.ReadFrom (new JsonTextReader (reader));
diff --git a/LongoMatch.Core/Common/Area.cs b/LongoMatch.Core/Common/Area.cs
index 5d210ce..f21ab76 100644
--- a/LongoMatch.Core/Common/Area.cs
+++ b/LongoMatch.Core/Common/Area.cs
@@ -21,7 +21,7 @@ using Newtonsoft.Json;
 namespace LongoMatch.Core.Common
 {
        [Serializable]
-       [JsonObject(MemberSerialization.OptIn)]
+       [JsonObject (MemberSerialization.OptIn)]
        public class Area
        {
                public Area (Point start, double width, double height)
@@ -129,7 +129,7 @@ namespace LongoMatch.Core.Common
                public bool IntersectsWith (Area area)
                {
                        return !((Left >= area.Right) || (Right <= area.Left) ||
-                               (Top >= area.Bottom) || (Bottom <= area.Top));
+                       (Top >= area.Bottom) || (Bottom <= area.Top));
                }
 
                public override string ToString ()
diff --git a/LongoMatch.Core/Common/CaptureSettings.cs b/LongoMatch.Core/Common/CaptureSettings.cs
index fafb017..01dc747 100644
--- a/LongoMatch.Core/Common/CaptureSettings.cs
+++ b/LongoMatch.Core/Common/CaptureSettings.cs
@@ -26,6 +26,7 @@ namespace LongoMatch.Core.Common
                public Device Device;
                public DeviceVideoFormat Format;
                public EncodingSettings EncodingSettings;
+
        }
        
 }
diff --git a/LongoMatch.Core/Common/Cloner.cs b/LongoMatch.Core/Common/Cloner.cs
index a6071a1..cbd7de2 100644
--- a/LongoMatch.Core/Common/Cloner.cs
+++ b/LongoMatch.Core/Common/Cloner.cs
@@ -22,17 +22,17 @@ namespace LongoMatch.Core.Common
 {
        public static class Cloner
        {
-               public static T Clone<T> (this T source) {
-                       if (Object.ReferenceEquals(source, null))
+               public static T Clone<T> (this T source)
+               {
+                       if (Object.ReferenceEquals (source, null))
                                return default(T);
                        
-                       Stream s = new MemoryStream();
+                       Stream s = new MemoryStream ();
                        using (s) {
-                               Serializer.Save<T>(source, s, SerializationType.Binary);
-                               s.Seek(0, SeekOrigin.Begin);
-                               return Serializer.Load<T>(s, SerializationType.Binary);
+                               Serializer.Save<T> (source, s, SerializationType.Binary);
+                               s.Seek (0, SeekOrigin.Begin);
+                               return Serializer.Load<T> (s, SerializationType.Binary);
                        }
                }
        }
 }
-
diff --git a/LongoMatch.Core/Common/ConsoleCrayon.cs b/LongoMatch.Core/Common/ConsoleCrayon.cs
index afde6ed..2b33353 100644
--- a/LongoMatch.Core/Common/ConsoleCrayon.cs
+++ b/LongoMatch.Core/Common/ConsoleCrayon.cs
@@ -36,46 +36,48 @@ namespace LongoMatch.Core.Common
                #region Public API
 
                private static ConsoleColor foreground_color;
+
                public static ConsoleColor ForegroundColor {
                        get {
                                return foreground_color;
                        }
                        set {
                                foreground_color = value;
-                               SetColor(foreground_color, true);
+                               SetColor (foreground_color, true);
                        }
                }
 
                private static ConsoleColor background_color;
+
                public static ConsoleColor BackgroundColor {
                        get {
                                return background_color;
                        }
                        set {
                                background_color = value;
-                               SetColor(background_color, false);
+                               SetColor (background_color, false);
                        }
                }
 
-               public static void ResetColor()
+               public static void ResetColor ()
                {
-                       if(XtermColors) {
-                               Console.Write(GetAnsiResetControlCode());
-                       } else if(Environment.OSVersion.Platform != PlatformID.Unix && !RuntimeIsMono) {
-                               Console.ResetColor();
+                       if (XtermColors) {
+                               Console.Write (GetAnsiResetControlCode ());
+                       } else if (Environment.OSVersion.Platform != PlatformID.Unix && !RuntimeIsMono) {
+                               Console.ResetColor ();
                        }
                }
 
-               private static void SetColor(ConsoleColor color, bool isForeground)
+               private static void SetColor (ConsoleColor color, bool isForeground)
                {
-                       if(color < ConsoleColor.Black || color > ConsoleColor.White) {
-                               throw new ArgumentOutOfRangeException("color", "Not a ConsoleColor value.");
+                       if (color < ConsoleColor.Black || color > ConsoleColor.White) {
+                               throw new ArgumentOutOfRangeException ("color", "Not a ConsoleColor value.");
                        }
 
-                       if(XtermColors) {
-                               Console.Write(GetAnsiColorControlCode(color, isForeground));
-                       } else if(Environment.OSVersion.Platform != PlatformID.Unix && !RuntimeIsMono) {
-                               if(isForeground) {
+                       if (XtermColors) {
+                               Console.Write (GetAnsiColorControlCode (color, isForeground));
+                       } else if (Environment.OSVersion.Platform != PlatformID.Unix && !RuntimeIsMono) {
+                               if (isForeground) {
                                        Console.ForegroundColor = color;
                                } else {
                                        Console.BackgroundColor = color;
@@ -92,11 +94,11 @@ namespace LongoMatch.Core.Common
                // Authors: Gonzalo Paniagua Javier <gonzalo ximian com>
                // (C) 2005-2006 Novell, Inc <http://www.novell.com>
 
-               private static int TranslateColor(ConsoleColor desired, out bool light)
+               private static int TranslateColor (ConsoleColor desired, out bool light)
                {
                        light = false;
-                       switch(desired) {
-                               // Dark colors
+                       switch (desired) {
+                       // Dark colors
                        case ConsoleColor.Black:
                                return 0;
                        case ConsoleColor.DarkRed:
@@ -114,7 +116,7 @@ namespace LongoMatch.Core.Common
                        case ConsoleColor.Gray:
                                return 7;
 
-                               // Light colors
+                       // Light colors
                        case ConsoleColor.DarkGray:
                                light = true;
                                return 0;
@@ -143,16 +145,16 @@ namespace LongoMatch.Core.Common
                        }
                }
 
-               private static string GetAnsiColorControlCode(ConsoleColor color, bool isForeground)
+               private static string GetAnsiColorControlCode (ConsoleColor color, bool isForeground)
                {
                        // lighter fg colours are 90 -> 97 rather than 30 -> 37
                        // lighter bg colours are 100 -> 107 rather than 40 -> 47
                        bool light;
-                       int code = TranslateColor(color, out light) + (isForeground ? 30 : 40) + (light ? 60 
: 0);
-                       return String.Format("\x001b[{0}m", code);
+                       int code = TranslateColor (color, out light) + (isForeground ? 30 : 40) + (light ? 60 
: 0);
+                       return String.Format ("\x001b[{0}m", code);
                }
 
-               private static string GetAnsiResetControlCode()
+               private static string GetAnsiResetControlCode ()
                {
                        return "\x001b[0m";
                }
@@ -162,37 +164,38 @@ namespace LongoMatch.Core.Common
                #region xterm Detection
 
                private static bool? xterm_colors = null;
+
                public static bool XtermColors {
                        get {
-                               if(xterm_colors == null) {
-                                       DetectXtermColors();
+                               if (xterm_colors == null) {
+                                       DetectXtermColors ();
                                }
 
                                return xterm_colors.Value;
                        }
                }
 
-               [System.Runtime.InteropServices.DllImport("libc", EntryPoint="isatty")]
-               private extern static int _isatty(int fd);
+               [System.Runtime.InteropServices.DllImport ("libc", EntryPoint = "isatty")]
+               private extern static int _isatty (int fd);
 
-               private static bool isatty(int fd)
+               private static bool isatty (int fd)
                {
                        try {
-                               return _isatty(fd) == 1;
+                               return _isatty (fd) == 1;
                        } catch {
                                return false;
                        }
                }
 
-               private static void DetectXtermColors()
+               private static void DetectXtermColors ()
                {
                        bool _xterm_colors = false;
 
-                       switch(Environment.GetEnvironmentVariable("TERM")) {
+                       switch (Environment.GetEnvironmentVariable ("TERM")) {
                        case "xterm":
                        case "rxvt":
                        case "rxvt-unicode":
-                               if(Environment.GetEnvironmentVariable("COLORTERM") != null) {
+                               if (Environment.GetEnvironmentVariable ("COLORTERM") != null) {
                                        _xterm_colors = true;
                                }
                                break;
@@ -201,7 +204,7 @@ namespace LongoMatch.Core.Common
                                break;
                        }
 
-                       xterm_colors = _xterm_colors && isatty(1) && isatty(2);
+                       xterm_colors = _xterm_colors && isatty (1) && isatty (2);
                }
 
                #endregion
@@ -209,10 +212,11 @@ namespace LongoMatch.Core.Common
                #region Runtime Detection
 
                private static bool? runtime_is_mono;
+
                public static bool RuntimeIsMono {
                        get {
-                               if(runtime_is_mono == null) {
-                                       runtime_is_mono = Type.GetType("System.MonoType") != null;
+                               if (runtime_is_mono == null) {
+                                       runtime_is_mono = Type.GetType ("System.MonoType") != null;
                                }
 
                                return runtime_is_mono.Value;
@@ -223,54 +227,54 @@ namespace LongoMatch.Core.Common
 
                #region Tests
 
-               public static void Test()
+               public static void Test ()
                {
-                       TestSelf();
-                       Console.WriteLine();
-                       TestAnsi();
-                       Console.WriteLine();
-                       TestRuntime();
+                       TestSelf ();
+                       Console.WriteLine ();
+                       TestAnsi ();
+                       Console.WriteLine ();
+                       TestRuntime ();
                }
 
-               private static void TestSelf()
+               private static void TestSelf ()
                {
-                       Console.WriteLine("==SELF TEST==");
-                       foreach(ConsoleColor color in Enum.GetValues(typeof(ConsoleColor))) {
+                       Console.WriteLine ("==SELF TEST==");
+                       foreach (ConsoleColor color in Enum.GetValues(typeof(ConsoleColor))) {
                                ForegroundColor = color;
-                               Console.Write(color);
-                               ResetColor();
-                               Console.Write(" :: ");
+                               Console.Write (color);
+                               ResetColor ();
+                               Console.Write (" :: ");
                                BackgroundColor = color;
-                               Console.Write(color);
-                               ResetColor();
-                               Console.WriteLine();
+                               Console.Write (color);
+                               ResetColor ();
+                               Console.WriteLine ();
                        }
                }
 
-               private static void TestAnsi()
+               private static void TestAnsi ()
                {
-                       Console.WriteLine("==ANSI TEST==");
-                       foreach(ConsoleColor color in Enum.GetValues(typeof(ConsoleColor))) {
-                               string color_code_fg = GetAnsiColorControlCode(color, true);
-                               string color_code_bg = GetAnsiColorControlCode(color, false);
-                               Console.Write("{0}{1}: {2}{3} :: {4}{1}: {5}{3}", color_code_fg, color, 
color_code_fg.Substring(2),
-                                             GetAnsiResetControlCode(), color_code_bg, 
color_code_bg.Substring(2));
-                               Console.WriteLine();
+                       Console.WriteLine ("==ANSI TEST==");
+                       foreach (ConsoleColor color in Enum.GetValues(typeof(ConsoleColor))) {
+                               string color_code_fg = GetAnsiColorControlCode (color, true);
+                               string color_code_bg = GetAnsiColorControlCode (color, false);
+                               Console.Write ("{0}{1}: {2}{3} :: {4}{1}: {5}{3}", color_code_fg, color, 
color_code_fg.Substring (2),
+                                       GetAnsiResetControlCode (), color_code_bg, color_code_bg.Substring 
(2));
+                               Console.WriteLine ();
                        }
                }
 
-               private static void TestRuntime()
+               private static void TestRuntime ()
                {
-                       Console.WriteLine("==RUNTIME TEST==");
-                       foreach(ConsoleColor color in Enum.GetValues(typeof(ConsoleColor))) {
+                       Console.WriteLine ("==RUNTIME TEST==");
+                       foreach (ConsoleColor color in Enum.GetValues(typeof(ConsoleColor))) {
                                Console.ForegroundColor = color;
-                               Console.Write(color);
-                               Console.ResetColor();
-                               Console.Write(" :: ");
+                               Console.Write (color);
+                               Console.ResetColor ();
+                               Console.Write (" :: ");
                                Console.BackgroundColor = color;
-                               Console.Write(color);
-                               Console.ResetColor();
-                               Console.WriteLine();
+                               Console.Write (color);
+                               Console.ResetColor ();
+                               Console.WriteLine ();
                        }
                }
 
diff --git a/LongoMatch.Core/Common/Device.cs b/LongoMatch.Core/Common/Device.cs
index 3fb7d98..b5aa4ff 100644
--- a/LongoMatch.Core/Common/Device.cs
+++ b/LongoMatch.Core/Common/Device.cs
@@ -24,11 +24,11 @@ using Mono.Unix;
 namespace LongoMatch.Core.Common
 {
 
-
        public class Device
        {
-               public Device() {
-                       Formats = new List<DeviceVideoFormat>();
+               public Device ()
+               {
+                       Formats = new List<DeviceVideoFormat> ();
 
                }
 
@@ -44,11 +44,11 @@ namespace LongoMatch.Core.Common
                /// Device id, can be a human friendly name (for DirectShow devices),
                /// the de device name (/dev/video0) or the GUID (dv1394src)
                /// </summary>
-               public string ID  {
+               public string ID {
                        get;
                        set;
                }
-               
+
                public string SourceElement {
                        get;
                        set;
@@ -58,27 +58,28 @@ namespace LongoMatch.Core.Common
                        get;
                        set;
                }
-               
-               public string Desc  {
+
+               public string Desc {
                        get {
-                               return String.Format("{0} ({1})", ID, SourceElement);
+                               return String.Format ("{0} ({1})", ID, SourceElement);
                        }
                }
        }
-       
-       public struct DeviceVideoFormat {
+
+       public struct DeviceVideoFormat
+       {
                public int width;
                public int height;
                public int fps_n;
                public int fps_d;
-               
+
                public override string ToString ()
                {
                        if (width == 0 && height == 0 && fps_n == 0 && fps_d == 0) {
                                return Catalog.GetString ("Default");
                        }
                        return string.Format ("{0}x{1} {2}fps", width, height,
-                                             ((double)fps_n/fps_d).ToString ("#.##"));
+                               ((double)fps_n / fps_d).ToString ("#.##"));
                }
        }
 }
diff --git a/LongoMatch.Core/Common/EncodingProfiles.cs b/LongoMatch.Core/Common/EncodingProfiles.cs
index 2cc0a15..4fa2ade 100644
--- a/LongoMatch.Core/Common/EncodingProfiles.cs
+++ b/LongoMatch.Core/Common/EncodingProfiles.cs
@@ -30,19 +30,22 @@ namespace LongoMatch.Core.Common
                public AudioEncoderType AudioEncoder;
                public VideoMuxerType Muxer;
 
-               public EncodingProfile () {}
+               public EncodingProfile ()
+               {
+               }
 
-               public EncodingProfile(string name, string extension,
-                                      VideoEncoderType videoEncoder,
-                                      AudioEncoderType audioEncoder,
-                                      VideoMuxerType muxer) {
-                   Name = name;
-                   Extension = extension;
+               public EncodingProfile (string name, string extension,
+                                       VideoEncoderType videoEncoder,
+                                       AudioEncoderType audioEncoder,
+                                       VideoMuxerType muxer)
+               {
+                       Name = name;
+                       Extension = extension;
                        VideoEncoder = videoEncoder;
                        AudioEncoder = audioEncoder;
                        Muxer = muxer;
                }
-               
+
                public override bool Equals (object obj)
                {
                        EncodingProfile prof;
@@ -50,45 +53,46 @@ namespace LongoMatch.Core.Common
                                return false;
                        prof = (EncodingProfile)obj;
                        return prof.Name == Name &&
-                               prof.Extension == Extension &&
-                               prof.VideoEncoder == VideoEncoder &&
-                               prof.AudioEncoder == AudioEncoder &&
-                               prof.Muxer == Muxer;
+                       prof.Extension == Extension &&
+                       prof.VideoEncoder == VideoEncoder &&
+                       prof.AudioEncoder == AudioEncoder &&
+                       prof.Muxer == Muxer;
                }
 
                public override int GetHashCode ()
                {
                        return String.Format ("{0}-{1}-{2}-{3}-{4}", Name, Extension,
-                                             VideoEncoder, AudioEncoder, Muxer).GetHashCode();
+                               VideoEncoder, AudioEncoder, Muxer).GetHashCode ();
                }
        }
-       
-       public class EncodingProfiles {
-               public static EncodingProfile WebM = new EncodingProfile("WebM (VP8 + Vorbis)", "webm",
-                                                                        VideoEncoderType.VP8,
-                                                                        AudioEncoderType.Vorbis,
-                                                                        VideoMuxerType.WebM);
+
+       public class EncodingProfiles
+       {
+               public static EncodingProfile WebM = new EncodingProfile ("WebM (VP8 + Vorbis)", "webm",
+                                                            VideoEncoderType.VP8,
+                                                            AudioEncoderType.Vorbis,
+                                                            VideoMuxerType.WebM);
                                                                                     
-               public static EncodingProfile Avi = new EncodingProfile("AVI (Mpeg4 + MP3)", "avi",
-                                                                       VideoEncoderType.Mpeg4,
-                                                                       AudioEncoderType.Mp3,
-                                                                       VideoMuxerType.Avi);
+               public static EncodingProfile Avi = new EncodingProfile ("AVI (Mpeg4 + MP3)", "avi",
+                                                           VideoEncoderType.Mpeg4,
+                                                           AudioEncoderType.Mp3,
+                                                           VideoMuxerType.Avi);
 
-               public static EncodingProfile MP4 = new EncodingProfile("MP4 (H264 + AAC)", "mp4",
-                                                                       VideoEncoderType.H264,
-                                                                       AudioEncoderType.Aac,
-                                                                       VideoMuxerType.Mp4);
+               public static EncodingProfile MP4 = new EncodingProfile ("MP4 (H264 + AAC)", "mp4",
+                                                           VideoEncoderType.H264,
+                                                           AudioEncoderType.Aac,
+                                                           VideoMuxerType.Mp4);
                                                                        
-               public static EncodingProfile MatroskaMpeg4 = new EncodingProfile("Matroska (Mpeg4 + 
Vorbis)", "avi",
-                                                                       VideoEncoderType.Mpeg4,
-                                                                       AudioEncoderType.Vorbis,
-                                                                       VideoMuxerType.Matroska);
+               public static EncodingProfile MatroskaMpeg4 = new EncodingProfile ("Matroska (Mpeg4 + 
Vorbis)", "avi",
+                                                                     VideoEncoderType.Mpeg4,
+                                                                     AudioEncoderType.Vorbis,
+                                                                     VideoMuxerType.Matroska);
+
+               public static EncodingProfile MatroskaH264 = new EncodingProfile ("Matroska (H264 + AAC)", 
"mp4",
+                                                                    VideoEncoderType.H264,
+                                                                    AudioEncoderType.Aac,
+                                                                    VideoMuxerType.Matroska);
 
-               public static EncodingProfile MatroskaH264 = new EncodingProfile("Matroska (H264 + AAC)", 
"mp4",
-                                                                       VideoEncoderType.H264,
-                                                                       AudioEncoderType.Aac,
-                                                                       VideoMuxerType.Matroska);
-               
                public static List<EncodingProfile> Capture {
                        get {
                                List<EncodingProfile> list = new List<EncodingProfile> ();
@@ -96,7 +100,7 @@ namespace LongoMatch.Core.Common
                                return list;
                        }
                }
-               
+
                public static List<EncodingProfile> Render {
                        get {
                                List<EncodingProfile> list = new List<EncodingProfile> ();
diff --git a/LongoMatch.Core/Common/EncodingQuality.cs b/LongoMatch.Core/Common/EncodingQuality.cs
index 00f0dc7..c684f4f 100644
--- a/LongoMatch.Core/Common/EncodingQuality.cs
+++ b/LongoMatch.Core/Common/EncodingQuality.cs
@@ -28,36 +28,36 @@ namespace LongoMatch.Core.Common
                public string Name;
                public uint AudioQuality;
                public uint VideoQuality;
-               
+
                public EncodingQuality ()
                {
                }
-               
+
                public EncodingQuality (string name, uint videoQuality, uint audioQuality)
                {
                        Name = name;
                        VideoQuality = videoQuality;
                        AudioQuality = audioQuality;
                }
-               
+
                public override bool Equals (object obj)
                {
                        EncodingQuality q;
                        if (!(obj is EncodingQuality))
                                return false;
-                       q = (EncodingQuality) obj;      
+                       q = (EncodingQuality)obj;       
                        return q.Name == Name &&
-                               q.AudioQuality == AudioQuality &&
-                               q.VideoQuality == VideoQuality;
+                       q.AudioQuality == AudioQuality &&
+                       q.VideoQuality == VideoQuality;
                }
-               
+
                public override int GetHashCode ()
                {
-                       return String.Format ("{0}-{1}-{2}", Name, AudioQuality, VideoQuality).GetHashCode();
+                       return String.Format ("{0}-{1}-{2}", Name, AudioQuality, VideoQuality).GetHashCode ();
                }
 
        }
-       
+
        public class EncodingQualities
        {
                public static EncodingQuality Lowest = new EncodingQuality ("Lowest (500 kbps)", 500, 128);
@@ -65,7 +65,7 @@ namespace LongoMatch.Core.Common
                public static EncodingQuality Medium = new EncodingQuality ("Medium (2000 kbps)", 2000, 128);
                public static EncodingQuality High = new EncodingQuality ("High (4000 kbps)", 4000, 128);
                public static EncodingQuality Highest = new EncodingQuality ("Highest (6000 kbps)", 6000, 
128);
-               
+
                public static List<EncodingQuality> All {
                        get {
                                List<EncodingQuality> list = new List<EncodingQuality> ();
@@ -80,7 +80,7 @@ namespace LongoMatch.Core.Common
 
                public static EncodingQuality[] Transcode {
                        get {
-                                       return new EncodingQuality[] {Highest, High, Medium};
+                               return new EncodingQuality[] { Highest, High, Medium };
                        }
                }
        }
diff --git a/LongoMatch.Core/Common/EncodingSettings.cs b/LongoMatch.Core/Common/EncodingSettings.cs
index 5fd4039..10c10f6 100644
--- a/LongoMatch.Core/Common/EncodingSettings.cs
+++ b/LongoMatch.Core/Common/EncodingSettings.cs
@@ -16,15 +16,17 @@
 //  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 // 
 using System;
+
 namespace LongoMatch.Core.Common
 {
        [Serializable]
        public struct EncodingSettings
        {
-               public EncodingSettings(VideoStandard videoStandard, EncodingProfile encodingProfile,
-                                       EncodingQuality encodingQuality, uint fr_n, uint fr_d,
-                                       string outputFile, bool enableAudio, bool enableTitle,
-                                       uint titleSize) {
+               public EncodingSettings (VideoStandard videoStandard, EncodingProfile encodingProfile,
+                                        EncodingQuality encodingQuality, uint fr_n, uint fr_d,
+                                        string outputFile, bool enableAudio, bool enableTitle,
+                                        uint titleSize)
+               {
                        VideoStandard = videoStandard;
                        EncodingProfile = encodingProfile;
                        EncodingQuality = encodingQuality;
@@ -35,7 +37,7 @@ namespace LongoMatch.Core.Common
                        EnableAudio = enableAudio;
                        EnableTitle = enableTitle;
                }
-               
+
                public VideoStandard VideoStandard;
                public EncodingProfile EncodingProfile;
                public EncodingQuality EncodingQuality;
@@ -45,15 +47,16 @@ namespace LongoMatch.Core.Common
                public uint TitleSize;
                public bool EnableAudio;
                public bool EnableTitle;
+
                
-               
-               public static EncodingSettings DefaultRenderingSettings (string outputFilepath) {
+               public static EncodingSettings DefaultRenderingSettings (string outputFilepath)
+               {
                        return new EncodingSettings (Config.RenderVideoStandard,
-                                                    Config.RenderEncodingProfile,
-                                                    Config.RenderEncodingQuality,
-                                                    Config.FPS_N, Config.FPS_D,
-                                                    outputFilepath,
-                                                    Config.EnableAudio, Config.OverlayTitle, 20);
+                               Config.RenderEncodingProfile,
+                               Config.RenderEncodingQuality,
+                               Config.FPS_N, Config.FPS_D,
+                               outputFilepath,
+                               Config.EnableAudio, Config.OverlayTitle, 20);
                }
        }
 }
diff --git a/LongoMatch.Core/Common/EventsBroker.cs b/LongoMatch.Core/Common/EventsBroker.cs
index f96f574..070b56e 100644
--- a/LongoMatch.Core/Common/EventsBroker.cs
+++ b/LongoMatch.Core/Common/EventsBroker.cs
@@ -72,7 +72,7 @@ namespace LongoMatch.Core.Common
                public event ImportProjectHandler ImportProjectEvent;
                public event ExportProjectHandler ExportProjectEvent;
                public event QuitApplicationHandler QuitApplicationEvent;
-               public event ManageJobsHandler ManageJobsEvent; 
+               public event ManageJobsHandler ManageJobsEvent;
                public event ManageTeamsHandler ManageTeamsEvent;
                public event ManageDashboardsHandler ManageCategoriesEvent;
                public event ManageProjects ManageProjectsEvent;
@@ -97,28 +97,30 @@ namespace LongoMatch.Core.Common
 
                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) {
+                                       Time eventTime = null, Score score = null, PenaltyCard card = null)
+               {
                        if (NewTagEvent != null)
                                NewTagEvent (eventType, players, team, tags, start, stop, eventTime, score, 
card);
                }
-               
-               public void EmitNewEvent (TimelineEvent evt) {
+
+               public void EmitNewEvent (TimelineEvent evt)
+               {
                        if (NewTimelineEventEvent != null)
                                NewTimelineEventEvent (evt);
                }
 
-               public void EmitEventsDeleted(List<TimelineEvent> events)
+               public void EmitEventsDeleted (List<TimelineEvent> events)
                {
                        if (EventsDeletedEvent != null)
-                               EventsDeletedEvent(events);
+                               EventsDeletedEvent (events);
                }
-               
+
                public void EmitLoadEvent (TimelineEvent evt)
                {
                        if (LoadEventEvent != null)
                                LoadEventEvent (evt);
                }
-               
+
                public void EmitEventLoaded (TimelineEvent play)
                {
                        if (EventLoadedEvent != null)
@@ -131,50 +133,52 @@ namespace LongoMatch.Core.Common
                                EventEditedEvent (play);
                        }
                }
-               
-               public void EmitSnapshotSeries(TimelineEvent play)
+
+               public void EmitSnapshotSeries (TimelineEvent play)
                {
                        if (SnapshotSeries != null)
-                               SnapshotSeries(play);
+                               SnapshotSeries (play);
                }
-               
-               public void EmitRenderPlaylist(Playlist playlist) {
+
+               public void EmitRenderPlaylist (Playlist playlist)
+               {
                        if (RenderPlaylist != null)
-                               RenderPlaylist(playlist);
+                               RenderPlaylist (playlist);
                }
-               
+
                public void EmitNewPlaylist (Project project)
                {
                        if (NewPlaylistEvent != null) {
                                NewPlaylistEvent (project);
                        }
                }
-               
+
                public void EmitAddPlaylistElement (Playlist playlist, List<IPlaylistElement> plays)
                {
                        if (AddPlaylistElementEvent != null)
                                AddPlaylistElementEvent (playlist, plays);
                }
-               
+
                public void EmitPlaylistElementSelected (Playlist playlist, IPlaylistElement element)
                {
                        if (PlaylistElementSelectedEvent != null)
                                PlaylistElementSelectedEvent (playlist, element);
                }
-               
+
                public void EmitTimeNodeChanged (TimeNode tn, Time time)
                {
                        if (TimeNodeChanged != null)
                                TimeNodeChanged (tn, time);
                }
-               
-               public virtual void EmitMoveToEventType(TimelineEvent evnt, EventType eventType)
+
+               public virtual void EmitMoveToEventType (TimelineEvent evnt, EventType eventType)
                {
-                       if(MoveToEventTypeEvent != null)
-                               MoveToEventTypeEvent(evnt, eventType);
+                       if (MoveToEventTypeEvent != null)
+                               MoveToEventTypeEvent (evnt, eventType);
                }
-               
-               public void EmitTagEvent(TimelineEvent evt) {
+
+               public void EmitTagEvent (TimelineEvent evt)
+               {
                        if (TagEventEvent != null)
                                TagEventEvent (evt);
                }
@@ -184,24 +188,28 @@ namespace LongoMatch.Core.Common
                        if (DuplicateEventsEvent != null)
                                DuplicateEventsEvent (events);
                }
-               
-               public void EmitKeyPressed(object sender, HotKey key) {
+
+               public void EmitKeyPressed (object sender, HotKey key)
+               {
                        if (KeyPressed != null)
-                               KeyPressed(sender, key);
+                               KeyPressed (sender, key);
                }
-               
-               public bool EmitCloseOpenedProject () {
+
+               public bool EmitCloseOpenedProject ()
+               {
                        if (CloseOpenedProjectEvent != null)
                                return CloseOpenedProjectEvent ();
                        return false;
                }
-               
-               public void EmitShowProjectStats (Project project) {
+
+               public void EmitShowProjectStats (Project project)
+               {
                        if (ShowProjectStatsEvent != null)
                                ShowProjectStatsEvent (project);
                }
-               
-               public void EmitTagSubcategories (bool active) {
+
+               public void EmitTagSubcategories (bool active)
+               {
                        if (TagSubcategoriesChangedEvent != null)
                                TagSubcategoriesChangedEvent (active);
                }
@@ -212,89 +220,100 @@ namespace LongoMatch.Core.Common
                                ShowFullScreenEvent (active);
                        }
                }
-               
-               public void EmitSaveProject (Project project, ProjectType projectType) {
+
+               public void EmitSaveProject (Project project, ProjectType projectType)
+               {
                        if (SaveProjectEvent != null)
                                SaveProjectEvent (project, projectType);
                }
-               
-               public void EmitNewProject (Project project) {
+
+               public void EmitNewProject (Project project)
+               {
                        if (NewProjectEvent != null)
-                               NewProjectEvent(project);
+                               NewProjectEvent (project);
                }
-               
-               public void EmitOpenProject () {
-                       if(OpenProjectEvent != null)
-                               OpenProjectEvent();
+
+               public void EmitOpenProject ()
+               {
+                       if (OpenProjectEvent != null)
+                               OpenProjectEvent ();
                }
-                               
+
                public void EmitEditPreferences ()
                {
                        if (EditPreferencesEvent != null)
-                               EditPreferencesEvent();
+                               EditPreferencesEvent ();
                }
-               
-               public void EmitManageJobs() {
-                       if(ManageJobsEvent != null)
-                               ManageJobsEvent();
+
+               public void EmitManageJobs ()
+               {
+                       if (ManageJobsEvent != null)
+                               ManageJobsEvent ();
                }
-               
-               public void EmitManageTeams() {
-                       if(ManageTeamsEvent != null)
-                               ManageTeamsEvent();
+
+               public void EmitManageTeams ()
+               {
+                       if (ManageTeamsEvent != null)
+                               ManageTeamsEvent ();
                }
-               
-               public void EmitManageProjects()
+
+               public void EmitManageProjects ()
                {
                        if (ManageProjectsEvent != null)
-                               ManageProjectsEvent();
+                               ManageProjectsEvent ();
                }
-               
-               public void EmitManageDatabases()
+
+               public void EmitManageDatabases ()
                {
                        if (ManageDatabasesEvent != null)
-                               ManageDatabasesEvent();
+                               ManageDatabasesEvent ();
                }
-               
-               public void EmitManageCategories() {
-                       if(ManageCategoriesEvent != null)
-                               ManageCategoriesEvent();
+
+               public void EmitManageCategories ()
+               {
+                       if (ManageCategoriesEvent != null)
+                               ManageCategoriesEvent ();
                }
-               
-               public void EmitImportProject () {
+
+               public void EmitImportProject ()
+               {
                        if (ImportProjectEvent != null)
                                ImportProjectEvent ();
                }
-               
-               public void EmitExportProject (Project project) {
-                       if(ExportProjectEvent != null)
+
+               public void EmitExportProject (Project project)
+               {
+                       if (ExportProjectEvent != null)
                                ExportProjectEvent (project);
                }
-               
-               public void EmitOpenProjectID (Guid projectID ) {
+
+               public void EmitOpenProjectID (Guid projectID)
+               {
                        if (OpenProjectIDEvent != null) {
                                OpenProjectIDEvent (projectID);
                        }
                }
-               
+
                public void EmitOpenNewProject (Project project, ProjectType projectType, CaptureSettings 
captureSettings)
                {
                        if (OpenNewProjectEvent != null) {
                                OpenNewProjectEvent (project, projectType, captureSettings);
                        }
                }
-               
-               public void EmitConvertVideoFiles (List<MediaFile> files, EncodingSettings settings) {
+
+               public void EmitConvertVideoFiles (List<MediaFile> files, EncodingSettings settings)
+               {
                        if (ConvertVideoFilesEvent != null)
                                ConvertVideoFilesEvent (files, settings);
                }
-               
-               public void EmitQuitApplication () {
+
+               public void EmitQuitApplication ()
+               {
                        if (QuitApplicationEvent != null) {
                                QuitApplicationEvent ();
                        }
                }
-               
+
                public  void EmitOpenedProjectChanged (Project project, ProjectType projectType,
                                                       EventsFilter filter, IAnalysisWindow analysisWindow)
                {
@@ -309,28 +328,28 @@ namespace LongoMatch.Core.Common
                                CapturerTick (currentTime);
                        }
                }
-               
+
                public void EmitPlayerTick (Time currentTime)
                {
                        if (PlayerTick != null) {
                                PlayerTick (currentTime);
                        }
                }
-               
+
                public void EmitTeamTagsChanged ()
                {
                        if (TeamTagsChanged != null) {
                                TeamTagsChanged ();
                        }
                }
-               
+
                public void EmitCaptureFinished (bool close)
                {
                        if (CaptureFinished != null) {
                                CaptureFinished (close);
                        }
                }
-               
+
                public void EmitCaptureError (string message)
                {
                        if (CaptureError != null) {
@@ -351,14 +370,14 @@ namespace LongoMatch.Core.Common
                                Detach ();
                        }
                }
-               
+
                public void EmitNextPlaylistElement (Playlist playlist)
                {
                        if (NextPlaylistElementEvent != null) {
                                NextPlaylistElementEvent (playlist);
                        }
                }
-               
+
                public void EmitPreviousPlaylistElement (Playlist playlist)
                {
                        if (PreviousPlaylistElementEvent != null) {
@@ -379,13 +398,15 @@ namespace LongoMatch.Core.Common
                                PlaybackRateChanged (val);
                        }
                }
-               
-               public void EmitPlaylistsChanged (object sender) {
+
+               public void EmitPlaylistsChanged (object sender)
+               {
                        if (PlaylistsChangedEvent != null)
                                PlaylistsChangedEvent (sender);
                }
-               
-               public void EmitPressButton (DashboardButton button) {
+
+               public void EmitPressButton (DashboardButton button)
+               {
                }
 
                public void EmitSubstitutionEvent (Team team, Player p1, Player p2,
@@ -395,35 +416,35 @@ namespace LongoMatch.Core.Common
                                PlayerSubstitutionEvent (team, p1, p2, reason, time);
                        }
                }
-               
+
                public void EmitDashboardEdited ()
                {
                        if (DashboardEditedEvent != null) {
                                DashboardEditedEvent ();
                        }
                }
-               
+
                public void EmitSeekEvent (Time time, bool accurate)
                {
                        if (SeekEvent != null) {
                                SeekEvent (time, accurate);
                        }
                }
-               
+
                public void EmitTogglePlayEvent (bool playing)
                {
                        if (TogglePlayEvent != null) {
                                TogglePlayEvent (playing);
                        }
                }
-               
+
                public void EmitMigrateDB ()
                {
                        if (MigrateDB != null) {
                                MigrateDB ();
                        }
                }
-               
+
                public void EmitTimerNodeAddedEvent (Timer timer, TimeNode node)
                {
                        if (TimerNodeAddedEvent != null) {
@@ -439,4 +460,3 @@ namespace LongoMatch.Core.Common
                }
        }
 }
-
diff --git a/LongoMatch.Core/Common/EventsFilter.cs b/LongoMatch.Core/Common/EventsFilter.cs
index 4c8262d..5df063b 100644
--- a/LongoMatch.Core/Common/EventsFilter.cs
+++ b/LongoMatch.Core/Common/EventsFilter.cs
@@ -72,7 +72,7 @@ namespace LongoMatch.Core.Common
                        protected set;
                }
 
-               public void ClearAll (bool update=true)
+               public void ClearAll (bool update = true)
                {
                        eventsFilter.Clear ();
                        playersFilter.Clear ();
@@ -129,6 +129,7 @@ namespace LongoMatch.Core.Common
                                        tagsFilter.Remove (tag);
                        }
                }
+
                public void FilterTimer (Timer timer, bool visible)
                {
                        if (visible) {
@@ -236,7 +237,7 @@ namespace LongoMatch.Core.Common
                                        }
                                }
 
-                               if (play.Players.Count == 0 && VisiblePlayers.Count == 
+                               if (play.Players.Count == 0 && VisiblePlayers.Count ==
                                    project.LocalTeamTemplate.PlayingPlayersList.Count +
                                    project.VisitorTeamTemplate.PlayingPlayersList.Count) {
                                        player_match = true;
diff --git a/LongoMatch.Core/Common/Exceptions.cs b/LongoMatch.Core/Common/Exceptions.cs
index 2a98a03..884d7e9 100644
--- a/LongoMatch.Core/Common/Exceptions.cs
+++ b/LongoMatch.Core/Common/Exceptions.cs
@@ -24,76 +24,77 @@ namespace LongoMatch.Core.Common
 {
        public class DBLockedException: Exception
        {
-               public DBLockedException (Exception innerException):
-                       base (Catalog.GetString("Database locked:" + innerException.Message),
+               public DBLockedException (Exception innerException) :
+                       base (Catalog.GetString ("Database locked:" + innerException.Message),
                              innerException)
                {
                }
        }
-       
+
        public class UnknownDBErrorException: Exception
        {
-               public UnknownDBErrorException (Exception innerException):
-                       base (Catalog.GetString("Unknown database error:" + innerException),
+               public UnknownDBErrorException (Exception innerException) :
+                       base (Catalog.GetString ("Unknown database error:" + innerException),
                              innerException)
                {
                }
        }
-       
-       public class SubstitutionException: Exception {
-               public SubstitutionException (string error): base (error)
+
+       public class SubstitutionException: Exception
+       {
+               public SubstitutionException (string error) : base (error)
                {
                }
        }
-       
+
        public class ProjectDeserializationException: Exception
        {
-               public ProjectDeserializationException (Exception innerException):
-                       base (Catalog.GetString("Project loading failed:") + innerException,
+               public ProjectDeserializationException (Exception innerException) :
+                       base (Catalog.GetString ("Project loading failed:") + innerException,
                              innerException)
                {
                }
        }
-       
+
        public class ProjectNotFoundException: Exception
        {
-               public ProjectNotFoundException (string file):
-                       base (Catalog.GetString("Project file not found:\n") + file)
+               public ProjectNotFoundException (string file) :
+                       base (Catalog.GetString ("Project file not found:\n") + file)
                {
                }
        }
-       
+
        public class InvalidTemplateFilenameException: Exception
        {
-               public InvalidTemplateFilenameException (List<char> invalidChars):
-                       base (Catalog.GetString("The name contains invalid characters: ") + String.Join (" ", 
invalidChars))
+               public InvalidTemplateFilenameException (List<char> invalidChars) :
+                       base (Catalog.GetString ("The name contains invalid characters: ") + String.Join (" 
", invalidChars))
                {
                }
        }
 
        public class TemplateNotFoundException : Exception
        {
-               public TemplateNotFoundException (string name):
-                       base (Catalog.GetString("Template not found:\n") + name)
+               public TemplateNotFoundException (string name) :
+                       base (Catalog.GetString ("Template not found:\n") + name)
                {
                }
        }
 
        public class HotkeyAlreadyInUse: Exception
        {
-               public HotkeyAlreadyInUse (HotKey hotkey):
-                       base (Catalog.GetString("Hotkey already in use: ") + hotkey)
+               public HotkeyAlreadyInUse (HotKey hotkey) :
+                       base (Catalog.GetString ("Hotkey already in use: ") + hotkey)
                {
                }
        }
-       
+
        public class TimerNotRunningException: Exception
        {
        }
 
        public class AddinRequestShutdownException: Exception
        {
-               public AddinRequestShutdownException (string reason):
+               public AddinRequestShutdownException (string reason) :
                        base (reason)
                {
                }
diff --git a/LongoMatch.Core/Common/Hotkeys.cs b/LongoMatch.Core/Common/Hotkeys.cs
index e777ee3..100d573 100644
--- a/LongoMatch.Core/Common/Hotkeys.cs
+++ b/LongoMatch.Core/Common/Hotkeys.cs
@@ -44,14 +44,15 @@ namespace LongoMatch.Core.Common
                        get;
                        set;
                }
-               
+
                void UpdateMapping (KeyAction action, string name)
                {
                        HotKey key = Keyboard.ParseName (name);
                        ActionsHotkeys [action] = key;
                }
 
-               void FillDefaults() {
+               void FillDefaults ()
+               {
                        ActionsDescriptions [KeyAction.DeleteEvent] = Catalog.GetString ("Delete selected 
event");
                        ActionsDescriptions [KeyAction.DrawFrame] = Catalog.GetString ("Draw frame");
                        ActionsDescriptions [KeyAction.EditEvent] = Catalog.GetString ("Edit selected event");
diff --git a/LongoMatch.Core/Common/Image.cs b/LongoMatch.Core/Common/Image.cs
index a8daa42..0e35e16 100644
--- a/LongoMatch.Core/Common/Image.cs
+++ b/LongoMatch.Core/Common/Image.cs
@@ -221,7 +221,6 @@ namespace LongoMatch.Core.Common
                        return false;
                }
 #endif
-
        }
 }
 
diff --git a/LongoMatch.Core/Config.cs b/LongoMatch.Core/Config.cs
index b34b8d1..9eb8537 100644
--- a/LongoMatch.Core/Config.cs
+++ b/LongoMatch.Core/Config.cs
@@ -51,7 +51,8 @@ namespace LongoMatch
                static ConfigState state;
 
 
-               public static void Init () {
+               public static void Init ()
+               {
                        string home;
 
                        if (Environment.GetEnvironmentVariable ("LGM_UNINSTALLED") != null) {
@@ -60,14 +61,14 @@ namespace LongoMatch
                        } else {
                                Config.baseDirectory = Path.Combine (AppDomain.CurrentDomain.BaseDirectory, 
"../");
                                if (!Directory.Exists (Path.Combine (Config.baseDirectory, "share",
-                                                                    Constants.SOFTWARE_NAME))) {
+                                           Constants.SOFTWARE_NAME))) {
                                        Config.baseDirectory = Path.Combine (Config.baseDirectory, "../");
                                }
                                if (!Directory.Exists (Path.Combine (Config.baseDirectory, "share",
-                                                                    Constants.SOFTWARE_NAME)))
+                                           Constants.SOFTWARE_NAME)))
                                        Log.Warning ("Prefix directory not found");
                                Config.dataDir = Path.Combine (Config.baseDirectory, "share",
-                                                              Constants.SOFTWARE_NAME.ToLower ());
+                                       Constants.SOFTWARE_NAME.ToLower ());
                        }
                        
                        /* Check for the magic file PORTABLE to check if it's a portable version
@@ -82,14 +83,15 @@ namespace LongoMatch
                                Config.configDirectory = Config.homeDirectory;
                        else
                                Config.configDirectory = System.IO.Path.Combine (home, "." +
-                                       Constants.SOFTWARE_NAME.ToLower ());
+                               Constants.SOFTWARE_NAME.ToLower ());
                }
-               
-               public static void Load () {
-                       if (File.Exists(Config.ConfigFile)) {
+
+               public static void Load ()
+               {
+                       if (File.Exists (Config.ConfigFile)) {
                                Log.Information ("Loading config from " + Config.ConfigFile);
                                try {
-                                       state = Serializer.LoadSafe<ConfigState>(Config.ConfigFile);
+                                       state = Serializer.LoadSafe<ConfigState> (Config.ConfigFile);
                                } catch (Exception ex) {
                                        Log.Error ("Error loading config");
                                        Log.Exception (ex);
@@ -98,7 +100,7 @@ namespace LongoMatch
                        
                        if (state == null) {
                                Log.Information ("Creating new config at " + Config.ConfigFile);
-                               state = new ConfigState();
+                               state = new ConfigState ();
                                Save ();
                        }
                        Background = new Image (Path.Combine (Config.ImagesDir, Constants.BACKGROUND));
@@ -106,16 +108,17 @@ namespace LongoMatch
                        License = Constants.LICENSE;
                        SoftwareName = Constants.SOFTWARE_NAME;
                }
-               
-               public static void Save () {
+
+               public static void Save ()
+               {
                        try {
-                               Serializer.Save(state, Config.ConfigFile); 
+                               Serializer.Save (state, Config.ConfigFile); 
                        } catch (Exception ex) {
                                Log.Error ("Errro saving config");
                                Log.Exception (ex);
                        }
                }
-               
+
                public static StyleConf Style {
                        get {
                                if (style == null) {
@@ -130,11 +133,11 @@ namespace LongoMatch
 
                public static string ConfigFile {
                        get {
-                               string filename = Constants.SOFTWARE_NAME.ToLower() + "-1.0.config";
-                               return Path.Combine(Config.ConfigDir, filename);
+                               string filename = Constants.SOFTWARE_NAME.ToLower () + "-1.0.config";
+                               return Path.Combine (Config.ConfigDir, filename);
                        }
                }
-               
+
                public static string HomeDir {
                        get {
                                return homeDirectory;
@@ -146,7 +149,7 @@ namespace LongoMatch
                                baseDirectory = value;
                        }
                }
-               
+
                public static string ConfigDir {
                        set {
                                configDirectory = value;
@@ -155,34 +158,34 @@ namespace LongoMatch
                                return configDirectory;
                        }
                }
-               
+
                public static string PlayListDir {
                        get {
-                               return Path.Combine(homeDirectory, "playlists");
+                               return Path.Combine (homeDirectory, "playlists");
                        }
                }
 
                public static string SnapshotsDir {
                        get {
-                               return Path.Combine(homeDirectory, "snapshots");
+                               return Path.Combine (homeDirectory, "snapshots");
                        }
                }
 
                public static string TemplatesDir {
                        get {
-                               return Path.Combine(homeDirectory, "templates");
+                               return Path.Combine (homeDirectory, "templates");
                        }
                }
 
                public static string VideosDir {
                        get {
-                               return Path.Combine(homeDirectory, "videos");
+                               return Path.Combine (homeDirectory, "videos");
                        }
                }
 
                public static string TempVideosDir {
                        get {
-                               return Path.Combine(configDirectory, "temp");
+                               return Path.Combine (configDirectory, "temp");
                        }
                }
 
@@ -191,57 +194,59 @@ namespace LongoMatch
                                return Path.Combine (dataDir, "images");
                        }
                }
-               
+
                public static string IconsDir {
                        get {
                                return Path.Combine (dataDir, "icons");
                        }
                }
-               
+
                public static string LibsDir {
                        get {
-                               return RelativeToPrefix(Path.Combine ("lib",
-                                                                     Constants.SOFTWARE_NAME.ToLower()));
+                               return RelativeToPrefix (Path.Combine ("lib",
+                                       Constants.SOFTWARE_NAME.ToLower ()));
                        }
                }
 
                public static string PluginsDir {
                        get {
-                               return RelativeToPrefix(String.Format("lib/{0}/plugins",
-                                                                     Constants.SOFTWARE_NAME.ToLower()));
+                               return RelativeToPrefix (String.Format ("lib/{0}/plugins",
+                                       Constants.SOFTWARE_NAME.ToLower ()));
                        }
                }
-               
+
                public static string PluginsConfigDir {
                        get {
-                               return Path.Combine(configDirectory, "addins-1.0");
+                               return Path.Combine (configDirectory, "addins-1.0");
                        }
                }
 
                public static string DBDir {
                        get {
-                               return Path.Combine(homeDirectory, "db");
+                               return Path.Combine (homeDirectory, "db");
                        }
                }
 
                public static string AnalysisDir {
                        get {
-                               return Path.Combine(DBDir, "analysis");
+                               return Path.Combine (DBDir, "analysis");
                        }
                        
                }
+
                public static string TeamsDir {
                        get {
-                               return Path.Combine(DBDir, "teams");
+                               return Path.Combine (DBDir, "teams");
                        }
                }
-               
-               public static string RelativeToPrefix(string relativePath) {
-                       return Path.Combine(baseDirectory, relativePath);
+
+               public static string RelativeToPrefix (string relativePath)
+               {
+                       return Path.Combine (baseDirectory, relativePath);
                }
-               
+
                #region Properties
-               
+
                static public Image Background {
                        get;
                        set;
@@ -251,12 +256,12 @@ namespace LongoMatch
                        get;
                        set;
                }
-               
+
                static public string License {
                        get;
                        set;
                }
-               
+
                static public string SoftwareName {
                        get;
                        set;
@@ -272,25 +277,25 @@ namespace LongoMatch
                                return new Image (Path.Combine (Config.ImagesDir, 
Constants.FIELD_BACKGROUND));
                        }
                }
-               
+
                static public Image HalfFieldBackground {
                        get {
                                return new Image (Path.Combine (Config.ImagesDir, 
Constants.HALF_FIELD_BACKGROUND));
                        }
                }
-               
+
                static public Image HHalfFieldBackground {
                        get {
                                return new Image (Path.Combine (Config.ImagesDir, 
Constants.HHALF_FIELD_BACKGROUND));
                        }
                }
-               
+
                static public Image GoalBackground {
                        get {
                                return new Image (Path.Combine (Config.ImagesDir, Constants.GOAL_BACKGROUND));
                        }
                }
-               
+
                public static bool FastTagging {
                        get {
                                return state.fastTagging;
@@ -300,12 +305,12 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static bool UseGameUnits {
                        get;
                        set;
                }
-               
+
                public static string CurrentDatabase {
                        get {
                                return state.currentDatabase;
@@ -315,7 +320,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static string Lang {
                        get {
                                return state.lang;
@@ -325,7 +330,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static VideoStandard CaptureVideoStandard {
                        get {
                                return state.captureVideoStandard;
@@ -335,18 +340,18 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static EncodingProfile CaptureEncodingProfile {
                        get {
                                return state.captureEncodingProfile;
                        }
-                       set{
+                       set {
                                state.captureEncodingProfile = value;
                                Save ();
                                
                        }
                }
-               
+
                public static VideoStandard RenderVideoStandard {
                        get {
                                return state.renderVideoStandard;
@@ -356,29 +361,29 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static EncodingProfile RenderEncodingProfile {
                        get {
                                return state.renderEncodingProfile;
                        }
-                       set{
+                       set {
                                state.renderEncodingProfile = value;
                                Save ();
                                
                        }
                }
-               
+
                public static EncodingQuality CaptureEncodingQuality {
                        get {
                                return state.captureEncodingQuality;
                        }
-                       set{
+                       set {
                                state.captureEncodingQuality = value;
                                Save ();
                                
                        }
                }
-                       
+
                public static EncodingQuality RenderEncodingQuality {
                        get {
                                return state.renderEncodingQuality;
@@ -388,7 +393,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static bool AutoSave {
                        get {
                                return state.autoSave;
@@ -398,7 +403,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static bool OverlayTitle {
                        get {
                                return state.overlayTitle;
@@ -408,7 +413,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static bool EnableAudio {
                        get {
                                return state.enableAudio;
@@ -418,7 +423,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static uint FPS_N {
                        get {
                                return state.fps_n;
@@ -428,7 +433,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static uint FPS_D {
                        get {
                                return state.fps_d;
@@ -438,7 +443,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static bool AutoRenderPlaysInLive {
                        get {
                                return state.autorender;
@@ -448,7 +453,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static string AutoRenderDir {
                        get {
                                return state.autorenderDir;
@@ -458,7 +463,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static string LastRenderDir {
                        get {
                                return state.lastRenderDir;
@@ -468,7 +473,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static bool ReviewPlaysInSameWindow {
                        get {
                                return state.reviewPlaysInSameWindow;
@@ -478,7 +483,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static string DefaultTemplate {
                        get {
                                return state.defaultTemplate;
@@ -488,7 +493,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static Hotkeys Hotkeys {
                        get {
                                return state.hotkeys;
@@ -498,7 +503,7 @@ namespace LongoMatch
                                Save ();
                        }
                }
-               
+
                public static ProjectSortMethod ProjectSortMethod {
                        get {
                                return state.projectSortMethod;
@@ -508,13 +513,15 @@ namespace LongoMatch
                                Save ();
                        }
                }
+
                #endregion
 
        }
-       
+
        [Serializable]
        //[JsonConverter (typeof (LongoMatchConverter))]
-       public class ConfigState{
+       public class ConfigState
+       {
                public bool fastTagging;
                public bool autoSave;
                public string currentDatabase;
@@ -536,8 +543,9 @@ namespace LongoMatch
                public string defaultTemplate;
                public Hotkeys hotkeys;
                public ProjectSortMethod projectSortMethod;
-               
-               public ConfigState () {
+
+               public ConfigState ()
+               {
                        /* Set default values */
                        fastTagging = false;
                        currentDatabase = Constants.DEFAULT_DB_NAME;
diff --git a/LongoMatch.Core/Handlers/Drawing.cs b/LongoMatch.Core/Handlers/Drawing.cs
index d500a27..045c965 100644
--- a/LongoMatch.Core/Handlers/Drawing.cs
+++ b/LongoMatch.Core/Handlers/Drawing.cs
@@ -21,14 +21,14 @@ using LongoMatch.Core.Interfaces.Drawing;
 
 namespace LongoMatch.Core.Handlers.Drawing
 {
-       public delegate void DrawingHandler (IContext context, Area area);
-       public delegate void ButtonPressedHandler (Point coords, uint time, ButtonType type, ButtonModifier 
modifier);
-       public delegate void ButtonReleasedHandler (Point coords, ButtonType type, ButtonModifier modifier);
+       public delegate void DrawingHandler (IContext context,Area area);
+       public delegate void ButtonPressedHandler (Point coords,uint time,ButtonType type,ButtonModifier 
modifier);
+       public delegate void ButtonReleasedHandler (Point coords,ButtonType type,ButtonModifier modifier);
        public delegate void MotionHandler (Point coords);
        public delegate void ShowTooltipHandler (Point coords);
        public delegate void SizeChangedHandler ();
        public delegate void CanvasHandler (ICanvasObject co);
-       public delegate void RedrawHandler (ICanvasObject co, Area area);
+       public delegate void RedrawHandler (ICanvasObject co,Area area);
 
 }
 
diff --git a/LongoMatch.Core/Stats/EventTypeStats.cs b/LongoMatch.Core/Stats/EventTypeStats.cs
index 8929c27..714700e 100644
--- a/LongoMatch.Core/Stats/EventTypeStats.cs
+++ b/LongoMatch.Core/Stats/EventTypeStats.cs
@@ -58,7 +58,7 @@ namespace LongoMatch.Core.Stats
                                                localTeamCount = homeEvents.Count (e => e.Tags.Contains (t));
                                                visitorTeamCount = awayEvents.Count (e => e.Tags.Contains 
(t));
                                                PercentualStat pStat = new PercentualStat (t.Value, count, 
localTeamCount,
-                                                                                          visitorTeamCount, 
events.Count);
+                                                                              visitorTeamCount, 
events.Count);
                                                substat.OptionStats.Add (pStat);
                                        }
                                        SubcategoriesStats.Add (substat);
diff --git a/LongoMatch.Core/Stats/PercentualStat.cs b/LongoMatch.Core/Stats/PercentualStat.cs
index 324d382..fafb5e6 100644
--- a/LongoMatch.Core/Stats/PercentualStat.cs
+++ b/LongoMatch.Core/Stats/PercentualStat.cs
@@ -24,17 +24,16 @@ namespace LongoMatch.Core.Stats
        public class PercentualStat: Stat
        {
                int parentTotal;
-               
-               public PercentualStat (string name, int totalCount, int localTeamCount,
-                                      int visitorTeamCount, int parentTotal): base (name, totalCount, 
localTeamCount, visitorTeamCount)
 
+               public PercentualStat (string name, int totalCount, int localTeamCount,
+                                      int visitorTeamCount, int parentTotal) : base (name, totalCount, 
localTeamCount, visitorTeamCount)
                {
                        this.parentTotal = parentTotal;
                }
-               
+
                public int TotalPercent {
                        get {
-                               return (int) (((float)TotalCount) / parentTotal * 100);
+                               return (int)(((float)TotalCount) / parentTotal * 100);
                        }
                }
        }
diff --git a/LongoMatch.Core/Stats/PlayerStats.cs b/LongoMatch.Core/Stats/PlayerStats.cs
index ab10f1d..d72404f 100644
--- a/LongoMatch.Core/Stats/PlayerStats.cs
+++ b/LongoMatch.Core/Stats/PlayerStats.cs
@@ -80,11 +80,11 @@ namespace LongoMatch.Core.Stats
                        
                        subs = project.EventsByType (project.SubstitutionsEventType).
                                Where (s => !(s is LineupEvent) && ((s as SubstitutionEvent).In == Player ||
-                                                                   (s as SubstitutionEvent).Out == Player))
+                       (s as SubstitutionEvent).Out == Player))
                                .OrderBy (e => e.EventTime).Select (e => e as SubstitutionEvent).ToList ();
 
                        if (lineup.AwayStartingPlayers.Contains (Player) ||
-                               lineup.HomeStartingPlayers.Contains (Player)) {
+                           lineup.HomeStartingPlayers.Contains (Player)) {
                                start = lineup.EventTime;
                        } else {
                                SubstitutionEvent sub = subs.Where (s => s.In == Player).FirstOrDefault ();
diff --git a/LongoMatch.Core/Stats/ProjectStats.cs b/LongoMatch.Core/Stats/ProjectStats.cs
index b4c911f..cd2df2a 100644
--- a/LongoMatch.Core/Stats/ProjectStats.cs
+++ b/LongoMatch.Core/Stats/ProjectStats.cs
@@ -58,7 +58,7 @@ namespace LongoMatch.Core.Stats
                        get;
                        set;
                }
-               
+
                public TeamStats AwayTeamStats {
                        get;
                        set;
@@ -82,7 +82,7 @@ namespace LongoMatch.Core.Stats
                                return AwayTeamStats.PlayersStats.FirstOrDefault (ps => ps.Player == p);
                        }
                }
- 
+
                public void CreateStats ()
                {
                        EventTypeStats = new List <EventTypeStats> ();
diff --git a/LongoMatch.Core/Stats/Stat.cs b/LongoMatch.Core/Stats/Stat.cs
index 2f1a930..46001c9 100644
--- a/LongoMatch.Core/Stats/Stat.cs
+++ b/LongoMatch.Core/Stats/Stat.cs
@@ -32,22 +32,22 @@ namespace LongoMatch.Core.Stats
                        LocalTeamCount = localTeamCount;
                        VisitorTeamCount = visitorTeamCount;
                }
-       
+
                public string Name {
                        get;
                        set;
                }
-               
+
                public int TotalCount {
                        get;
                        set;
                }
-               
+
                public int LocalTeamCount {
                        get;
                        set;
                }
-               
+
                public int VisitorTeamCount {
                        get;
                        set;
diff --git a/LongoMatch.Core/Stats/SubCategoryStat.cs b/LongoMatch.Core/Stats/SubCategoryStat.cs
index b41cca1..b8e6ac0 100644
--- a/LongoMatch.Core/Stats/SubCategoryStat.cs
+++ b/LongoMatch.Core/Stats/SubCategoryStat.cs
@@ -28,18 +28,18 @@ namespace LongoMatch.Core.Stats
        {
                
                List<PercentualStat> optionStats;
-               
+
                public SubCategoryStat (string name)
                {
                        Name = name;
-                       optionStats = new List<PercentualStat>();
+                       optionStats = new List<PercentualStat> ();
                }
-               
+
                public string Name {
                        get;
                        set;
                }
-               
+
                public List<PercentualStat> OptionStats {
                        get {
                                return optionStats; 
diff --git a/LongoMatch.Core/Stats/TeamStats.cs b/LongoMatch.Core/Stats/TeamStats.cs
index a2ba48d..963219a 100644
--- a/LongoMatch.Core/Stats/TeamStats.cs
+++ b/LongoMatch.Core/Stats/TeamStats.cs
@@ -29,7 +29,7 @@ namespace LongoMatch.Core.Stats
                Team template;
                TeamType team;
                EventsFilter filter;
-               
+
                public TeamStats (Project project, EventsFilter filter, TeamType team)
                {
                        this.project = project;
@@ -50,7 +50,7 @@ namespace LongoMatch.Core.Stats
                        get;
                        set;
                }
-                               
+
                public void Update ()
                {
                        foreach (PlayerStats stats in PlayersStats) {
diff --git a/LongoMatch.Core/Store/Drawables/Angle.cs b/LongoMatch.Core/Store/Drawables/Angle.cs
index d91765b..a92f895 100644
--- a/LongoMatch.Core/Store/Drawables/Angle.cs
+++ b/LongoMatch.Core/Store/Drawables/Angle.cs
@@ -34,22 +34,22 @@ namespace LongoMatch.Core.Store.Drawables
                        Center = center;
                        Stop = stop;
                }
-               
+
                public Point Start {
                        get;
                        set;
                }
-               
+
                public Point Center {
                        get;
                        set;
                }
-               
+
                public Point Stop {
                        get;
                        set;
                }
-               
+
                [JsonIgnore]
                public double Degrees {
                        get {
@@ -60,8 +60,9 @@ namespace LongoMatch.Core.Store.Drawables
                                return a;
                        }
                }
-               
-               public override Selection GetSelection (Point p, double pr=0.05, bool inMotion=false) {
+
+               public override Selection GetSelection (Point p, double pr = 0.05, bool inMotion = false)
+               {
                        if (p.Distance (Start) < pr) {
                                return new Selection (this, SelectionPosition.AngleStart, p.Distance (Start));
                        } else if (p.Distance (Stop) < pr) {
@@ -72,8 +73,9 @@ namespace LongoMatch.Core.Store.Drawables
                                return null;
                        }
                }
-               
-               public override void Move (Selection sel, Point p, Point start) {
+
+               public override void Move (Selection sel, Point p, Point start)
+               {
                        switch (sel.Position) {
                        case SelectionPosition.AngleStart:
                                Start = p;
diff --git a/LongoMatch.Core/Store/Drawables/Circle.cs b/LongoMatch.Core/Store/Drawables/Circle.cs
index 9fea2e1..a9abc8d 100644
--- a/LongoMatch.Core/Store/Drawables/Circle.cs
+++ b/LongoMatch.Core/Store/Drawables/Circle.cs
@@ -27,16 +27,17 @@ namespace LongoMatch.Core.Store.Drawables
                public Circle ()
                {
                }
-               public Circle (Point center, double radius):
+
+               public Circle (Point center, double radius) :
                        base (center, radius, radius)
                {
                }
-               
+
                public double Radius {
                        get;
                        set;
                }
-               
+
                [JsonIgnore]
                public override double AxisY {
                        get {
@@ -46,7 +47,7 @@ namespace LongoMatch.Core.Store.Drawables
                                Radius = value;
                        }
                }
-               
+
                [JsonIgnore]
                public override double AxisX {
                        get {
@@ -61,7 +62,7 @@ namespace LongoMatch.Core.Store.Drawables
                public override Area Area {
                        get {
                                return new Area (new Point (Center.X - Radius, Center.Y - Radius),
-                                                Radius * 2, Radius * 2);
+                                       Radius * 2, Radius * 2);
                        }
                }
        }
diff --git a/LongoMatch.Core/Store/Drawables/Counter.cs b/LongoMatch.Core/Store/Drawables/Counter.cs
index 27f270f..ea5815a 100644
--- a/LongoMatch.Core/Store/Drawables/Counter.cs
+++ b/LongoMatch.Core/Store/Drawables/Counter.cs
@@ -23,10 +23,11 @@ namespace LongoMatch.Core.Store.Drawables
        [Serializable]
        public class Counter: Circle
        {
-               public Counter () {
+               public Counter ()
+               {
                }
-               
-               public Counter (Point center, double radius, int count):
+
+               public Counter (Point center, double radius, int count) :
                        base (center, radius)
                {
                        Count = count;
diff --git a/LongoMatch.Core/Store/Drawables/Cross.cs b/LongoMatch.Core/Store/Drawables/Cross.cs
index ef3787e..097b1c1 100644
--- a/LongoMatch.Core/Store/Drawables/Cross.cs
+++ b/LongoMatch.Core/Store/Drawables/Cross.cs
@@ -28,58 +28,59 @@ namespace LongoMatch.Core.Store.Drawables
                public Cross ()
                {
                }
-               
+
                public Cross (Point start, Point stop, LineStyle style)
                {
                        Start = start;
                        Stop = stop;
                        Style = style;
                }
-               
+
                public Point Start {
                        set;
                        get;
                }
-               
+
                public Point Stop {
                        set;
                        get;
                }
-               
+
                [JsonIgnore]
                public override Area Area {
                        get {
                                Point tl = new Point (Math.Min (Start.X, Stop.X),
-                                                     Math.Min (Start.Y, Stop.Y));
+                                                  Math.Min (Start.Y, Stop.Y));
                                return new Area (tl, Math.Abs (Start.X - Stop.X),
-                                                Math.Abs (Start.Y - Stop.Y));
+                                       Math.Abs (Start.Y - Stop.Y));
                        }
                }
-               
+
                [JsonIgnore]
                public Point StartI {
                        get {
                                return new Point (Stop.X, Start.Y);
                        }
                }
-               
+
                [JsonIgnore]
                public Point StopI {
                        get {
                                return new Point (Start.X, Stop.Y);
                        }
                }
-               
+
                public override void Reorder ()
                {
-                       Point [] array = new Point[] {Start, Stop, StartI, StopI};
+                       Point[] array = new Point[] { Start, Stop, StartI, StopI };
                        
-                       array = array.OrderBy (p=> p.X).ThenBy (p=> p.Y).ToArray();
-                       Start = array[0];
-                       Stop = array[3];
+                       array = array.OrderBy (p => p.X).ThenBy (p => p.Y).ToArray ();
+                       Start = array [0];
+                       Stop = array [3];
                }
-               
-               public override Selection GetSelection (Point p, double pr=0.05, bool inMotion=false) {
+
+               public override Selection GetSelection (Point p, double pr = 0.05, bool inMotion = false)
+               {
                        double d;
                        Selection sel;
                        
@@ -96,10 +97,10 @@ namespace LongoMatch.Core.Store.Drawables
                        } else if (MatchPoint (StopI, p, pr, out d)) {
                                return new Selection (this, SelectionPosition.BottomLeft, d);
                        } else {
-                               Line aline = new Line {Start = Start, Stop = Stop};
+                               Line aline = new Line { Start = Start, Stop = Stop };
                                sel = aline.GetSelection (p, pr);
                                if (sel == null) {
-                                       Line bline = new Line {Start = StartI, Stop = StopI};
+                                       Line bline = new Line { Start = StartI, Stop = StopI };
                                        sel = bline.GetSelection (p, pr);
                                }
                                if (sel != null) {
@@ -108,9 +109,10 @@ namespace LongoMatch.Core.Store.Drawables
                                return sel;
                        }
                }
-               
-               public override void Move (Selection sel, Point p, Point moveStart) {
-                                               switch (sel.Position) {
+
+               public override void Move (Selection sel, Point p, Point moveStart)
+               {
+                       switch (sel.Position) {
                        case SelectionPosition.TopLeft:
                                Start = p;
                                break;
diff --git a/LongoMatch.Core/Store/Drawables/Line.cs b/LongoMatch.Core/Store/Drawables/Line.cs
index 2706f9a..39a01f4 100644
--- a/LongoMatch.Core/Store/Drawables/Line.cs
+++ b/LongoMatch.Core/Store/Drawables/Line.cs
@@ -36,27 +36,27 @@ namespace LongoMatch.Core.Store.Drawables
                        Type = type;
                        Style = style;
                }
-               
+
                public Point Start {
                        get;
                        set;
                }
-               
+
                public Point Stop {
                        get;
                        set;
                }
-               
-               public LineType Type{
+
+               public LineType Type {
                        get;
                        set;
                }
-               
+
                [JsonIgnore]
                public override Area Area {
                        get {
                                return new Area (new Point (Math.Min (Start.X, Stop.X), Math.Min (Start.Y, 
Stop.Y)),
-                                                Math.Abs (Stop.X - Start.X), Math.Abs (Stop.Y - Start.Y));
+                                       Math.Abs (Stop.X - Start.X), Math.Abs (Stop.Y - Start.Y));
                        }
                }
 
@@ -64,11 +64,12 @@ namespace LongoMatch.Core.Store.Drawables
                public Point Center {
                        get {
                                return new Point (Start.X + (Stop.X - Start.X) / 2,
-                                                 Start.Y + (Stop.Y -Start.Y) / 2);
+                                       Start.Y + (Stop.Y - Start.Y) / 2);
                        }
                }
-               
-               public override Selection GetSelection (Point p, double pr=0.05, bool inMotion=false) {
+
+               public override Selection GetSelection (Point p, double pr = 0.05, bool inMotion = false)
+               {
                        double d;
                
                        if (MatchPoint (Start, p, pr, out d)) {
@@ -97,16 +98,17 @@ namespace LongoMatch.Core.Store.Drawables
                                        d = Math.Abs ((slope * p.X) + yi - p.Y);
                                }
                                
-                               if (d  < pr) {
+                               if (d < pr) {
                                        return new Selection (this, SelectionPosition.All, d);
                                } else {
                                        return null;
                                }
                        }
                }
-               
-               public override void Move (Selection sel, Point p, Point moveStart) {
-                                               switch (sel.Position) {
+
+               public override void Move (Selection sel, Point p, Point moveStart)
+               {
+                       switch (sel.Position) {
                        case SelectionPosition.LineStart:
                                Start = p;
                                break;
diff --git a/LongoMatch.Core/Store/FrameDrawing.cs b/LongoMatch.Core/Store/FrameDrawing.cs
index e95882f..967d81e 100644
--- a/LongoMatch.Core/Store/FrameDrawing.cs
+++ b/LongoMatch.Core/Store/FrameDrawing.cs
@@ -37,11 +37,12 @@ namespace LongoMatch.Core.Store
                /// are used by { MediaTimeNodes} to store the key frame drawing
                /// which stop time is stored in a int value
                /// </summary>
-               public FrameDrawing() {
+               public FrameDrawing ()
+               {
                        Pause = new Time (DEFAULT_PAUSE_TIME);
                        Drawables = new List<Drawable> ();
                }
-               
+
                public Image Miniature {
                        get;
                        set;
diff --git a/LongoMatch.Core/StyleConf.cs b/LongoMatch.Core/StyleConf.cs
index 38ed10e..1eef4e4 100644
--- a/LongoMatch.Core/StyleConf.cs
+++ b/LongoMatch.Core/StyleConf.cs
@@ -60,7 +60,7 @@ namespace LongoMatch.Core.Common
                public const int ListCategoryHeight = 50;
                public const int ListCountRadio = 10;
                public const int ListCountWidth = 20;
-               public const int ListTextOffset =  ListRowSeparator * 2 + StyleConf.ListCountRadio * 2 + 
StyleConf.ListCountWidth;
+               public const int ListTextOffset = ListRowSeparator * 2 + StyleConf.ListCountRadio * 2 + 
StyleConf.ListCountWidth;
 
                public const int ListEyeIconOffset = 10;
                public const string ListEyeIconPath = "hicolor/scalable/actions/longomatch-eye.svg";
@@ -89,11 +89,11 @@ namespace LongoMatch.Core.Common
                public const string PlayerArrowIn = "player/arrow-in.svg";
                public const string PlayerPhoto = "player/photo.svg";
                public const int PlayerLineWidth = 2;
-               public const int PlayerSize  = 60;
-               public const int PlayerNumberSize  = 20;
+               public const int PlayerSize = 60;
+               public const int PlayerNumberSize = 20;
                public const int PlayerArrowSize = PlayerNumberSize;
-               public const int PlayerNumberX  = 0;
-               public const int PlayerNumberY  = 60 - PlayerLineWidth - PlayerNumberSize + 1;
+               public const int PlayerNumberX = 0;
+               public const int PlayerNumberY = 60 - PlayerLineWidth - PlayerNumberSize + 1;
                public const int PlayerArrowX = PlayerNumberX;
                public const int PlayerArrowY = PlayerNumberY - PlayerArrowSize + 1;
                
@@ -136,7 +136,7 @@ namespace LongoMatch.Core.Common
                public int TeamTaggerBenchBorder = 10;
 
                public string Font = "Ubuntu";
-               
+
                public Color HomeTeamColor { get; set; }
 
                public Color AwayTeamColor { get; set; }
@@ -156,7 +156,7 @@ namespace LongoMatch.Core.Common
                public Color PaletteActive { get; set; }
 
                public Color PaletteTool { get; set; }
-               
+
                public Color PaletteText { get; set; }
 
                public StyleConf ()
@@ -173,7 +173,7 @@ namespace LongoMatch.Core.Common
                        PaletteTool = Color.Black;
                        PaletteText = Color.Black;
                }
-               
+
                public static StyleConf Load (string filename)
                {
                        return Serializer.Load <StyleConf> (filename);
diff --git a/LongoMatch.Plugins/CSVExporter.cs b/LongoMatch.Plugins/CSVExporter.cs
index 777017c..e5a475e 100644
--- a/LongoMatch.Plugins/CSVExporter.cs
+++ b/LongoMatch.Plugins/CSVExporter.cs
@@ -58,8 +58,8 @@ namespace LongoMatch.Plugins
                {
                        string proposed_filename = project.Description.Title + ".csv";
                        string filename = guiToolkit.SaveFile (Catalog.GetString ("Output file"), 
proposed_filename,
-                                                              Config.HomeDir, "CSV",
-                                                              new string[] { ".csv" });
+                                                 Config.HomeDir, "CSV",
+                                                 new string[] { ".csv" });
                        
                        if (filename == null)
                                return;
@@ -98,7 +98,7 @@ namespace LongoMatch.Plugins
                        File.WriteAllLines (filename, output);
                }
 
-               string TeamName(TeamType team)
+               string TeamName (TeamType team)
                {
                        if (team == TeamType.LOCAL) {
                                return project.LocalTeamTemplate.TeamName;
@@ -111,13 +111,13 @@ namespace LongoMatch.Plugins
                        }
                }
 
-               void ExportCategory(EventType evt)
+               void ExportCategory (EventType evt)
                {
                        string headers;
                        List<TimelineEvent> plays;
                        
-                       output.Add("CATEGORY: " + evt.Name);
-                       plays = project.EventsByType(evt);
+                       output.Add ("CATEGORY: " + evt.Name);
+                       plays = project.EventsByType (evt);
                        
                        /* Write Headers for this category */
                        headers = "Name;Time;Start;Stop;Team;Player";
@@ -126,20 +126,20 @@ namespace LongoMatch.Plugins
                        }
                        if (evt is AnalysisEventType) {
                                foreach (Tag tag in (evt as AnalysisEventType).Tags) {
-                                       headers += String.Format(";{0}", tag.Value);
+                                       headers += String.Format (";{0}", tag.Value);
                                }
                        }
-                       output.Add(headers);
+                       output.Add (headers);
                        
                        foreach (TimelineEvent play in plays.OrderBy(p=>p.Start)) {
                                string line;
                                
-                               line = String.Format("{0};{1};{2};{3};{4};{5}", play.Name,
-                                                     play.EventTime == null ? "" : 
play.EventTime.ToMSecondsString(),
-                                                     play.Start.ToMSecondsString(),
-                                                     play.Stop.ToMSecondsString(),
-                                                     TeamName(project.EventTaggedTeam(play)),
-                                                     String.Join (" | ", play.Players));
+                               line = String.Format ("{0};{1};{2};{3};{4};{5}", play.Name,
+                                       play.EventTime == null ? "" : play.EventTime.ToMSecondsString (),
+                                       play.Start.ToMSecondsString (),
+                                       play.Stop.ToMSecondsString (),
+                                       TeamName (project.EventTaggedTeam (play)),
+                                       String.Join (" | ", play.Players));
 
                                if (evt is ScoreEventType) {
                                        line += ";" + (play as ScoreEvent).Score.Points;
diff --git a/LongoMatch.Plugins/SystemDashboards.cs b/LongoMatch.Plugins/SystemDashboards.cs
index 0ba2d74..356e640 100644
--- a/LongoMatch.Plugins/SystemDashboards.cs
+++ b/LongoMatch.Plugins/SystemDashboards.cs
@@ -43,7 +43,7 @@ namespace LongoMatch.Plugins
                        get {
                                Dashboard d = Dashboard.DefaultTemplate (14);
                                d.Name = "Default";
-                               return new List<Dashboard> {d}; 
+                               return new List<Dashboard> { d };       
                        }
                }
        }
diff --git a/LongoMatch.Services/Services/CoreServices.cs b/LongoMatch.Services/Services/CoreServices.cs
index ffffa42..8b9f0c6 100644
--- a/LongoMatch.Services/Services/CoreServices.cs
+++ b/LongoMatch.Services/Services/CoreServices.cs
@@ -84,7 +84,7 @@ namespace LongoMatch.Services
 
                public static void StartServices (IGUIToolkit guiToolkit, IMultimediaToolkit 
multimediaToolkit)
                {
-                       ts = new TemplatesService (new FileStorage(Config.DBDir));
+                       ts = new TemplatesService (new FileStorage (Config.DBDir));
                        Config.TeamTemplatesProvider = ts.TeamTemplateProvider;
                        Config.CategoriesTemplatesProvider = ts.CategoriesTemplateProvider;
 
@@ -150,7 +150,7 @@ namespace LongoMatch.Services
                {
                        return !String.IsNullOrEmpty (Environment.GetEnvironmentVariable (env));
                }
-               
+
                static void HandleQuitApplicationEvent ()
                {
                        if (videoRenderer.PendingJobs.Count > 0) {
diff --git a/LongoMatch.Services/Services/DataBaseManager.cs b/LongoMatch.Services/Services/DataBaseManager.cs
index 3297e6f..aa810bd 100644
--- a/LongoMatch.Services/Services/DataBaseManager.cs
+++ b/LongoMatch.Services/Services/DataBaseManager.cs
@@ -39,7 +39,9 @@ namespace LongoMatch.DB
                        this.DBDir = DBDir;
                        this.guiToolkit = guiToolkit;
                        Config.EventsBroker.ManageDatabasesEvent += HandleManageDatabase;
-                       Config.EventsBroker.OpenedProjectChanged += (p, pt, f, a) => {OpenedProject = p;};
+                       Config.EventsBroker.OpenedProjectChanged += (p, pt, f, a) => {
+                               OpenedProject = p;
+                       };
                        UpdateDatabases ();
                }
 
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index bb98ae9..1306eb4 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -111,7 +111,7 @@ namespace LongoMatch.Services
                        Config.EventsBroker.KeyPressed += HandleKeyPressed;
                }
 
-               void DeletePlays (List<TimelineEvent> plays, bool update=true)
+               void DeletePlays (List<TimelineEvent> plays, bool update = true)
                {
                        Log.Debug (plays.Count + " plays deleted");
                        analysisWindow.DeletePlays (plays);
@@ -219,14 +219,14 @@ namespace LongoMatch.Services
                        string outputDir, outputProjectDir, outputFile;
                        
                        if (Config.AutoRenderDir == null ||
-                               !Directory.Exists (Config.AutoRenderDir)) {
+                           !Directory.Exists (Config.AutoRenderDir)) {
                                outputDir = Config.VideosDir;
                        } else {
                                outputDir = Config.AutoRenderDir;
                        }
                        
                        outputProjectDir = Path.Combine (outputDir,
-                                                        Utils.SanitizePath (project.Description.DateTitle));
+                               Utils.SanitizePath (project.Description.DateTitle));
                        outputFile = String.Format ("{0}-{1}.mp4", play.EventType.Name, play.Name);
                        outputFile = Utils.SanitizePath (outputFile, ' ');
                        outputFile = Path.Combine (outputProjectDir, outputFile);
@@ -252,11 +252,11 @@ namespace LongoMatch.Services
 
                        /* Get the current frame and get a thumbnail from it */
                        if (projectType == ProjectType.CaptureProject ||
-                               projectType == ProjectType.URICaptureProject) {
+                           projectType == ProjectType.URICaptureProject) {
                                frame = capturer.CurrentCaptureFrame;
                        } else if (projectType == ProjectType.FileProject) {
                                frame = framesCapturer.GetFrame (tagtime, true, Constants.MAX_THUMBNAIL_SIZE,
-                                                                Constants.MAX_THUMBNAIL_SIZE);
+                                       Constants.MAX_THUMBNAIL_SIZE);
                        }
                        return frame;
                }
@@ -278,7 +278,7 @@ namespace LongoMatch.Services
                        Save (openedProject);
                        
                        if (projectType == ProjectType.CaptureProject ||
-                               projectType == ProjectType.URICaptureProject) {
+                           projectType == ProjectType.URICaptureProject) {
                                if (Config.AutoRenderPlaysInLive) {
                                        RenderPlay (openedProject, play);
                                }
@@ -292,15 +292,15 @@ namespace LongoMatch.Services
                                return;
 
                        if (projectType == ProjectType.CaptureProject ||
-                               projectType == ProjectType.URICaptureProject) {
+                           projectType == ProjectType.URICaptureProject) {
                                if (!capturer.Capturing) {
                                        guiToolkit.WarningMessage (Catalog.GetString ("Video capture is 
stopped"));
                                        return;
                                }
                        }
                        Log.Debug (String.Format ("New play created start:{0} stop:{1} category:{2}",
-                                                 start.ToMSecondsString (), stop.ToMSecondsString (),
-                                                 evType.Name));
+                               start.ToMSecondsString (), stop.ToMSecondsString (),
+                               evType.Name));
                        /* Add the new created play to the project and update the GUI*/
                        var play = openedProject.AddEvent (evType, start, stop, eventTime, null, score, card);
                        play.Team = team;
@@ -319,8 +319,8 @@ namespace LongoMatch.Services
                                return;
                        
                        if (projectType == ProjectType.CaptureProject ||
-                               projectType == ProjectType.URICaptureProject ||
-                               projectType == ProjectType.FakeCaptureProject) {
+                           projectType == ProjectType.URICaptureProject ||
+                           projectType == ProjectType.FakeCaptureProject) {
                                if (!capturer.Capturing) {
                                        guiToolkit.WarningMessage (Catalog.GetString ("Video capture is 
stopped"));
                                        return;
@@ -341,8 +341,8 @@ namespace LongoMatch.Services
                        }
 
                        Log.Debug (String.Format ("New play created start:{0} stop:{1} category:{2}",
-                                                 play.Start.ToMSecondsString (), play.Stop.ToMSecondsString 
(),
-                                                 play.EventType.Name));
+                               play.Start.ToMSecondsString (), play.Stop.ToMSecondsString (),
+                               play.EventType.Name));
                        openedProject.AddEvent (play);
                        AddNewPlay (play);
                }
diff --git a/LongoMatch.Services/Services/FileDB.cs b/LongoMatch.Services/Services/FileDB.cs
index 8fd23e7..32b194f 100644
--- a/LongoMatch.Services/Services/FileDB.cs
+++ b/LongoMatch.Services/Services/FileDB.cs
@@ -33,6 +33,7 @@ namespace LongoMatch.DB
                string dbName;
                TimeSpan maxDaysWithoutBackup = new TimeSpan (5, 0, 0, 0);
 
+
                public DataBase (string dbDirPath)
                {
                        dbName = Path.GetFileNameWithoutExtension (dbDirPath);
@@ -219,7 +220,7 @@ namespace LongoMatch.DB
                        DBPath = dbPath;
                        ProjectsDict = new Dictionary <Guid, ProjectDescription> ();
                        Version = new System.Version (Constants.DB_MAYOR_VERSION,
-                                                     Constants.DB_MINOR_VERSION);
+                               Constants.DB_MINOR_VERSION);
                        LastBackup = DateTime.UtcNow;
                }
 
diff --git a/LongoMatch.Services/Services/FileStorage.cs b/LongoMatch.Services/Services/FileStorage.cs
index 1448a72..adb772c 100644
--- a/LongoMatch.Services/Services/FileStorage.cs
+++ b/LongoMatch.Services/Services/FileStorage.cs
@@ -40,14 +40,13 @@ namespace LongoMatch.Services.Services
                        }
                }
 
-               ~FileStorage()
+               ~FileStorage ()
                {
                        if (deleteOnDestroy)
-                               Reset();
+                               Reset ();
                }
 
-               public string BasePath
-               {
+               public string BasePath {
                        get {
                                return basePath;
                        }
@@ -55,7 +54,7 @@ namespace LongoMatch.Services.Services
 
                private string ResolvePath<T> ()
                {
-                       string typePath = Path.Combine(basePath, ResolveType (typeof(T)));
+                       string typePath = Path.Combine (basePath, ResolveType (typeof(T)));
 
                        if (!Directory.Exists (typePath)) {
                                Log.Information ("Creating directory " + typePath);
@@ -84,16 +83,11 @@ namespace LongoMatch.Services.Services
                        string sType = ResolveType (t);
 
                        // Add the different cases of t
-                       if (sType == "dashboard")
-                       {
+                       if (sType == "dashboard") {
                                return Constants.CAT_TEMPLATE_EXT;
-                       }
-                       else if (sType == "team")
-                       {
+                       } else if (sType == "team") {
                                return Constants.TEAMS_TEMPLATE_EXT;
-                       }
-                       else
-                       {
+                       } else {
                                return ".json";
                        }
                }
@@ -102,11 +96,11 @@ namespace LongoMatch.Services.Services
 
                public T Retrieve<T> (Guid id) where T : IStorable
                {
-                       string typePath = ResolvePath<T>();
-                       string path = Path.Combine (typePath, id.ToString () + GetExtension(typeof(T)));
+                       string typePath = ResolvePath<T> ();
+                       string path = Path.Combine (typePath, id.ToString () + GetExtension (typeof(T)));
 
                        if (File.Exists (path)) {
-                               T t = Serializer.LoadSafe<T>(path);
+                               T t = Serializer.LoadSafe<T> (path);
                                Log.Information ("Retrieving " + path);
                                return t;
                        }
@@ -116,13 +110,13 @@ namespace LongoMatch.Services.Services
                public List<T> RetrieveAll<T> () where T : IStorable
                {
                        List<T> l = new List<T> ();
-                       string typePath = ResolvePath<T>();
-                       string extension = GetExtension(typeof(T));
+                       string typePath = ResolvePath<T> ();
+                       string extension = GetExtension (typeof(T));
 
                        // Get the name of the class and look for a folder on the
                        // basePath with the same name
                        foreach (string path in Directory.GetFiles (typePath, "*" + extension)) {
-                               T t = (T)Serializer.LoadSafe<T>(path);
+                               T t = (T)Serializer.LoadSafe<T> (path);
                                Log.Information ("Retrieving " + path);
                                l.Add (t);
                        }
@@ -132,59 +126,52 @@ namespace LongoMatch.Services.Services
                public List<T> Retrieve<T> (Dictionary<string,object> dict) where T : IStorable
                {
                        List<T> l = new List<T> ();
-                       string typePath = ResolvePath<T>();
-                       string extension = GetExtension(typeof(T));
+                       string typePath = ResolvePath<T> ();
+                       string extension = GetExtension (typeof(T));
 
                        if (dict == null)
-                               return RetrieveAll<T>();
+                               return RetrieveAll<T> ();
 
                        // Get the name of the class and look for a folder on the
                        // basePath with the same name
                        foreach (string path in Directory.GetFiles (typePath, "*" + extension)) {
-                               T t = (T)Serializer.LoadSafe<T>(path);
+                               T t = (T)Serializer.LoadSafe<T> (path);
                                bool matches = true;
 
-                               foreach (KeyValuePair<string, object> entry in dict)
-                               {
-                                       FieldInfo finfo = t.GetType().GetField(entry.Key);
-                                       PropertyInfo pinfo = t.GetType().GetProperty(entry.Key);
+                               foreach (KeyValuePair<string, object> entry in dict) {
+                                       FieldInfo finfo = t.GetType ().GetField (entry.Key);
+                                       PropertyInfo pinfo = t.GetType ().GetProperty (entry.Key);
                                        object ret = null;
 
-                                       if (pinfo == null && finfo == null)
-                                       {
+                                       if (pinfo == null && finfo == null) {
                                                Log.Warning ("Property/Field does not exist " + entry.Key);
                                                matches = false;
                                                break;
                                        }
 
                                        if (pinfo != null)
-                                               ret = pinfo.GetValue(t, null);
+                                               ret = pinfo.GetValue (t, null);
                                        else
-                                               ret = finfo.GetValue(t);
+                                               ret = finfo.GetValue (t);
 
-                                       if (ret == null && entry.Value != null)
-                                       {
+                                       if (ret == null && entry.Value != null) {
                                                matches = false;
                                                break;
                                        }
 
-                                       if (ret != null && entry.Value == null)
-                                       {
+                                       if (ret != null && entry.Value == null) {
                                                matches = false;
                                                break;
                                        }
 
-                                       if (ret.GetType() == entry.Value.GetType())
-                                       {
-                                               if (Object.Equals(ret, entry.Value))
-                                               {
+                                       if (ret.GetType () == entry.Value.GetType ()) {
+                                               if (Object.Equals (ret, entry.Value)) {
                                                        matches = true;
                                                }
                                        }
                                }
 
-                               if (matches)
-                               {
+                               if (matches) {
                                        Log.Information ("Retrieving " + path);
                                        l.Add (t);
                                }
@@ -195,22 +182,22 @@ namespace LongoMatch.Services.Services
 
                public void Store<T> (T t) where T : IStorable
                {
-                       string typePath = ResolvePath<T>();
-                       string extension = GetExtension(typeof(T));
+                       string typePath = ResolvePath<T> ();
+                       string extension = GetExtension (typeof(T));
 
                        // Save the object as a file on disk
                        string path = Path.Combine (typePath, t.ID.ToString ()) + extension;
                        Log.Information ("Storing " + path);
-                       Serializer.Save<T>(t, path);
+                       Serializer.Save<T> (t, path);
                }
 
                public void Delete<T> (T t) where T : IStorable
                {
-                       string typePath = ResolvePath<T>();
-                       string extension = GetExtension(typeof(T));
+                       string typePath = ResolvePath<T> ();
+                       string extension = GetExtension (typeof(T));
 
                        try {
-                               string path = Path.Combine(typePath, t.ID.ToString()) + extension; 
+                               string path = Path.Combine (typePath, t.ID.ToString ()) + extension; 
                                Log.Information ("Deleting " + path);
                                File.Delete (path);
                        } catch (Exception ex) {
@@ -218,13 +205,14 @@ namespace LongoMatch.Services.Services
                        }
                }
 
-               public void Reset()
+               public void Reset ()
                {
                        if (File.Exists (basePath)) {
                                Log.Information ("Deleting " + basePath + " recursively");
-                               Directory.Delete(basePath, true);
+                               Directory.Delete (basePath, true);
                        }
                }
+
                #endregion
 
                /// <summary>
@@ -238,7 +226,7 @@ namespace LongoMatch.Services.Services
                        T t;
 
                        Log.Information ("Loading " + from);
-                       t = (T)Serializer.LoadSafe<T>(from);
+                       t = (T)Serializer.LoadSafe<T> (from);
                        return t;
                }
 
@@ -250,7 +238,7 @@ namespace LongoMatch.Services.Services
                /// <typeparam name="T">The type of the object.</typeparam>
                public static void StoreAt<T> (T t, string at) where T : IStorable
                {
-                       Log.Information ("Saving " + t.ID.ToString() + " to " + at);
+                       Log.Information ("Saving " + t.ID.ToString () + " to " + at);
 
                        if (File.Exists (at)) {
                                throw new Exception ("A file already exists at " + at);
diff --git a/LongoMatch.Services/Services/ProjectsManager.cs b/LongoMatch.Services/Services/ProjectsManager.cs
index ae69d3e..da2dfd9 100644
--- a/LongoMatch.Services/Services/ProjectsManager.cs
+++ b/LongoMatch.Services/Services/ProjectsManager.cs
@@ -82,7 +82,7 @@ namespace LongoMatch.Services
                void EmitProjectChanged ()
                {
                        Config.EventsBroker.EmitOpenedProjectChanged (OpenedProject, OpenedProjectType,
-                                                                     PlaysFilter, analysisWindow);
+                               PlaysFilter, analysisWindow);
                }
 
                void RemuxOutputFile (EncodingSettings settings)
@@ -154,9 +154,9 @@ namespace LongoMatch.Services
                                projectFile = filePath + "_" + projectFile;
                                Project.Export (OpenedProject, projectFile);
                                guiToolkit.ErrorMessage (Catalog.GetString ("An error occured saving the 
project:\n") + ex.Message + "\n\n" +
-                                       Catalog.GetString ("The video file and a backup of the project has 
been " +
-                                       "saved. Try to import it later:\n") +
-                                       filePath + "\n" + projectFile);
+                               Catalog.GetString ("The video file and a backup of the project has been " +
+                               "saved. Try to import it later:\n") +
+                               filePath + "\n" + projectFile);
                        }
                }
 
@@ -171,7 +171,7 @@ namespace LongoMatch.Services
                        PlaysFilter = new EventsFilter (project);
                        project.CleanupTimers ();
                        guiToolkit.OpenProject (project, projectType, props, PlaysFilter,
-                                               out analysisWindow);
+                               out analysisWindow);
                        Player = analysisWindow.Player;
                        Capturer = analysisWindow.Capturer;
                        OpenedProject = project;
@@ -195,8 +195,8 @@ namespace LongoMatch.Services
                                }
 
                        } else if (projectType == ProjectType.CaptureProject ||
-                               projectType == ProjectType.URICaptureProject ||
-                               projectType == ProjectType.FakeCaptureProject) {
+                                  projectType == ProjectType.URICaptureProject ||
+                                  projectType == ProjectType.FakeCaptureProject) {
                                try {
                                        Capturer.Run (props, project.Description.FileSet.First ());
                                } catch (Exception ex) {
@@ -314,7 +314,7 @@ namespace LongoMatch.Services
                                        Log.Exception (e);
                                }
                        } else if (projectType == ProjectType.CaptureProject ||
-                               projectType == ProjectType.URICaptureProject) {
+                                  projectType == ProjectType.URICaptureProject) {
                                SaveCaptureProject (project);
                        }
                }
@@ -373,7 +373,7 @@ namespace LongoMatch.Services
                void HandleMultimediaError (string message)
                {
                        guiToolkit.ErrorMessage (Catalog.GetString ("The following error happened and" +
-                               " the current project will be closed:") + "\n" + message);
+                       " the current project will be closed:") + "\n" + message);
                        CloseOpenedProject (true);
                }
 
@@ -397,7 +397,7 @@ namespace LongoMatch.Services
                void HandleCaptureError (string message)
                {
                        guiToolkit.ErrorMessage (Catalog.GetString ("The following error happened and" +
-                               " the current capture will be closed:") + "\n" + message);
+                       " the current capture will be closed:") + "\n" + message);
                        HandleCaptureFinished (true);
                }
 



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