/[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 197 by william, Mon Aug 4 10:30:21 2014 UTC revision 198 by william, Mon Aug 4 10:37:13 2014 UTC
# Line 541  namespace EmuXPortal Line 541  namespace EmuXPortal
541          private void gameWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)          private void gameWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
542          {          {
543              Stopwatch t = e.Result as Stopwatch;              Stopwatch t = e.Result as Stopwatch;
544              if (rom_flow.Controls.Count > 0)              if (rom_flow.Controls.Count == 0)
             {  
                 rom_flow.Controls[0].Select();  
             }  
             else  
545              {              {
546                  GameControl game_ctrl = new GameControl();                  GameControl game_ctrl = new GameControl();
547                    game_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(game_ctrl_PreviewKeyDown);
548                    game_ctrl.GotFocus += new EventHandler(game_ctrl_GotFocus);
549                    game_ctrl.LostFocus += new EventHandler(game_ctrl_LostFocus);
550                  game_ctrl.Font = GetFormFont();                  game_ctrl.Font = GetFormFont();
551                  game_ctrl.Dock = DockStyle.Top;                  game_ctrl.Dock = DockStyle.Top;
552                  game_ctrl.Width = this.Width - 10;                  game_ctrl.Width = this.Width - 10;
                 //try  
                 //{  
                 //    lock (gameimage_lock)  
                 //    {  
                 //        game_ctrl.GameImage = (Image)DefaultGameImage.Clone();  
                 //    }  
                 //}  
                 //catch (Exception ex)  
                 //{  
                 //    throw ex;  
                 //}  
553                  game_ctrl.GameName = "You haven't favorited any games, select a game and then press CTRL+F to favorite it";                  game_ctrl.GameName = "You haven't favorited any games, select a game and then press CTRL+F to favorite it";
554                  rom_flow.Controls.Add(game_ctrl);                  rom_flow.Controls.Add(game_ctrl);
555              }              }
556                rom_flow.Controls[0].Select();
557              t.Stop();              t.Stop();
558              log.WriteLine("RomParser took: {0}s to parse roms", (int)t.Elapsed.TotalSeconds);              log.WriteLine("RomParser took: {0}s to parse roms", (int)t.Elapsed.TotalSeconds);
559          }          }
# Line 626  namespace EmuXPortal Line 615  namespace EmuXPortal
615          private void platformWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)          private void platformWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
616          {          {
617              Stopwatch t = e.Result as Stopwatch;              Stopwatch t = e.Result as Stopwatch;
618              if (platform_flow.Controls.Count > 0)              if (platform_flow.Controls.Count == 0)
             {  
                 platform_flow.Controls[0].Select();  
             }  
             else  
619              {              {
620                  PlatformControl platform_ctrl = new PlatformControl();                  PlatformControl platform_ctrl = new PlatformControl();
621                    platform_ctrl.PreviewKeyDown += new PreviewKeyDownEventHandler(platform_ctrl_PreviewKeyDown);
622                    platform_ctrl.GotFocus += new EventHandler(platform_ctrl_GotFocus);
623                    platform_ctrl.LostFocus += new EventHandler(platform_ctrl_LostFocus);
624                  platform_ctrl.Font = GetFormFont();                  platform_ctrl.Font = GetFormFont();
625                  platform_ctrl.Dock = DockStyle.Top;                  platform_ctrl.Dock = DockStyle.Top;
626                  platform_ctrl.Width = this.Width - 10;                  platform_ctrl.Width = this.Width - 10;
                 //try  
                 //{  
                 //    lock (platformimage_lock)  
                 //    {  
                 //        platform_ctrl.PlatformImage = (Image)DefaultPlatformImage.Clone();  
                 //    }  
                 //}  
                 //catch (Exception ex)  
                 //{  
                 //    throw ex;  
                 //}  
627                  platform_ctrl.PlatformName = string.Format("You don't have any roms in your rompath: '{0}'",Config.RomPath);                  platform_ctrl.PlatformName = string.Format("You don't have any roms in your rompath: '{0}'",Config.RomPath);
628                  platform_flow.Controls.Add(platform_ctrl);                  platform_flow.Controls.Add(platform_ctrl);
629              }              }
630                platform_flow.Controls[0].Select();
631              log.WriteLine("PlatformParser took: {0}s to parse platforms", (int)t.Elapsed.TotalSeconds);              log.WriteLine("PlatformParser took: {0}s to parse platforms", (int)t.Elapsed.TotalSeconds);
632          }          }
633          #endregion          #endregion

Legend:
Removed from v.197  
changed lines
  Added in v.198

  ViewVC Help
Powered by ViewVC 1.1.22