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,NONE,1.1 samples.b


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/samples XHello.cs,NONE,1.1 samples.build,1.2,1.3
Date: Wed, 28 May 2003 00:30:15 -0400

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

Modified Files:
        samples.build 
Added Files:
        XHello.cs 
Log Message:


Add an Xsharp example.


--- NEW FILE ---
/*
 * XHello.cs - Sample program for Xsharp.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software, you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY, without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program, if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

using System;
using Xsharp;

public class XHello
{
        // 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();
                app.Close();
        }

        // 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);
        }

} // class XHello

Index: samples.build
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/samples/samples.build,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** samples.build       27 May 2003 10:35:30 -0000      1.2
--- samples.build       28 May 2003 04:30:13 -0000      1.3
***************
*** 174,177 ****
--- 174,202 ----
                </compile>
  
+               <!-- Build the XHello.exe program -->
+               <compile output="XHello.exe"
+                                target="exe"
+                                unsafe="true"
+                                nostdlib="true"
+                                optimize="true"
+                                debug="true">
+ 
+                       <sources>
+                               <file name="XHello.cs"/>
+                       </sources>
+ 
+                       <references>
+                               <file name="../Xsharp/Xsharp.dll"/>
+                               <file name="../runtime/mscorlib.dll"/>
+                       </references>
+ 
+                       <arg compiler="cscc" value="-Wno-empty-input"/>
+                       <arg compiler="csc" value="/nowarn:626"/>
+                       <arg compiler="csc" value="/nowarn:649"/>
+                       <arg compiler="csc" value="/nowarn:168"/>
+                       <arg compiler="csc" value="/nowarn:67"/>
+                       <arg compiler="csc" value="/nowarn:169"/>
+               </compile>
+ 
        </target>
  </project>





reply via email to

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