dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/samples XHello.cs,1.2,1.3 ilrun.sh.i


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/samples XHello.cs,1.2,1.3 ilrun.sh.in,1.2,1.3
Date: Fri, 06 Jun 2003 06:46:47 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/samples
In directory subversions:/tmp/cvs-serv25713/samples

Modified Files:
        XHello.cs ilrun.sh.in 
Log Message:


Change event handlers into protected virtual methods in Xsharp,
to make it easier to use as the base of larger widget frameworks
(the framework can map the virtuals to events if necessary).


Index: XHello.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/samples/XHello.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** XHello.cs   28 May 2003 04:53:36 -0000      1.2
--- XHello.cs   6 Jun 2003 10:46:45 -0000       1.3
***************
*** 19,36 ****
   */
  
  using System;
  using Xsharp;
  
! public class XHello
  {
- 
- #if CONFIG_REFLECTION
- 
        // Main entry point.
        public static void Main(String[] args)
        {
                Application app = new Application("XHello", args);
!               TopLevelWindow topLevel = new TopLevelWindow("Hello World!", 
200, 100);
!               topLevel.Paint += new PaintEventHandler(PaintHello);
                topLevel.Map();
                app.Run();
--- 19,34 ----
   */
  
+ #if CONFIG_REFLECTION
+ 
  using System;
  using Xsharp;
  
! public class XHello : TopLevelWindow
  {
        // Main entry point.
        public static void Main(String[] args)
        {
                Application app = new Application("XHello", args);
!               XHello topLevel = new XHello("Hello World!", 200, 100);
                topLevel.Map();
                app.Run();
***************
*** 38,54 ****
        }
  
!       // Paint the top-level window.
!       public static void PaintHello(Widget widget, Graphics graphics)
        {
!               graphics.DrawLine(0, 0, widget.Width, widget.Height);
!               graphics.DrawLine(0, widget.Height, widget.Width, 0);
        }
  
  #else
  
        // Stubbed out on platforms without Xsharp.
        public static void Main(String[] args) {}
  
! #endif
  
! } // class XHello
--- 36,61 ----
        }
  
!       // Constructor.
!       public XHello(String title, int width, int height)
!               : base(title, width, height) {}
! 
!       // Handle paint requests.
!       protected override void OnPaint(Graphics graphics)
        {
!               graphics.DrawLine(0, 0, Width, Height);
!               graphics.DrawLine(0, Height, Width, 0);
        }
  
+ }; // class XHello
+ 
  #else
  
+ public class XHello
+ {
+ 
        // Stubbed out on platforms without Xsharp.
        public static void Main(String[] args) {}
  
! }; // class XHello
  
! #endif

Index: ilrun.sh.in
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/samples/ilrun.sh.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** ilrun.sh.in 27 May 2003 10:35:30 -0000      1.2
--- ilrun.sh.in 6 Jun 2003 10:46:45 -0000       1.3
***************
*** 23,25 ****
  
  # Run the engine, with the assembly paths set correct.
! exec "$ILRUN" -L../runtime -L../I18N -L../DotGNU.SSL -L../System 
-L../System.Xml $*
--- 23,25 ----
  
  # Run the engine, with the assembly paths set correct.
! exec "$ILRUN" -L../runtime -L../I18N -L../DotGNU.SSL -L../System 
-L../System.Xml -L../Xsharp $*





reply via email to

[Prev in Thread] Current Thread [Next in Thread]