/[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 191 by william, Mon Aug 4 10:07:53 2014 UTC revision 197 by william, Mon Aug 4 10:30:21 2014 UTC
# Line 540  namespace EmuXPortal Line 540  namespace EmuXPortal
540          private void gameWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) { }          private void gameWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) { }
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              rom_flow.Controls[0].Select();              if (rom_flow.Controls.Count > 0)
545                {
546                    rom_flow.Controls[0].Select();
547                }
548                else
549                {
550                    GameControl game_ctrl = new GameControl();
551                    game_ctrl.Font = GetFormFont();
552                    game_ctrl.Dock = DockStyle.Top;
553                    game_ctrl.Width = this.Width - 10;
554                    //try
555                    //{
556                    //    lock (gameimage_lock)
557                    //    {
558                    //        game_ctrl.GameImage = (Image)DefaultGameImage.Clone();
559                    //    }
560                    //}
561                    //catch (Exception ex)
562                    //{
563                    //    throw ex;
564                    //}
565                    game_ctrl.GameName = "You haven't favorited any games, select a game and then press CTRL+F to favorite it";
566                    rom_flow.Controls.Add(game_ctrl);
567                }
568              t.Stop();              t.Stop();
569              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);
570          }          }
# Line 603  namespace EmuXPortal Line 626  namespace EmuXPortal
626          private void platformWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)          private void platformWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
627          {          {
628              Stopwatch t = e.Result as Stopwatch;              Stopwatch t = e.Result as Stopwatch;
629              platform_flow.Controls[0].Select();              if (platform_flow.Controls.Count > 0)
630                {
631                    platform_flow.Controls[0].Select();
632                }
633                else
634                {
635                    PlatformControl platform_ctrl = new PlatformControl();
636                    platform_ctrl.Font = GetFormFont();
637                    platform_ctrl.Dock = DockStyle.Top;
638                    platform_ctrl.Width = this.Width - 10;
639                    //try
640                    //{
641                    //    lock (platformimage_lock)
642                    //    {
643                    //        platform_ctrl.PlatformImage = (Image)DefaultPlatformImage.Clone();
644                    //    }
645                    //}
646                    //catch (Exception ex)
647                    //{
648                    //    throw ex;
649                    //}
650                    platform_ctrl.PlatformName = string.Format("You don't have any roms in your rompath: '{0}'",Config.RomPath);
651                    platform_flow.Controls.Add(platform_ctrl);
652                }
653              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);
654          }          }
655          #endregion          #endregion

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

  ViewVC Help
Powered by ViewVC 1.1.22