/[EmuXPortal]/trunk/EmuXPortal/Form1.cs
ViewVC logotype

Diff of /trunk/EmuXPortal/Form1.cs

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

revision 109 by william, Thu Aug 23 02:20:19 2012 UTC revision 110 by william, Thu Aug 23 02:44:26 2012 UTC
# Line 365  namespace EmuXPortal Line 365  namespace EmuXPortal
365              else { this.Update(); }              else { this.Update(); }
366          }          }
367          #region gameWorker          #region gameWorker
368            private static Image DefaultGameImage = Properties.Resources.DefaultGameImage;
369          private void gameWorker_DoWork(object sender, DoWorkEventArgs e)          private void gameWorker_DoWork(object sender, DoWorkEventArgs e)
370          {          {
371              Stopwatch t = e.Argument as Stopwatch;              Stopwatch t = e.Argument as Stopwatch;
# Line 391  namespace EmuXPortal Line 392  namespace EmuXPortal
392                  game_ctrl.Dock = DockStyle.Top;                  game_ctrl.Dock = DockStyle.Top;
393                  game_ctrl.Width = this.Width - 10;                  game_ctrl.Width = this.Width - 10;
394                  game_ctrl.Tag = config;                  game_ctrl.Tag = config;
395                  game_ctrl.GameImage = (Image)config.RomImage.Clone();                  game_ctrl.GameImage = config.RomImage == null ? DefaultGameImage : (Image)config.RomImage.Clone();
396                    config.ReleaseRomImageResource();
397                  game_ctrl.GameName = config.RomTitle;                  game_ctrl.GameName = config.RomTitle;
398                  game_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(game_ctrl_PreviewKeyDown);                  game_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(game_ctrl_PreviewKeyDown);
399                  game_ctrl.GotFocus += new EventHandler(game_ctrl_GotFocus);                  game_ctrl.GotFocus += new EventHandler(game_ctrl_GotFocus);
# Line 422  namespace EmuXPortal Line 424  namespace EmuXPortal
424          }          }
425          #endregion          #endregion
426          #region platformWorker          #region platformWorker
427            private static Image DefaultPlatformImage = Properties.Resources.DefaultPlatformImage;
428          private void platformWorker_DoWork(object sender, DoWorkEventArgs e)          private void platformWorker_DoWork(object sender, DoWorkEventArgs e)
429          {          {
430              Stopwatch t = e.Argument as Stopwatch;              Stopwatch t = e.Argument as Stopwatch;
# Line 444  namespace EmuXPortal Line 447  namespace EmuXPortal
447                  platform_ctrl.Dock = DockStyle.Top;                  platform_ctrl.Dock = DockStyle.Top;
448                  platform_ctrl.Width = this.Width - 10;                  platform_ctrl.Width = this.Width - 10;
449                  platform_ctrl.Tag = config;                  platform_ctrl.Tag = config;
450                  platform_ctrl.PlatformImage = (Image)config.PlatformImage.Clone();                  platform_ctrl.PlatformImage = config.PlatformImage == null ? DefaultPlatformImage : (Image)config.PlatformImage.Clone();
451                    config.ReleasePlatformImageResource();
452                  platform_ctrl.PlatformName = config.ToString();                  platform_ctrl.PlatformName = config.ToString();
453                  platform_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(platform_ctrl_PreviewKeyDown);                  platform_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(platform_ctrl_PreviewKeyDown);
454                  platform_ctrl.GotFocus += new EventHandler(platform_ctrl_GotFocus);                  platform_ctrl.GotFocus += new EventHandler(platform_ctrl_GotFocus);

Legend:
Removed from v.109  
changed lines
  Added in v.110

  ViewVC Help
Powered by ViewVC 1.1.22