/[EmuXPortal]/branches/mono/EmuXPortal/Form1.cs
ViewVC logotype

Diff of /branches/mono/EmuXPortal/Form1.cs

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

revision 126 by william, Thu Aug 23 04:47:35 2012 UTC revision 137 by william, Thu Oct 4 21:52:13 2012 UTC
# Line 367  namespace EmuXPortal Line 367  namespace EmuXPortal
367          //}          //}
368          #region gameWorker          #region gameWorker
369          private static Image DefaultGameImage = Properties.Resources.DefaultGameImage;          private static Image DefaultGameImage = Properties.Resources.DefaultGameImage;
370            private object gameimage_lock = new object();
371          private void gameWorker_DoWork(object sender, DoWorkEventArgs e)          private void gameWorker_DoWork(object sender, DoWorkEventArgs e)
372          {          {
373              Stopwatch t = e.Argument as Stopwatch;              Stopwatch t = e.Argument as Stopwatch;
# Line 394  namespace EmuXPortal Line 395  namespace EmuXPortal
395                  game_ctrl.Dock = DockStyle.Top;                  game_ctrl.Dock = DockStyle.Top;
396                  game_ctrl.Width = this.Width - 10;                  game_ctrl.Width = this.Width - 10;
397                  game_ctrl.Tag = config;                  game_ctrl.Tag = config;
398                  game_ctrl.GameImage = config.RomImage == null ? DefaultGameImage : (Image)config.RomImage.Clone();                  try
399                  config.ReleaseRomImageResource();                  {
400                        lock (gameimage_lock)
401                        {
402                            game_ctrl.GameImage = config.RomImage == null ? (Image)DefaultGameImage.Clone() : (Image)config.RomImage.Clone();
403                            config.ReleaseRomImageResource();
404                        }
405                    }
406                    catch (Exception ex)
407                    {
408                        throw ex;
409                    }                
410                  game_ctrl.GameName = config.RomTitle;                  game_ctrl.GameName = config.RomTitle;
411                  game_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(game_ctrl_PreviewKeyDown);                  game_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(game_ctrl_PreviewKeyDown);
412                  game_ctrl.GotFocus += new EventHandler(game_ctrl_GotFocus);                  game_ctrl.GotFocus += new EventHandler(game_ctrl_GotFocus);
# Line 428  namespace EmuXPortal Line 439  namespace EmuXPortal
439          #endregion          #endregion
440          #region platformWorker          #region platformWorker
441          private static Image DefaultPlatformImage = Properties.Resources.DefaultPlatformImage;          private static Image DefaultPlatformImage = Properties.Resources.DefaultPlatformImage;
442            private object platformimage_lock = new object();
443          private void platformWorker_DoWork(object sender, DoWorkEventArgs e)          private void platformWorker_DoWork(object sender, DoWorkEventArgs e)
444          {          {
445              Stopwatch t = e.Argument as Stopwatch;              Stopwatch t = e.Argument as Stopwatch;
# Line 451  namespace EmuXPortal Line 463  namespace EmuXPortal
463                  platform_ctrl.Dock = DockStyle.Top;                  platform_ctrl.Dock = DockStyle.Top;
464                  platform_ctrl.Width = this.Width - 10;                  platform_ctrl.Width = this.Width - 10;
465                  platform_ctrl.Tag = config;                  platform_ctrl.Tag = config;
466                  platform_ctrl.PlatformImage = config.PlatformImage == null ? DefaultPlatformImage : (Image)config.PlatformImage.Clone();                  try
467                  config.ReleasePlatformImageResource();                  {
468                        lock (platformimage_lock)
469                        {
470                            platform_ctrl.PlatformImage = config.PlatformImage == null ? DefaultPlatformImage : (Image)config.PlatformImage.Clone();
471                            config.ReleasePlatformImageResource();
472                        }
473                    }
474                    catch (Exception ex)
475                    {
476                        throw ex;
477                    }
478                  platform_ctrl.PlatformName = config.ToString();                  platform_ctrl.PlatformName = config.ToString();
479                  platform_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(platform_ctrl_PreviewKeyDown);                  platform_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(platform_ctrl_PreviewKeyDown);
480                  platform_ctrl.GotFocus += new EventHandler(platform_ctrl_GotFocus);                  platform_ctrl.GotFocus += new EventHandler(platform_ctrl_GotFocus);

Legend:
Removed from v.126  
changed lines
  Added in v.137

  ViewVC Help
Powered by ViewVC 1.1.22