/[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 264 by william, Thu Mar 17 04:23:49 2016 UTC revision 266 by william, Thu Mar 17 05:23:38 2016 UTC
# Line 1  Line 1 
1  //#define DISABLE_CURSOR_HIDE // when this is present, the cursor will not be hidden  #define HAVE_X11_BORDERSTYLE_ERROR // indicates that there is an error with Control.set_InternalBorderStyle resulting in an X11 Error BadWindow (invalid Window parameter)
2    
3    //#define DISABLE_CURSOR_HIDE // when this is present, the cursor will not be hidden
4  //#define DISABLE_PROGRESS_PERCENTAGE_MESSASGE // when this is present, no progress percent message will be shown on any progressbar  //#define DISABLE_PROGRESS_PERCENTAGE_MESSASGE // when this is present, no progress percent message will be shown on any progressbar
5  #define DISABLE_RELEASE_MODE_KLOGLEVEL_DEBUG // when defined will turn off kLogLevel_Debug messages, in release mode  #define DISABLE_RELEASE_MODE_KLOGLEVEL_DEBUG // when defined will turn off kLogLevel_Debug messages, in release mode
6  //#define DISABLE_DEBUG_MODE_KLOGLEVEL_VERBOSE_DEBUG // when defined will turn off kLogLevel_VerboseDebug message, in debug mode  //#define DISABLE_DEBUG_MODE_KLOGLEVEL_VERBOSE_DEBUG // when defined will turn off kLogLevel_VerboseDebug message, in debug mode
# Line 65  namespace EmuXPortal Line 67  namespace EmuXPortal
67          {          {
68              InitializeComponent();              InitializeComponent();
69    
70                            this.KeyPreview = true;
71                    
72              #region logging support              #region logging support
73              string log_path = Application.StartupPath;              string log_path = Application.StartupPath;
# Line 95  namespace EmuXPortal Line 98  namespace EmuXPortal
98              #endregion              #endregion
99    
100              #region unhandled exception support              #region unhandled exception support
101              AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(UnhandledExceptionEventHandler);  //            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(UnhandledExceptionEventHandler);
102              Application.ThreadException += Application_Unhandled_ThreadException;  //            Application.ThreadException += Application_Unhandled_ThreadException;
103              #endregion              #endregion
104    
105              platform_flow.Dock = DockStyle.Fill;              platform_flow.Dock = DockStyle.Fill;
# Line 134  namespace EmuXPortal Line 137  namespace EmuXPortal
137          void platform_ctrl_LostFocus(object sender, EventArgs e)          void platform_ctrl_LostFocus(object sender, EventArgs e)
138          {          {
139              PlatformControl c = sender as PlatformControl;              PlatformControl c = sender as PlatformControl;
140              c.BorderStyle = BorderStyle.None;                          if (c != null) {
141              c.BackColor = this.BackColor;                                  #if !HAVE_X11_BORDERSTYLE_ERROR
142                                    c.BorderStyle = BorderStyle.None;
143                                    #endif
144                                    c.BackColor = this.BackColor;
145                            }
146          }          }
147    
148          void platform_ctrl_GotFocus(object sender, EventArgs e)          void platform_ctrl_GotFocus(object sender, EventArgs e)
149          {          {                      
150              PlatformControl c = sender as PlatformControl;              PlatformControl c = sender as PlatformControl;
151              c.BorderStyle = BorderStyle.FixedSingle;                          if (c != null) {
152              c.BackColor = SELECTED_CONTROL_BACKCOLOR;                                  #if !HAVE_X11_BORDERSTYLE_ERROR
153              CurrentPlatformControl = c;                                  c.BorderStyle = BorderStyle.FixedSingle;
154                                    #endif
155                                    c.BackColor = SELECTED_CONTROL_BACKCOLOR;
156                                    CurrentPlatformControl = c;
157                            }
158          }          }
159          void game_ctrl_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)          void game_ctrl_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
160          {          {
161                            gLog.Verbose.Debug.WriteLine ("game_ctrl_PreviewKeyDown() fired -- keycode [{0}]", e.KeyCode);
162              GameControl c = sender as GameControl;              GameControl c = sender as GameControl;
163    
164              int changeAmount = 0;              int changeAmount = 0;
# Line 351  namespace EmuXPortal Line 363  namespace EmuXPortal
363          }          }
364          void platform_ctrl_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)          void platform_ctrl_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
365          {          {
366                            gLog.Verbose.Debug.WriteLine ("platform_ctrl_PreviewKeyDown() fired -- keycode [{0}]", e.KeyCode);
367              PlatformControl c = sender as PlatformControl;              PlatformControl c = sender as PlatformControl;
368              int changeAmount = 0;              int changeAmount = 0;
369              int currentPosition = 0;              int currentPosition = 0;
# Line 489  namespace EmuXPortal Line 502  namespace EmuXPortal
502          void game_ctrl_LostFocus(object sender, EventArgs e)          void game_ctrl_LostFocus(object sender, EventArgs e)
503          {          {
504              GameControl c = sender as GameControl;              GameControl c = sender as GameControl;
505                            #if !HAVE_X11_BORDERSTYLE_ERROR
506              c.BorderStyle = BorderStyle.None;              c.BorderStyle = BorderStyle.None;
507                            #endif
508              c.BackColor = this.BackColor;              c.BackColor = this.BackColor;
509          }          }
510    
511          void game_ctrl_GotFocus(object sender, EventArgs e)          void game_ctrl_GotFocus(object sender, EventArgs e)
512          {          {
513              GameControl c = sender as GameControl;              GameControl c = sender as GameControl;
514                            #if !HAVE_X11_BORDERSTYLE_ERROR
515              c.BorderStyle = BorderStyle.FixedSingle;              c.BorderStyle = BorderStyle.FixedSingle;
516                            #endif
517              c.BackColor = SELECTED_CONTROL_BACKCOLOR;              c.BackColor = SELECTED_CONTROL_BACKCOLOR;
518              CurrentGameControl = c;              CurrentGameControl = c;
519          }          }

Legend:
Removed from v.264  
changed lines
  Added in v.266

  ViewVC Help
Powered by ViewVC 1.1.22