/[EmuXPortal]/trunk/EmuXPortal/Api/PlatformParser.cs
ViewVC logotype

Diff of /trunk/EmuXPortal/Api/PlatformParser.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/EmuXPortal/Api/PlatformParser.cs	2014/08/05 04:13:36	237
+++ trunk/EmuXPortal/Api/PlatformParser.cs	2014/08/05 04:50:39	238
@@ -3,8 +3,8 @@
 using System.Linq;
 using System.Text;
 using System.IO;
-using EmuXPortal.Logging;
 using System.Drawing;
+using Enterprise.Logging;
 
 namespace EmuXPortal.Api
 {
@@ -36,7 +36,7 @@
         public string GameExeArgs { get { return ""; } }
 
 
-        public void RefreshConfig(logger log) { }
+        public void RefreshConfig() { }
         public void ReleasePlatformImageResource()
         {
             if (this.PlatformImage != null)
@@ -58,22 +58,22 @@
     {
         private const string EMU_IGNORE_FILE = "emu_ignore.txt"; // if this file is present, that folder is ignored
         
-        public PlatformParser(logger log, string path)
+        public PlatformParser(string path)
         {
-            List<string> romdirs = GetRomDirectories(log, path);
-            log.WriteLine("Found {0} EMU Folders", romdirs.Count);
+            List<string> romdirs = GetRomDirectories(path);
+            gLog.Debug.WriteLine("Found {0} EMU Folders", romdirs.Count);
             this.Platforms = new List<IEmuConfig>();
             this.Platforms.Add(new FavoritePlatform());
-            var emu_platforms =  GetEMUConfigFiles(log, romdirs);
+            var emu_platforms =  GetEMUConfigFiles(romdirs);
             this.Platforms.AddRange(emu_platforms);
             this.Platforms.Sort();
         }
 
         public List<IEmuConfig> Platforms { get; private set; }
 
-        private List<string> GetRomDirectories(logger log,string path)
+        private List<string> GetRomDirectories(string path)
         {
-            log.WriteLine("Searching for EMU Folders in: {0}", path);
+            gLog.Debug.WriteLine("Searching for EMU Folders in: {0}", path);
             List<string> dirs = new List<string>();
             foreach (string dir in Directory.GetDirectories(path))
             {
@@ -83,31 +83,31 @@
                     FileInfo fi = new FileInfo(file);
                     if (fi.Name.ToLower() == EMU_IGNORE_FILE)
                     {
-                        log.WriteLine("\tIgnoreing EMU Folder: {0}", dir);
+                        gLog.Debug.WriteLine("\tIgnoreing EMU Folder: {0}", dir);
                         ignore = true;
                         break;
                     }
                 }
                 if (!ignore)
                 {
-                    log.WriteLine("\tAdding EMU Folder: {0}", dir);
+                    gLog.Debug.WriteLine("\tAdding EMU Folder: {0}", dir);
                     dirs.Add(dir);
                 }
             }
             return dirs;
         }
 
-        private List<IEmuConfig> GetEMUConfigFiles(logger log, List<string> romdirs)
+        private List<IEmuConfig> GetEMUConfigFiles(List<string> romdirs)
         {
             List<IEmuConfig> emuconfigs = new List<IEmuConfig>();
-            log.WriteLine("Reading EMU Config files");
+            gLog.Debug.WriteLine("Reading EMU Config files");
             foreach (string dir in romdirs)
             {
                 IEmuConfig emuconfig = null;
-                emuconfig = EmuConfigLoader.Load(log, dir);
+                emuconfig = EmuConfigLoader.Load(dir);
                 emuconfigs.Add(emuconfig);
             }
-            log.WriteLine("Finished Reading EMU Config files");
+            gLog.Debug.WriteLine("Finished Reading EMU Config files");
             return emuconfigs;
         }
 

 

  ViewVC Help
Powered by ViewVC 1.1.22