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

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

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

revision 175 by william, Mon Aug 4 06:31:48 2014 UTC revision 199 by william, Mon Aug 4 11:35:06 2014 UTC
# Line 6  using System.Drawing; Line 6  using System.Drawing;
6  using System.IO;  using System.IO;
7  using EmuXPortal.Logging;  using EmuXPortal.Logging;
8  using System.Xml;  using System.Xml;
9    using System.Diagnostics;
10    
11  namespace EmuXPortal.Api  namespace EmuXPortal.Api
12  {  {
# Line 78  namespace EmuXPortal.Api Line 79  namespace EmuXPortal.Api
79          #endregion          #endregion
80    
81          #region private class EmuConfig : IEmuConfig          #region private class EmuConfig : IEmuConfig
82          private class EmuConfig : IEmuConfig, IComparable<IEmuConfig>, IDisposable          internal class EmuConfig : IEmuConfig, IComparable<IEmuConfig>, IDisposable
83          {          {
84              public IEmuConfig Create(logger log, string rom_path) { return this.Create(log, string.Empty, rom_path); }              public IEmuConfig Create(logger log, string rom_path) { return this.Create(log, string.Empty, rom_path); }
85              public IEmuConfig Create(logger log, string config_path, string rom_path)              public IEmuConfig Create(logger log, string config_path, string rom_path)
# Line 275  namespace EmuXPortal.Api Line 276  namespace EmuXPortal.Api
276              public EmuConfig(logger log, string PlatformNameShort, string PlatformNameLong, string PlatformImage, string Extenstions, string EmuPath) : this(log, PlatformNameShort, PlatformNameLong, PlatformImage, Extenstions, EmuPath, "") { }              public EmuConfig(logger log, string PlatformNameShort, string PlatformNameLong, string PlatformImage, string Extenstions, string EmuPath) : this(log, PlatformNameShort, PlatformNameLong, PlatformImage, Extenstions, EmuPath, "") { }
277              public EmuConfig(logger log, string PlatformNameShort, string PlatformNameLong, string PlatformImage, string Extenstions, string EmuPath, string EmuOptions)              public EmuConfig(logger log, string PlatformNameShort, string PlatformNameLong, string PlatformImage, string Extenstions, string EmuPath, string EmuOptions)
278              {              {
279                    //if (string.IsNullOrEmpty(EmuRomPath))
280                    //{
281                    //    if (Debugger.IsAttached)
282                    //        Debugger.Break();
283                    //}
284                  this.PlatformNameShort = PlatformNameShort;                  this.PlatformNameShort = PlatformNameShort;
285                  this.PlatformNameLong = PlatformNameLong;                  this.PlatformNameLong = PlatformNameLong;
286                  this.PlatformImage = (PlatformImage == "") ? Properties.Resources.DefaultPlatformImage : Image.FromFile(PlatformImage);                  this.PlatformImage = (PlatformImage == "") ? Properties.Resources.DefaultPlatformImage : Image.FromFile(PlatformImage);
# Line 298  namespace EmuXPortal.Api Line 304  namespace EmuXPortal.Api
304                  {                  {
305                      try                      try
306                      {                      {
307                          DirectoryInfo t = new DirectoryInfo(EmuRomPath);                          //if (string.IsNullOrEmpty(EmuRomPath))
308                            //{
309                            //    return "EmuRomPath null";
310                            //}
311                            DirectoryInfo t = new DirectoryInfo(EmuRomPath);                      
312                          return (_PlatformNameShort == "") ? string.Format("{0} (folder={1})", Unknown_Platform, t.Name) : _PlatformNameShort;                          return (_PlatformNameShort == "") ? string.Format("{0} (folder={1})", Unknown_Platform, t.Name) : _PlatformNameShort;
313                            
314                      }                      }
315                      catch (Exception ex)                      catch (Exception ex)
316                      {                      {

Legend:
Removed from v.175  
changed lines
  Added in v.199

  ViewVC Help
Powered by ViewVC 1.1.22