/[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 273 by william, Thu Mar 17 08:12:45 2016 UTC revision 274 by william, Thu Mar 17 08:31:33 2016 UTC
# Line 32  namespace EmuXPortal Line 32  namespace EmuXPortal
32          private delegate Font Delegate_ResizeFont(Font font, float size);          private delegate Font Delegate_ResizeFont(Font font, float size);
33          IEmuConfig CurrentSelectedRom = null;          IEmuConfig CurrentSelectedRom = null;
34          PlatformControl CurrentPlatformControl = null;          PlatformControl CurrentPlatformControl = null;
35                    int SavedPlatformIndex= -1;
36          GameControl CurrentGameControl = null;          GameControl CurrentGameControl = null;
37    
38          #region unhandled exception support          #region unhandled exception support
# Line 336  namespace EmuXPortal Line 337  namespace EmuXPortal
337                  this.WindowState = FormWindowState.Maximized;                  this.WindowState = FormWindowState.Maximized;
338              }              }
339                          if (e.KeyCode == Keys.Back || e.KeyCode == Keys.Escape)                          if (e.KeyCode == Keys.Back || e.KeyCode == Keys.Escape)
340              {              {                          
341                                    SavedPlatformIndex = platform_flow.Controls.IndexOf (CurrentPlatformControl);
342                  rom_flow.Visible = false;                  rom_flow.Visible = false;
343                  platform_flow.Visible = true;                  platform_flow.Visible = true;
344              }              }
# Line 867  namespace EmuXPortal Line 869  namespace EmuXPortal
869                  platform_ctrl.Width = this.Width - 10;                  platform_ctrl.Width = this.Width - 10;
870                  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);
871                  platform_flow.Controls.Add(platform_ctrl);                  platform_flow.Controls.Add(platform_ctrl);
872              }              }            
873              platform_flow.Controls[0].Select();                          if (SavedPlatformIndex != -1) {
874                                    var platform_control = platform_flow.Controls [SavedPlatformIndex] as PlatformControl;
875                                    platform_flow.SuspendLayout ();
876                                    CurrentPlatformControl = platform_control;
877                                    platform_flow.ScrollControlIntoView (CurrentPlatformControl);
878                                    CurrentPlatformControl.Select ();
879                                    platform_flow.ResumeLayout ();
880                                    SavedPlatformIndex = -1;
881                            } else {
882                                    platform_flow.Controls[0].Select();
883                            }
884              gLog.Profiler.WriteLine("PlatformParser took: {0}s to parse platforms", (int)t.Elapsed.TotalSeconds);              gLog.Profiler.WriteLine("PlatformParser took: {0}s to parse platforms", (int)t.Elapsed.TotalSeconds);
885          }          }
886          #endregion          #endregion

Legend:
Removed from v.273  
changed lines
  Added in v.274

  ViewVC Help
Powered by ViewVC 1.1.22